Page 1 of 1

problem when build with boost version

Posted: Thu Jul 17, 2014 1:46 pm
by iZeus83
Hi all.

I have installed centos 7 with boost 1.55 version, libtorrent-rasterbar 1.0, but when I'm trying to build deluge stable 1.3 from SVN then I get this error:

Code: Select all

gcc -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I./libtorrent -I./libtorrent/include -I./libtorrent/include/libtorrent -I/usr/include/python2.7 -I/usr/include -I -I/usr/include/python2.7 -c ./libtorrent/src/magnet_uri.cpp -o build/temp.linux-x86_64-2.7/./libtorrent/src/magnet_uri.o -D_FILE_OFFSET_BITS=64 -DNDEBUG -DTORRENT_USE_OPENSSL=1 -DBOOST_FILESYSTEM_VERSION=2 -DBOOST_ASIO_SEPARATE_COMPILATION -O2 -Wno-missing-braces
In file included from /usr/local/include/boost/filesystem/path.hpp:24:0,
                 from ./libtorrent/include/libtorrent/torrent_info.hpp:45,
                 from ./libtorrent/include/libtorrent/torrent_handle.hpp:52,
                 from ./libtorrent/include/libtorrent/magnet_uri.hpp:38,
                 from ./libtorrent/src/magnet_uri.cpp:33:
/usr/local/include/boost/filesystem/config.hpp:16:5: error: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
 #   error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
     ^
./libtorrent/src/magnet_uri.cpp: En la función ‘libtorrent::torrent_handle libtorrent::add_magnet_uri(libtorrent::session&, const string&, const boost::filesystem::path&, libtorrent::storage_mode_t, bool, libtorrent::storage_constructor_type, void*)’:
./libtorrent/src/magnet_uri.cpp:120:40: aviso: ‘libtorrent::torrent_handle libtorrent::session::add_torrent(const char*, const sha1_hash&, const char*, const boost::filesystem::path&, const libtorrent::entry&, libtorrent::storage_mode_t, bool, libtorrent::storage_constructor_type, void*)’ es obsoleto (declarado en ./libtorrent/include/libtorrent/session.hpp:205) [-Wdeprecated-declarations]
    , storage_mode, paused, sc, userdata);
                                        ^
error: command 'gcc' failed with exit status 1
Please any help with this problem of boost?, thanks in advanced...

Re: problem when build with boost version

Posted: Fri Jul 18, 2014 1:48 pm
by Cas
The problem as stated is that in setup.py -DBOOST_FILESYSTEM_VERSION=2 is defined, when it should not be for boost >=1.49. Realistically you should build and install libtorrent separately (including python bindings), if you are having issues with this you will need to ask for help on libtorrent mailing list.

If you follow the ubuntu steps, apart from using checkinstall as that's distro specific: http://dev.deluge-torrent.org/wiki/Buil ... ent#Ubuntu

Re: problem when build with boost version

Posted: Sat Jul 19, 2014 9:26 am
by iZeus83
thanks cas for reply.

well, the problem with boost version is gone because I'm using an older version of boost.

I tried to compile and build "libtorrent-rasterbar-0.16.17" and finally I added this:
export LD_LIBRARY_PATH=/usr/local/lib/

Now if I try to build and install deluge then I get success message but if I type "deluge -v", then I see only

(deluge: 1.3.7)

but it seems libtorrent is missing?

P.D. well, I executed deluged and get this:

Code: Select all

[ERROR   ] 11:37:53 main:237 dynamic module does not define init function (initlibtorrent)
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/deluge-1.3.7_dev-py2.7-linux-x86_64.egg/deluge/main.py", line 230, in start_daemon
    Daemon(options, args)
  File "/usr/lib64/python2.7/site-packages/deluge-1.3.7_dev-py2.7-linux-x86_64.egg/deluge/core/daemon.py", line 136, in __init__
    from deluge.core.core import Core
  File "/usr/lib64/python2.7/site-packages/deluge-1.3.7_dev-py2.7-linux-x86_64.egg/deluge/core/core.py", line 36, in <module>
    from deluge._libtorrent import lt
  File "/usr/lib64/python2.7/site-packages/deluge-1.3.7_dev-py2.7-linux-x86_64.egg/deluge/_libtorrent.py", line 59, in <module>
    import libtorrent as lt
ImportError: dynamic module does not define init function (initlibtorrent)
Maybe the problem is the version of python?

Re: problem when build with boost version

Posted: Sat Jul 19, 2014 11:10 am
by Cas
I think that means that the python libtorrent bindings can't find the libtorrent lib, possibly because you changed the path. I can see that python in in /usr/lib64 which might be a hint at the issue...

Re: problem when build with boost version

Posted: Sat Jul 19, 2014 4:48 pm
by iZeus83
but you mean the path from python? or maybe the path of deluge?

When installing deluge I see that is using python with this command line:

/usr/bin/python setup.py install --prefix=/usr/local

P.D. It seems the problem resides in boost location because I've installed in /usr/local/lib and not in /usr/lib64...

The last command that I used is ldd to verify the linker:

P.D. NEW

I've searched in other forums about the problem, the last trying was:

In libtorrent-0_16_17 directory, I used the command python (import libtorrent) and fine without any errors if I use "export LD_LIBRARY_PATH=/usr/local/lib" but if I change to "export LD_LIBRARY_PATH=/usr/lib64" then Iget the error when I'm trying to import libtorrent.

So the correct path is /usr/local/lib...so how can I fix the installation of deluge to set in that directory?

Another try for me was reinstalling deluge again, this is the output when finish:

Code: Select all

building 'libtorrent' extension
gcc -pthread -shared -Wl,-z,relro -L/usr/lib64 -L/opt/local/lib -L/usr/local/lib -L. -lboost_filesystem -lboost_date_time -lboost_iostreams -lboost_python -lboost_thread -lpthread -lssl -lz -lpython2.7 -o build/lib.linux-x86_64-2.7/deluge/libtorrent.so
and this is when install was finish:

Code: Select all

creating /usr/lib64/python2.7/site-packages/deluge-1.3.7_dev-py2.7-linux-x86_64.egg
Extracting deluge-1.3.7_dev-py2.7-linux-x86_64.egg to /usr/lib64/python2.7/site-packages
Adding deluge 1.3.7-dev to easy-install.pth file
Installing deluge-console script to /usr/bin
Installing deluged script to /usr/bin
Installing deluge-web script to /usr/bin
Installing deluge-gtk script to /usr/bin
Installing deluge script to /usr/bin

Installed /usr/lib64/python2.7/site-packages/deluge-1.3.7_dev-py2.7-linux-x86_64.egg
thanks

Re: problem when build with boost version

Posted: Sun Jul 20, 2014 2:20 pm
by iZeus83
Well finally I fixed the issue, the problem was with deluge.

If I remember well, when I tried to install deluge for the fist time, libtorrent was downloading but 0.14 version from SVN. So I removed the libtorrent folder inside deluge and I put the other one (0.16_17), and now I get deluge running fine.

But why deluge is trying to download that version of libtorrent?.

Thanks, so now I'm on Centos 7 and it seems this uses systemd :/