Cassandra cpp driver on Windows/RHEL - cassandra

I am trying to build cassandra cpp driver on rhel 6.4.So the requirement is to make this work on windows/RHEL with Visual Studio/gcc compiler.So what it takes to make this driver work on RHEL/windows without any additional packaging being required?

CentOS 6.4 (minimal)
1. Get the dependencies
sudo yum install gcc-c++ glibc glibc-devel boost boost-devel openssl openssl-devel libssh2 libssh2-devel zlib zlib-devel make cmake git
2. Clone the C++ driver for Cassandra from its repository
git clone https://github.com/datastax/cpp-driver.git
3. Build
cd cpp-driver
cmake -G "Unix Makefiles"
make
That's it. Most likely, the driver will be packaged sooner or later and building it will not be necessary (unless you want to hack with the dev version).
Windows
1. Get the dependencies
Install Zlib, OpenSSL, libSSH2, Boost and CMake (in this order). LibSSH2 and Boost must be compiled with Visual Studio (these processes are beyond the scope of this answer, but usually go off smoothly). Remeber the directories where you put them.
2. Download the C++ driver for Cassandra
You can clone the repository (if you have Git client at hand) or download the zipped source.
3. Configure and build
Run CMake GUI, select your toolchain, and point to the cpp-driver directory ('Where is the source code'). Hit 'Configure'. You will see some red entries that need to be set manually. Most likely these are locations of the freshly installed libraries. Set them and 'Configure' until no more red fields are present. Then hit 'Generate' and you will get an MSVS solution ready to be imported and built.
Caveats
At the time of this writing the C++ driver for Cassandra undergoes intense development. Therefore, the process described above may require appropriate tuning.
Another thing worth remembering is that (at the time of this writing) the C++ driver has only C++ interface. To preserve ABI compatibility it is advised to stick to one toolchain when building and using the driver.

Related

install GLFW3 on openSuse linux through YaST

I am in the process of moving my programming from mac to the linux distrubution OpenSuse Leap.
therefor i want to install the c++ libraries which i used on my mac on my new machine, this is done through YaST (yet another setup tool)'s software manager, through which i have succesfully been able to install multiple libraries.
I am having problems installing GLFW3, i would prefer to install the latest version (3.2), but at the very least the version must be greater than 3
under YaST's software manager i can however only find something named GLFW2 - however it claims to be version 2.7.6-3.2-x86_64 and to have the build time Fri 11 Sep 2015, and i am not sure if i should regard the fact that it is quite recently build and that the current version (3.2) is in the supposed version of this as a proof that it is indeed GLFW version 3.2 - with some backward compatibillity, or if i should regard the fact that the library is named GLFW2 as a proof that is is not GLFW3.
I have attempted to make and compile dummy programs (which are totally empty programs which tries to include GLFW3) but they fail to compile, claiming that library GLFW3 doesn't exist, but i can not know wether or not they fail because GLFW3 is not installed, or because it is installed but I don't know how to include it.
My question is therefor: if i install the library named GLFW2 through YaST, can i then safely assume that i have GLFW 3.2 installed and that i therefor only need learn to include and compile the library; if no, does that mean i can't install a version of GLFW higher than 3
I have just the same problem today using OpenSUSE, and ended up installing GLFW3.2 from source. In order to get the glfw compiled from sources on OpenSUSE, I also needed to install the following dependencies (using zypper install package_name_to_install):
1) libXrandr-devel
2) libXinerama-devel
3) libXcursor-devel
After the dependencies are installed, I just followed standard cmake flow:
1) git clone git#github.com:glfw/glfw.git
2) cd glfw && mkdir build && cd build && cmake ..
3) make
4) sudo make install

How can I obtain a newer GCC? I don't have root, and can't compile it (memory error)

I have a shared account on a machine that is running an older version of GCC. I do not have root. When I try to compile GCC, my build process gets killed due to memory usage from the following command:
build/genattrtab ../../../work/gcc-6.1.0/gcc/common.md ../../../work/gcc-6.1.0/gcc/config/i386/i386.md insn-conditions.md \
-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
I'd really like to be able to compile some software on this machine that requires a newer GCC. Any suggestions are appreciated.
You can manually unpack one of the GCC packages for any major distribution, try to use the package that closely matches your distribution. These installable packages are just tar files with some meta data and install script. You can unpack them and extract binaries that you'll need. Just keep in mind that you might need to more than just gcc package. Some distributions chop their devtools into tons of small packages ( gcc, g++, binutils, gdb)
Another good source is to use pre-build gcc toolchain used by embedded vendors, sometimes these vendors include host version of gcc together with cross-compiler. For example Android NDK is one of such distributions.
Finally, you can compile GCC on another machine that is not so restrictive and copy the resulting binaries to your restrictive machine. As in case of the first approach of unpacking installable package, try to find machine that resembles your restrictive machine as close as possible. You can use tools like vagrant and docker to set-up close replica of your target machine. Vagrant and docker have a lot of pre-built templates that you can use as a jump start to create the machine you need.

