Cassandra CPP Driver - c++

Really basic issue. I'm trying to install the Datastax Cassandra C++ driver on my Ubuntu 16.0.4 machine. It really shouldn't be that difficult. I've installed all dependencies using dpkg and installed the cassandra driver deb file. But I can't find (or #include) the cassandra.h file.
Running
$ locate cassandra.h
returns nothing and running
$ locate cassandra*
returns a whole mess of files from cqlsh, the casssandra config files, etc, but no header files for the cpp driver.
Additionally, cassandra-cpp-driver doesn't show up in dpkg -l (though apt-get and dpkg -i say it's already installed).
Any help getting this installed would be appreciated.

DataStax C/C++ Driver for Apache Cassandra is currently not available from the Ubuntu official repository.
There are .deb packages for Ubuntu which are available as mentioned in the DataStax project documentation on github datastax/cpp-driver repository from this location:
http://downloads.datastax.com/cpp-driver/
If you are using Ubuntu 16.04, the last .deb available are under ubuntu/16.04/cassandra/v2.7.0/.
You will find the cassandra.h file in cassandra-cpp-driver-dev_2.7.0-1_amd64.deb, which you need to download and install with dpkg.
The suffix dev in a Debian or Ubuntu package denotes a package meant for developing programs, containing, in particular, header files.
dpkg -i cassandra-cpp-driver-dev_2.7.0-1_amd64.deb
The header will get installed in the usual location under Linux for header files that your compiler should find without a problem: /usr/include/cassandra.h.
it will also install:
/usr/lib/x86_64-linux-gnu/libcassandra_static.a
/usr/lib/x86_64-linux-gnu/pkgconfig/cassandra.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cassandra_static.pc
/usr/share/doc/cassandra-cpp-driver-dev/changelog.Debian.gz
/usr/share/doc/cassandra-cpp-driver-dev/copyright
which you will need for static linking and for pkgconfig to work properly.
What you may have installed is cassandra-cpp-driver_2.7.0-1_amd64.deb which contains the libcassandra.so.2.7.0 that is the shared object (dynamic) library binary file,.. although whatever you installed should indeed come in the result of a dkpg -l query such as:
dpkg -l | grep cassandra
If you installed anything from an unofficial source, I would suggest you uninstall these first, and install the provided .deb for your plaform from the official source.
Follow the documentation's instructions for making your first program with this library.

Related

Compile a C++ program (LANShare)

I'm having problems compiling LANShare's sourcecode.
I need to compile this program because i need to use it on a 32-bit unix machine and there's no .deb or appimage release file.
This is LANShare.
As you can see there's no config file and i don't know how i can proceed with compilation.
I compiled from source many times but here there's no Readme nor instructions, then I opened an issue but there's no response yet.
Found a solution, thanks to n. 1.8e9-where's-my-share m.
Theese instructions should be valid for any Debian 10 install.
To install qt tools:
sudo apt install qt5-qmake qt5-default
then to compile:
qmake -o Makefile LANShare.pro
make
within the README.md file there is:
You can download the Ubuntu package or linux AppImage or Windows executable from the release page.
https://github.com/abdularis/LAN-Share/releases
Using .deb (Ubuntu/Debian)
download the latest version, for example lanshare_1.2.1-1_amd64.deb then open a terminal, navigate to directory where the downloaded package is located and type
$ sudo dpkg -i ./lanshare_1.2.1-1_amd64.deb

EOS CDT: where are the *.h and the *.cpp files stored in the filesystem, I need reference to them to compile

I'm trying to use the EOS CDT (contract development toolkit).
I've downloaded and installed the repository from github, and used to following commands, as indicated from the eos.io development page.
https://developers.eos.io/eosio-home/docs/installing-the-contract-development-toolkit
console commands:
wget https://github.com/eosio/eosio.cdt/releases/download/v1.3.2/eosio.cdt-1.3.2.x86_64.deb
sudo apt install ./eosio.cdt-1.3.2.x86_64.deb
I can't find the reference to the h and cpp files in ubuntut's (16.04.5) filesystem.
Where are they?
I need to reference them for compiling the test codes and the examples.
I'm also using visual studio code ide.
Based on Botje's comment:
"Unless the debian file is really special, you can see which files it contains (and thus installs to your filesystem) with dpkg -c eosio.cdt-1.3.2.x86_64.deb"
using the command:
dpkg -c eosio.cdt-1.3.2.x86_64.deb
The folder where the files are installed are shown:
The CDT files are stored in /usr/opt/eosio.cdt/
For MacOS users reference, when installing with Brew include paths are located at
/usr/local/Cellar/eosio.cdt/1.4.1/opt/eosio.cdt/include/
(Please use your own version instead of 1.4.1 if applicable)

