problems with ./configure for libtorrent on linux
Asked Answered
V

7

7

Hell I have been having an extremely tough time installing libtorrent and am unsure what the problems are. I have seen plenty similar errors online but the solutions were not helpful and I am pretty sure the error message is just too vague for comparison.

When I run ./configure I get

**

Building libtorrent-rasterbar 0.16.5

Checking for a C/C++ compiler to use:
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking whether gcc and cc understand -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether g++ understands -c and -o together... yes
.
..
.
Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
configure: error: Boost.System library not found. Try using --with-boost-system=lib

**

I then use the suggestion and the difference is that the bottom says

**

Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
checking for exit in -llib... no
checking for exit in -lboost_system-lib... no
configure: error: Could not link against boost_system-lib !

**

the config.log file has an error

**

configure:16572: result: no
configure:16537: checking for exit in -lboost_system-lib
configure:16562: gcc -o conftest -lpthread -g -O2 -fvisibility=hidden  -I/usr/include  -L/usr/lib conftest.c -lboost_system-lib  -lpthread   >&5
conftest.c:33: warning: conflicting types for built-in function 'exit'
/usr/bin/ld: cannot find -lboost_system-lib
collect2: ld returned 1 exit status

**

Any insight would be enormously appreciated

after installing

apt-get install libboost-system-dev

apt-get install libboost-filesystem-dev libboost-thread-dev

Checking features to be enabled:
checking whether encryption support should be enabled... yes
configure: encryption support: now checking for the OpenSSL library...
checking for pkg-config... /usr/bin/pkg-config
checking for openssl/ssl.h in /usr/local/ssl... no
checking for openssl/ssl.h in /usr/lib/ssl... no
checking for openssl/ssl.h in /usr/ssl... no
checking for openssl/ssl.h in /usr/pkg... no
checking for openssl/ssl.h in /usr/local... no
checking for openssl/ssl.h in /usr... no
checking whether compiling and linking against OpenSSL works... no
configure: error: OpenSSL library not found. Try using --with-openssl=DIR or disabling encryption at all.
Varietal answered 24/10, 2012 at 21:51 Comment(1)
check my answer for opensslAndromede
C
12

You need to install libboost-system.

If you are using Debian/Ubuntu, use apt-get as follows.

$ apt-get install libboost-system-dev

You may also need to install ...

$ apt-get install libboost-filesystem-dev libboost-thread-dev
Cocci answered 24/10, 2012 at 22:5 Comment(1)
hmmmm now I get the error---------- checking whether compiling and linking against OpenSSL works... no configure: error: OpenSSL library not found. Try using --with-openssl=DIR or disabling encryption at all.Varietal
J
4

The easiest way to install all the dependencies is with apt-get.

sudo apt-get build-dep python-libtorrent
Jegger answered 28/3, 2013 at 1:55 Comment(0)
A
3

I know this is a bit old, but to solve your OpenSSL problem you need to install the OpenSSL libraries with sudo apt-get install libssl-dev.

Andromede answered 25/1, 2015 at 3:9 Comment(0)
C
2

For CentOS users, you will want to install boost-devel.

# yum install boost-devel

But I still got the same error. Just want to point out one more thing, the CentOS 6.4 I work with had an old gcc compiler:

# g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Installing a newer version of gcc helped me to get rid of that particular error. I used g++ (GCC) 4.8.2 version and this time calling the following command worked:

# ./configure --with-boost-libdir=/usr/lib64

After this point you might still run into not finding openssl headers like the OP posted here, this post will help to overcome the error. You may have to install openssl-devel (for CentOS) or libssl-dev (for Debian), or you can run with

# ./configure --with-boost-libdir=/usr/lib64 --without-ssl

If you have openssl headers installed in your system, you don't need to use --with-openssl flag, or at least I didn't need to use it.

Although this is old post, hope it will help someone else like me.

Crew answered 19/1, 2015 at 6:45 Comment(1)
really helped @Zobayer Hasan :)Wingover
G
0

To avoid OpenSSL issues you can build "libtorrent-rasterbar" disabling OpenSSL encryption.

For instance:

./configure --disable-debug --disable-encryption --prefix=/opt/libtorrent-rasterbar

And then "make" + "make install"

Regards

Grinder answered 18/3, 2016 at 1:25 Comment(0)
S
0

The accepted answer didn't work for me. What did work was editing the configure script file and removing those lines from it:

if test -z "$BOOST_SYSTEM_LIB"; then :
  as_fn_error $? "Boost.System library not found. Try using --with-boost-system=lib" "$LINENO" 5
fi

Those lines seemed to check that the BOOST_SYSTEM_LIB environment variable exists and is not empty.

Serialize answered 15/1, 2017 at 20:55 Comment(0)
B
0

For Arch users (ex. Manjaro) install the boost pkg from pacman. Search for "boost" and install from Official Repo(extra).

Blown answered 17/10, 2022 at 9:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.