New C++ GPP device in RedHawk2.0

The release notes for RedHawk 2.0 say that the GPP device previously written in Python has been replaced with one written in "Written in C++, so it is more responsive". But I find it still running in Python (according to ps command python is running GPP.py, and the $SDRROOT/dev/devices/GPP/GPP.spd.xml which also has softpkg version="1.10.0". Was my installation defective and I still have parts of the 1.10 runtime system? My IDE says 2.0.
It sounds like REDHAWK 2.0 was not properly installed on your system, the IDE and the framework/assets are separate and it is possible to get into a situation with conflicting versions depending on the installation steps taken.
Determining what version of REDHAWK you have installed can be determined in a handful of ways. If you installed via yum or rpm you can check the versions of the rpms installed with:
rpm -qa | grep -i redhawk
The redhawk package, and redhawk-ide package should both be at 2.0. Note that the REDHAWK assets are versioned independently.
If you installed via source, you can use the package config files to obtain version information. The framework keeps it's pc files in $OSSIEHOME/lib64/pkgconfig:
cat $OSSIEHOME/lib64/pkgconfig/ossie.pc
Will print out version information for the core framework installed. Depending on what is installed, there are pc files for the framework, bulkio, frontend, and burstio.
I am sorry. The GPP-2.0.0-3.el6.x86_64 DOES contain an ELF executable for GPP device. But the rpm does not install unless I manually erase the GPP-1.10 pkg. Until erased yum says "nothing to do" for some reason. I saw the source code in GPP-debuginfo but did not notice the executable in GPP-2.0.0 since it was all caps and looked like the directory.

how to compile apache,mysql and php in linux

I have never used Linux OS. Want to know how we can start compiling Apache,Mysql and php in Linux and is it necessary to configure it.
I tried doing it by using cd/user/scr/httpd_2.0.09
Do we need to downloads the set up from google
Do yourself a favour and don't try to compile your own webserver etc. ;)
Aside from the fact that it's a lot of work to set up the tools for compiling, resolve dependencies, and debug possible errors, you will have to do the same procedure with every tiny update – instead of simply getting a new version via your package manager.
If you use a common distribution, install the packages required for the so-called LAMP stack, and configure them properly. That will be hard enough for starters.
If you're using Ubuntu, have a look here: https://help.ubuntu.com/community/ApacheMySQLPHP
Actually installing binaries from repositories is less painful than compiling, but if you really want so, you may install Gentoo or other source-based distributive. I've simply described compilation of MySQL 5.5 in my blog.
To compile packages on Debian based systems you need to install build-essential and cmake package (and maybe some other *-dev packages, which appears to be missing during source configure).
For example to compile MySQL 5.5 it is enough to run:
cmake . #yep, with dot. Will prepare your source according to your system
make
make install #will install compiled binaries to system

Cross-compiler for Linux on Mac OS X?

I've been reading lots of documents on the internet about creating a cross compiler for linux on mac os x but can't seam to get any to work.
It seams as if no one can help me with the question: Getting GMP to work with GCC 4.5.2
Is there any easy'er way to create a cross compiler?
You need to:
install the xcode base build tools
install the optional xcode command line tools
install homebrew
install the homebrew build tools
4.1 brew install crosstool-ng mpfr gmp grep
4.2 brew tap homebrew/dupes
create a case sensitive volume using "disk utility"
use this volume to build the tool chain itself
6.1 generate a base configuration (for me this is an arm cortex a8)
6.1.1 ct-ng arm-cortex_a8-linux-gnueabi
6.2 use menuconfig (ct-ng menuconfig) to tweak the configuration
6.2.1. disable fortran and java (c compiler)
6.2.2. turn off static linking (c compiler)
6.2.3. change the paths to be on the volume you created above (paths and misc options)
6.2.4. remove dmalloc (debug facilities)
6.3 invoke the build:
6.3.1 ulimit -n 1024
6.3.2 ct-ng build
with much thanks to the crosstools-ng list.
In order to build binaries for architectures different that your build host, you need far more than just a cross-compiler - you need a full-blown toolchain, which can be a real pain to create, as you probably discovered.
A couple of approaches:
Use a proper Linux distribution in a virtual machine, such as VirtualBox. If you only want to build binaries for Linux/i386 on an MacOSX/x86_64 host, this is - in my opinion - the easiest, safest and most clean solution. It is not a cross-compiler, of course, but it works and it has the added advantage that you can actually test your executables.
Use a script such crosstool-NG (a descendant of the original crosstool) to automatically build the toolchain - definitely easier than building it on your own, although you may have to compromise for slightly older compiler versions.

Resources