I am trying to install a python package using pip3. The python package at some point during installation runs cmake which requires boost (libboost-dev) of version 1.58.
The issue I have is that I have two boost installed, one in /usr/local/include and one in /usr/include. The one in /usr/include is version 1.58, as seen by typing
dpkg -s libboost-dev | grep 'Version'
However, the cmake command finds the version in /usr/local/include, which is 1.54 and too old.
One recommended solution (see How to change boost path) seems to be to set the environmental variable BOOST_ROOT, but running export BOOST_ROOT="/usr/include" before pip does not make a difference.
The other recommended solution is to pass a flag to cmake that sets the path. However, since cmake is run somewhere inside pip3 install, I have no idea how to do that. How to solve this issue, by eg either getting rid of my old boost version or by forcing cmake/pip3 to use my new version (or updating the boost version in /usr/local/include)?
export BOOST_ROOT=/usr
export BOOST_INCLUDE=/usr/include
export BOOST_LIBDIR=/usr/lib
PS. Why don't you remove outdated boost from /usr/local/include and /usr/local/lib?
You can remove (although I recommend renaming it until you are sure) the older boost entry in the global CMake package registry. On Linux it should be here:
~/.cmake/packages/<package>
Related
first, I used :
./vcpkg install pcl
to install pcl. However, I don't notice that this command could not install vtk and use pcl/visualization. I succeed in installing and using pcl(except visualiztion).
So, I try follow :
./vcpkg install pcl[vtk,qt] --rescure
Actually, when I wanted to use I could still not #include<pcl/visualiztion/..>
I had to run it the following way to fix this issue:
vcpkg install pcl[vtk]:x64-windows --featurepackages --recurse
Not sure whether x64-windows specifier is important, but keep in mind that VCPKG installs x86 libraries by default. Also please not that the option you have used is misspelled: it is --recurse, not --rescure.
If you are using CMake, remember to use the toolchain file:
cmake -B [build directory] -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
By following and installing from sharpSAT, one's suppose to run the setupdev.sh script followed by make command. When running make, I get
'gmpxx.h' file not found error. I did find a lot regarding error 'gmp.h' not found, eg. at here, here and here, but these are when installing some other package with either pip or brew.
I've also tried including usr/local/include (gmpxx.h is located at usr/local/indluce/gmpxx.h) to path variable in .bash_profile as suggested here, but with no good results.
Any suggestions?
Your system is having trouble locating the GNU multiprecision libraries. This answer assumes you used brew install gmp to install the multiprecision library.
In sharpSAT's CMakeLists.txt, change the line:
include_directories(/opt/local/include)
to:
include_directories("/usr/local/Cellar/gmp/X.Y.Z/include")
where X.Y.Z is your version of gmp. To determine which version of gmp you have installed (and in turn where homebrew installed gmp), call:
locate gmp
You may need to build your location database which can take some time.
You should double check that your system no longer has /opt/local/include.
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.
After downloading and untar the file "boost_1_56_0.tar.gz", I have installed Boost C++ library version "boost_1_56_0" in CentOS Linux.
I have run the following commands to install:
sudo ./bootstrap.sh --prefix=/usr/local
sudo ./b2 install.
I also added two paths to the PATH variable:
export PATH=$PATH:/usr/local/include/:/usr/local/lib/
It has been successfully installed. However when I checked the version it showed different version:
$ cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"
#define BOOST_LIB_VERSION "1_33_1"
I have tried to install boost_1_55_0 as well in another folder but unfortunately still it shows version 1_33_1.
Can anyone here tell me how I can fix this issue?
Because of this issue, I am unable to configure Graph_tool; it shows following error:
checking for boostlib >= 1.53.0... configure: error: We could not detect the boost libraries (version 1.53 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation>
Your bootstrap path is /usr/local. Make sure your BOOST_ROOT points to your bootstrapped folder, not the installed 1.33 version.
On Ubuntu there is a command to install boost libraries which is something like this:
sudo apt-get install libboost-all-dev
does this command also install and compile the header-only libraries?
If not, what other terminal command would I need to execute so that I can install the FULL set of boost libraries?
My ultimate aim is to know which linux terminal commands I need to install (and have available) to obtain all of the boost libraries.
As is implied by "header only", one does not need to compile the header-only libraries. They're just headers.
Now, the libbost-all-dev package does install those libraries which need compilation (in addition to the header-only libs), but it does not compile them on the spot. Ubuntu is a so-called binary distribution, which means that it distributes packages in compiled form. Apt downloads the binaries and installs them immediately. This is in contrast to e.g. Gentoo which is a source distribution (and compiles everything on your machine).
In short, no further commands are necessary. Installing libbost-all-dev will install all available Boost libraries on Ubuntu.
Your questions, as posed, makes no sense.
The Debian / Ubuntu package libboost-all-dev has dependencies, and those dependencies do include the few binary library packages (eg Boost Thread, the formatting parts of Boost DateTime, etc pp). All those will get installed.
And yes, the intent of this meta package is to install the rest of the Boost development environment.
But it does not compile anything. All Debian / Ubuntu packages are pre-generated and built-offline and "just installed" at your end.
You can inspect the content of a package by browsing the online database.
But if you are only interested in header-only libraries I suggest to download the latest version of the boost libraries right from the official website; you should also learn how to build boost from the source because it's a know-how that you are very likely to use in a near future if you are relying on that library.
An equivalent step to browsing the online database, it's about using the following command
apt-cache show <package>
so, in your case
apt-cache show libboost-all-dev
and this will give you a very specific idea about what you are about to install.