How can I let Graph-tool find boost libraries and install it? - boost

I am trying to install Graph-tool, but the following error is returned.
./cofigure
...
...
graph-tool will be installed at: /home/my_name/anaconda2/lib/python2.7/site-packages
===========================
Using python version: 2.7.12
===========================
checking for boostlib >= 1.54.0... configure: We could not detect the boost libraries (version 1.54 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 <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
checking whether the Boost::Python library is available... yes
checking whether boost_python is the correct library... yes
checking whether the Boost::IOStreams library is available... yes
configure: error: Could not link against boost_python !
It seems this error is same as
Installing Thrift on CentOS: can't find Boost 1.40 or higher
. So I guess I should make an appropriate symbolic link to let the configure file find the path to the boost libraries. But I'm not sure where I should make the link because the result of "find" command is different from the asker of the above-mentioned question.
[root#localhost my_name]# su
[root#localhost my_name]# find / -name boost
/home/my_name/python/graph-tool-2.19/src/boost-workaround/boost
/home/my_name/boost_1_63_0/doc/html/boost
/home/my_name/boost_1_63_0/doc/test/gold/boost
/home/my_name/boost_1_63_0/tools/boostbook/test/doxygen/boost
/home/my_name/boost_1_63_0/boost
/home/my_name/boost_1_63_0/boost/chrono/typeof/boost
/home/my_name/boost_1_63_0/boost/hana/ext/boost
/home/my_name/boost_1_63_0/libs/sort/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/sort/doc/html/boost
/home/my_name/boost_1_63_0/libs/chrono/stopwatches/include/boost
/home/my_name/boost_1_63_0/libs/hana/example/ext/boost
/home/my_name/boost_1_63_0/libs/hana/test/ext/boost
/home/my_name/boost_1_63_0/libs/vmd/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/convert/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/convert/doc/html/boost
/home/my_name/boost_1_63_0/libs/functional/overloaded_function/doc/html/boost
/home/my_name/boost_1_63_0/libs/math/include_private/boost
/home/my_name/boost_1_63_0/libs/compute/doc/html/boost
/home/my_name/boost_1_63_0/libs/pool/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/pool/doc/html/boost
/home/my_name/boost_1_63_0/libs/log/doc/html/boost
/home/my_name/boost_1_63_0/libs/tti/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/tti/doc/html/boost
/home/my_name/boost_1_63_0/libs/icl/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/icl/doc/html/boost
/home/my_name/boost_1_63_0/libs/numeric/odeint/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/numeric/odeint/doc/html/boost
/home/my_name/boost_1_63_0/libs/core/doc/html/boost
/home/my_name/boost_1_63_0/libs/test/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/test/doc/html/boost
/usr/local/cuda-8.0/samples/6_Advanced/interval/boost
/usr/include/boost
Does anybody know how to solve this problem ? Thank you very much in advance.

After posting this question, I managed to solve this problem by my self.
It seems the error occurred because the Boost was actually not installed properly.
This time, I did:
$ cd /usr/local
$ tar --bzip2 -xf boost_1_63_0.tar.bz2
$ cd boost_1_63_0.tar.bz2
$ sh ./bootstrap.sh
$ sudo ./b2 install
Then, I found the following directories.
$ sudo find / -name boost
/home/tokudakeita/python/graph-tool-2.19/src/boost-workaround/boost
/usr/local/boost_1_63_0/doc/html/boost
/usr/local/boost_1_63_0/doc/test/gold/boost
/usr/local/boost_1_63_0/tools/boostbook/test/doxygen/boost
/usr/local/boost_1_63_0/boost
/usr/local/boost_1_63_0/boost/chrono/typeof/boost
/usr/local/boost_1_63_0/boost/hana/ext/boost
/usr/local/boost_1_63_0/libs/sort/doc/html/header/boost
/usr/local/boost_1_63_0/libs/sort/doc/html/boost
/usr/local/boost_1_63_0/libs/chrono/stopwatches/include/boost
/usr/local/boost_1_63_0/libs/hana/example/ext/boost
/usr/local/boost_1_63_0/libs/hana/test/ext/boost
/usr/local/boost_1_63_0/libs/vmd/doc/html/header/boost
/usr/local/boost_1_63_0/libs/convert/doc/html/header/boost
/usr/local/boost_1_63_0/libs/convert/doc/html/boost
/usr/local/boost_1_63_0/libs/functional/overloaded_function/doc/html/boost
/usr/local/boost_1_63_0/libs/math/include_private/boost
/usr/local/boost_1_63_0/libs/compute/doc/html/boost
/usr/local/boost_1_63_0/libs/pool/doc/html/header/boost
/usr/local/boost_1_63_0/libs/pool/doc/html/boost
/usr/local/boost_1_63_0/libs/log/doc/html/boost
/usr/local/boost_1_63_0/libs/tti/doc/html/header/boost
/usr/local/boost_1_63_0/libs/tti/doc/html/boost
/usr/local/boost_1_63_0/libs/icl/doc/html/header/boost
/usr/local/boost_1_63_0/libs/icl/doc/html/boost
/usr/local/boost_1_63_0/libs/numeric/odeint/doc/html/header/boost
/usr/local/boost_1_63_0/libs/numeric/odeint/doc/html/boost
/usr/local/boost_1_63_0/libs/core/doc/html/boost
/usr/local/boost_1_63_0/libs/test/doc/html/header/boost
/usr/local/boost_1_63_0/libs/test/doc/html/boost
/usr/local/cuda-8.0/samples/6_Advanced/interval/boost
/usr/local/include/boost
/usr/local/include/boost/chrono/typeof/boost
/usr/local/include/boost/hana/ext/boost
What I found was that just
$ ./b2
does not create the following directories:
/usr/local/include/boost
/usr/local/include/boost/chrono/typeof/boost
/usr/local/include/boost/hana/ext/boost
But the following command made the above directories:
$ sudo ./b2 install
Then, the configure file of the Graph-tool successfully found boost.

Related

/usr/bin/ld: cannot find -lauparse

How can I install the auparse library on Fedora 26?
$ gcc -lauparse me.c
/usr/bin/ld: cannot find -lauparse
I have tried many things, including these.
$ sudo find / -name *auparse.so
/usr/lib64/python3.6/site-packages/auparse.so
$ export LD_LIBRARY_PATH=/usr/lib64/python3.6/site-packages/
didnt help :{
sudo ln -s /usr/lib64/python3.6/site-packages/auparse.so /usr/lib/gcc/x86_64-redhat-linux/7/auparse.so
didnt help :{
$ pkg-config --libs auparse
Package auparse was not found in the pkg-config search path.
I'd really appreciate help.
You need audit-libs-devel. Here's how I found that:
$ sudo dnf install /usr/lib64/libauparse.so
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
audit-libs-devel x86_64 2.7.7-1.fc26 updates-testing 81 k
In general:
Libraries are gonna be in /usr/lib64 on x86_64 systems.
-lsomething means to look for /usr/lib64/libsomething.so
And DNF has this neat feature where it can find things by file, so there you go.
Also, for most libraries on Fedora, there's a runtime package (here, audit-libs and then a devel package (audit-libs-devel) which contains the .so symlink and usually header files and stuff.

Compiling FileZilla on OSX

I've been trying to compile the FileZilla versions 3.11 and 3.24 on Mac for a research project but when I run ../configure I get the following error:
configure: error: libgnutls 3.1.12 greater was not found. You can get it from http://gnutls.org/
However, I've installed gnutls using homebrew; when I run
brew list gnutls
I can see the library installed at /usr/local/Cellar/gnutls/3.5.8/
Any ideas to resolve the problem are appreciated. Thanks
Updated Answer
It seems that GNUtls, as installed by homebrew ships with a pkgconfig file. So, you need to install pkgconfig if you don't have it already using:
brew install pkgconfig
Then, once you have that, you can find the compiler include file settings with:
pkg-config --cflags gnutls
Sample Output
-I/usr/local/Cellar/gnutls/3.5.8/include -I/usr/local/Cellar/nettle/3.3/include -I/usr/local/Cellar/libtasn1/4.10/include -I/usr/local/Cellar/p11-kit/0.23.3/include/p11-kit-1
And the linker library settings with:
pkg-config --libs gnutls
Sample Output
-L/usr/local/Cellar/gnutls/3.5.8/lib -lgnutls
So, we (just) need to convey that information to FileZilla. So, first we run:
./configure --help | grep -i utls
Sample Output
--enable-gnutlssystemciphers
Enables the use of gnutls system ciphers.
LIBGNUTLS_CFLAGS
C compiler flags for LIBGNUTLS, overriding pkg-config
LIBGNUTLS_LIBS
linker flags for LIBGNUTLS, overriding pkg-config
So it looks like we need to do something like:
export LIBGNUTLS_CFLAGS=$(pkg-config --cflags gnutls)
export LIBGNUTLS_LIBS=$(pkg-config --libs gnutls)
./configure
Original Answer
I haven't tried this with FileZilla, but I use it with other packages, and there is nothing to lose...
If homebrew has installed your GNUtls in /usr/local/Cellar/gnutls/3.5.8/, you could try telling FileZilla that location in your configure like this:
./configure CPPFLAGS="-I/usr/local/Cellar/gnutls/3.5.8/include" LDFLAGS="-L/usr/local/Cellar/gnutls/3.5.8/lib" ... other flags

gcc unable to find shared library libisl.so

I installed gcc version 5.1 locally on a cluster having OS as CentOS where I dont have root access (so i cant use any commands like 'sudo'). (The global gcc version installed is 4.4). I also modified the path variable to include the path to my local version at the beginning of the path variable. Before, when I was trying to install boost using the global version, it worked fine. But now, when I try to install boost, it shows the following error:
/users/home/head/cmp/soft/sft/gcc/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/cc1: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory
Any ideas on how to fix this will be highly appreciated.
Follow the instructions at https://gcc.gnu.org/wiki/InstallingGCC
Specifically, don't install ISL manually in some non-standard path, because GCC needs to find its shared libraries at run-time.
The simplest solution is to use the download_prerequisites script to add the GMP, MPFR, MPC and ISL source code to the GCC source tree, which will cause GCC to build them for you automatically, and link to them statically.
I have the same issue. I solved it as follows:
Download the source code of isl available here
Unzip and install: ./configure && make && make install
cp /usr/local/lib/libisl* /usr/lib
Note: a symlink also works:
$ cd /usr/lib
$ ln -s /usr/local/lib/libisl.so.10 libisl.so.10
You can do the same in Debian distros:
apt-get install libisl-dev
Adjust the references of shared libs:
$ cp /usr/local/lib/libisl* /usr/lib
Note: a symlink also works:
$ cd /usr/lib
$ ln -s /usr/local/lib/libisl.so.10 libisl.so.10

configure: error: leptonica library missing (when building tesseract-ocr-3.01 on MinGW)

When running configure it fails with
checking for leptonica... yes
checking for pixCreate in -llept... no
configure: error: leptonica library missing
But I have leptonica 1.69 built (downloaded source and ran ./configure && make install)
Edit
I think configure: error: leptonica library missing is a bit misleading, please note that it first says checking for leptonica... yes, and then fails on checking for pixCreate in -llept... no. So maybe the problem is not that the library is missing, but something else.
I finally managed to make it compile, after reading this and this thread. The proper steps for were:
./autogen.sh
export LIBLEPT_HEADERSDIR=/local/include
./configure --with-extra-libraries=/local/lib
make install
for leptonica 1.69, lib renamed to .libs, so, parameters are
export LIBLEPT_HEADERSDIR=<your_path>/leptonica-1.69/src
./autogen.sh
./configure --prefix= --with-extra-libraries=<your_path>/leptonica-1.69/src/.libs
and so on
Maybe this could solve the issue:
export LIBLEPT_HEADERSDIR=/usr-or-other/local/include
I am working on redhat linux 7.2 . None of the solution worked for me I was getting following errors in config.log. Package lept was not found in the pkg-config search path.
Perhaps you should add the directory containing `lept.pc'
to the PKG_CONFIG_PATH environment variable PKG_CONFIG_PATH
configure script uses pkg-config utility to check for packages . It was not able to find lept package ( although i had installed leptonica seperately ) By setting PKG_CONFIG_PATH pointing to the directory where lept.pc is present , i was able to resolve the issue . export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
The FAQ addresses this issue and worked for me with tesseract 3.02.02 on Mac OSX 10.6.8.
Apart from the Leptonica library, png, jpeg, tiff libraries had to passed to the configure script with CXX and CPP flags.
To run configure as non-root -
1. LIBLEPT_HEADERSDIR=; export LIBLEPT_HEADERSDIR;
2. CXXFLAGS="-ltiff -lpng -ljpeg" CPPFLAGS="-ltiff -lpng -ljpeg" ./configure --prefix= --with-extra-libraries=
In my case, this issue was caused by a missing compiler. Searching config.log revealed the following:
./configure:17287: g++ -o conftest -I/Usr/local/include/leptonica -L/usr/local/lib conftest.cpp -llept >&5
./configure: line 2040: g++ command not found
Running apt-get install g++ solved the problem. There is an issue in the tesseract issue tracker about this.
In my case (for Ubuntu/Debian) I downloaded the latest leptonica version and the error was not fixed.
To fix it I removed the package "leptonica-dev" with sudo apt-get remove libleptonica-dev and then tesseract found the leptonica version installed from the source code.
Hope it helps!
The answer is going to be slightly different for everyone, depending on the state of your system.
At a high level, the pkg-config software needs to know that leptonica is installed. It searches paths for a .pc file that has the definition for the leptonica package. That file will be in different locations for different people.
You can find it using the Linux locate utility at the command line. locate lept.pc. (If you've done some recent installing/uninstalling, you may need to refresh the locate utilities database with the command updatedb.)
Whichever directory locate finds the file in, export PKG_CONFIG_PATH as that directory (export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig for example).
Then you can continue your configure/build.
i had a similar problem with trying to compile from source, but did not experience it with
apt-get to install tesseract
sudo apt-get install tesseract-ocr
export LIBLEPT_HEADERSDIR=$dir/letonica168/include
./autogen.sh
./configure --prefix=$anotherdir --with-extra-libraries=/$dir/letonica168/lib
make
make install

boost library gives errors on ubuntu

I am trying to compile a package on ubuntu 8.1
when executing this command: ./configure I get the follwoing error:
checking for Boost headers version >= 103700... no
configure: error: cannot find Boost headers version >= 103700
knowing that I installed needed boost packages using these command:
$ apt-get install libboost-dev libboost-graph-dev libboost-iostreams-dev
Can anybody help please?
thank you. Now it works but i get another error when running ./configure: checking boost/iostreams/device/file_descriptor.hpp usability... yes checking boost/iostreams/device/file_descriptor.hpp presence... yes checking for boost/iostreams/device/file_descriptor.hpp... yes checking for the Boost iostreams library... no configure: error: cannot not find the flags to link with Boost iostreams any ideas please?
It could be that the version of boost that you're getting from the Ubuntu repository is too old (it's suggested here that the highest version for 8.10 is 1.35; it looks like your configure script is asking for 1.37). You might need to build from source; there's some more info in the answers to the question I linked to which will hopefully help.
UPDATE:
From your new error, it sounds like configure now can't find the boost_iostreams library. On my system it's /usr/lib/libboost_iostreams-mt.[a|so] - do you have those files (possibly in a different directory depending on where you installed boost)?
You can also try running ldconfig in case there's a missing symlink (from, say,
libboost_iostreams-mt.so.1.37.0 to libboost_iostreams-mt.so).
Is this configure one generated by GNU autoconf? If it is, there should be a file called config.log in the same directory which contains a list of all the commands configure tried to run when looking for things. If there's anything in there about boost_iostreams could you post it?
One totally random guess: some examples I've found on the web link to boost_iostreams without the multi-threading suffix -mt - but I don't have those on my machine at all. Maybe your configure script is running into the same problem?
UPDATE 2
The configure script seems to be looking for a single-threaded debug build of the boost iostreams library, which won't be produced by default when building from source on linux. Also, the default on linux is not to name the libraries based on the build configuration (so the libs you found in /usr/lib might not be the ones you installed from source unless you overrode this). This stuff isn't really explained on the boost website, I only found out by looking in the Jamroot file (bjam --help works too)! Anyway, to get a library with the right build configuration, and named correctly, I need to go into the root of the boost source tree and run:
sudo bjam --with-iostreams --layout=tagged variant=debug threading=single install
For me this puts the libraries (libboost_iostreams-d.a and the shared versions) into /usr/local/lib where ld will find them by default, so this should be fine. If you need them to go somewhere else you can use the --prefix=... option to bjam eg. if you want them in /usr/lib you can do --prefix=/usr. If the package you're building needs more boost libraries you can remove the --with-iostreams and then they'll all be built (or replace iostream with the name of each other library you need).
A side note: I had to install the libbz2-dev package to get boost iostreams to build - it's easy to miss the error here if you build all of boost as there's so much output!

Resources