RedHawk building from source --- locate the code installing uhd3.5.3

I am trying to build from source for RedHawk installation and trying to replace uhd3.5.3 with a higher version of uhd for USRP_UHD module. I saw USRP_UHD source code, but found nowhere for uhd3.5.3 source code. I am guessing it might simply use "yum install ..." to download and install uhd host code and suporting libraries. Does anybody know where this code is located in redhawk_src_2.0 package? Or is there an efficient way in linux to search for this among all the files in redhawk_src_2.0 package?
Thanks in advance!
UHD is the USRP Harware driver softwware from Ettus Research. The UHD is distributed from:
http://files.ettus.com/binaries/uhd_stable/
Version 3.5.3 is here:
http://files.ettus.com/binaries/uhd_stable/uhd_003.005.003-release/
The current release is 3.9.2:
http://files.ettus.com/binaries/uhd_stable/uhd_003.009.002-release/
Hopefully this helps. I wasn't 100% sure what you are asking for.
First, clone the uhd library:
git clone git://github.com/EttusResearch/uhd.git
Then checkout the 3.9.2 tag:
git checkout release_003_009_002
Using the instructions from Ettus (http://files.ettus.com/manual/page_build_guide.html), install the dependencies listed under the Fedora section:
sudo yum -y install boost-devel libusb1-devel python-mako doxygen python-docutils cmake make gcc gcc-c++
Next, generate the Makefiles with CMake:
cd <uhd-repo-path>/host
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/uhd ../
I recommend using an alternate install prefix at first to preserve the 3.5.3 version, just in case, but if you don't want to, just run:
cmake ../
instead of the longer command with the -DCMAKE_INSTALL_PREFIX flag. (Note: I couldn't get cmake to find the installed boost version, so you may have to do some other research on that since it is probably a whole different stackoverflow post in and of itself)
Now build and install the uhd library:
make
make test
sudo make install
Now that the library is installed, you should edit the USRP_UHD/cpp/configure.ac so that the PKG_CONFIG_PATH points to your install prefix (either the one specified in the flag above, or if you did the default, just leave it, as it should already be pointing to /usr/local/lib/pkgconfig). Also in the configure.ac file, make sure to change the uhd version number to 3.9.2.
Now you should be able to rebuild the USRP_UHD Device:
./reconf && ./configure && make install
I don't guarantee that the Device will build against the new version of the uhd library, that will depend on what (if anything) has been deprecated an removed from the library between the supported version and the newest one.
Finally, if you get through all of those steps successfully and if you specified a non-standard install prefix, you will have to add this prefix to either the LD_LIBRARY_PATH or an /etc/ld.so.conf.d/ script in order for the Device to correctly execute.
Clarification - you can follow the Redhawk manual appendix B for building Redhawk from source AFTER installing UHD v3.9.3 from source as per pwolframs instructions. The UHD v3.5.3 is not packaged with the Redhawk source code, only the Redhawk RPM, disregard all those RPMs when building UHD and Redhawk from source.

How to use a library ported for Native Client(NaCl)?

I was looking at the list of naclports for ported libraries and I want to use openssl for my native client extention. I can't find a proper instruction set to install these ported libraries, I downloaded the openssl compressed file and followed the instructions given in INSTALL file but that encountered some errors which I can't resolve.
To install a library ported to Native Client as part of naclports you'll need to:
Download and install the NaCl SDK:
https://developer.chrome.com/native-client/sdk/download
Set NACL_SDK_ROOT in your environment to point at the pepper_* version under the location you install it at.
You may want to explicitly install the very latest version: pepper_canary, with: ./naclsdk install pepper_canary
Sync the naclports repository: Checkout guide
Check out a branch that matches you SDK, or master for pepper_canary
To build openssl, do something like this:
./bin/naclports --force --from-source install openssl
If you have no local modifications you can drop the --force and --from-source flags
This will build the newlib NaCl version by default.
You can set TOOLCHAIN in the environment to: glibc / pnacl / newlib to select an explicit version.
The library will then be installed into your SDK.

Unable to install and locate libsqlite3.a

I'm a computer science student currently running on Ubuntu 12.10 on VMware player. My assignment requires me to be using sqlite with my c++ program and I have trouble linking it with netbeans. I've read that I need libsqlite3.a to link it with my project.
I have run sudo apt-get install sqlite3 libsqlite3-dev, however I'm clueless about finding/downloading/making one. Can anyone help me with this?
That's how you list files in an installed package:
dpkg -L libsqlite3-dev
On my (Debian) system, the library is at /usr/lib/x86_64-linux-gnu/libsqlite3.a.