Ticket #1182 (new defect)

Opened 4 years ago

Last modified 4 years ago

PKG_CONFIG_PATH doesn't stop the make from trying to use old version of libtorrent

Reported by: nullstring@terra.chuui.jp Owned by: rakshasa
Priority: low Component: libtorrent
Version: Severity: minor
Keywords: pkg-config Cc:

Description

I don't exactly understand how all of this works as of yet, so bear with me.

Problem: when trying to compile and install libtorrent and rtorrent with a prefix. rtorrent still wants to be compiled using the version of libtorrent found in /usr/local/lib.

Quick Fix: uninstall current version of libtorrent temporarily

Here is an example:

circumstances-

  • rtorrent 0.7.7 and libtorrent 0.11.7 currently installed
  • compiling rtorrent 0.7.9:
    • libtorrent 0.11.9 installed at /home/byan/rtorrent (using prefix with ./configure)
    • export PKG_CONFIG_PATH=/home/byan/rtorrent/lib/pkgconfig
    • ./configure prefix=/home/byan/rtorrent
      • configure works

make fails because it wants to use the wrong version of libtorrent

make[3]: Entering directory `/home/byan/rtorrent/rtorrent-0.7.9/src'
/bin/sh ../libtool --tag=CXX --mode=link g++  -O2 -Wall -g -DDEBUG -I/home/byan/rtorrent/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include     -o rtorrent  command_download.o command_events.o command_file.o command_helpers.o command_local.o command_network.o command_peer.o command_tracker.o command_ui.o control.o globals.o main.o option_parser.o signal_handler.o ../src/ui/libsub_ui.a ../src/core/libsub_core.a ../src/display/libsub_display.a ../src/input/libsub_input.a ../src/rpc/libsub_rpc.a ../src/utils/libsub_utils.a -lncurses  -L/home/byan/rtorrent/lib -lsigc-2.0 -lcurl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support -lresolv -lidn -ldl -lssl -lcrypto -lz -ltorrent
g++ -O2 -Wall -g -DDEBUG -I/home/byan/rtorrent/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -o rtorrent command_download.o command_events.o command_file.o command_helpers.o command_local.o command_network.o command_peer.o command_tracker.o command_ui.o control.o globals.o main.o option_parser.o signal_handler.o  ../src/ui/libsub_ui.a ../src/core/libsub_core.a ../src/display/libsub_display.a ../src/input/libsub_input.a ../src/rpc/libsub_rpc.a ../src/utils/libsub_utils.a -lncurses -L/home/byan/rtorrent/lib /usr/lib/libcurl.so -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support -lresolv /usr/lib/libidn.so -ldl -lssl -lz /usr/local/lib/libtorrent.so -lcrypto /usr/lib/libsigc-2.0.so -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
command_download.o: In function `initialize_command_download()':
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:394: undefined reference to `torrent::Download::is_private() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:394: undefined reference to `torrent::Download::is_private() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:395: undefined reference to `torrent::Download::is_pex_active() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:395: undefined reference to `torrent::Download::is_pex_active() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:453: undefined reference to `torrent::Download::set_pex_enabled(bool)'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:453: undefined reference to `torrent::Download::set_pex_enabled(bool)'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:453: undefined reference to `torrent::Download::is_pex_enabled() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:453: undefined reference to `torrent::Download::is_pex_enabled() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:471: undefined reference to `torrent::Download::size_pex() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:471: undefined reference to `torrent::Download::size_pex() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:472: undefined reference to `torrent::Download::max_size_pex() const'
/home/byan/rtorrent/rtorrent-0.7.9/src/command_download.cc:472: undefined reference to `torrent::Download::max_size_pex() const'
../src/core/libsub_core.a(download_list.o): In function `core::DownloadList::close_directly(core::Download*)':
/home/byan/rtorrent/rtorrent-0.7.9/src/core/download_list.cc:256: undefined reference to `torrent::Download::stop2(int)'
../src/core/libsub_core.a(download_list.o): In function `core::DownloadList::resume(core::Download*, int)':
/home/byan/rtorrent/rtorrent-0.7.9/src/core/download_list.cc:410: undefined reference to `torrent::Download::start2(int)'
../src/core/libsub_core.a(download_list.o): In function `core::DownloadList::pause(core::Download*, int)':
/home/byan/rtorrent/rtorrent-0.7.9/src/core/download_list.cc:441: undefined reference to `torrent::Download::stop2(int)'
collect2: ld returned 1 exit status
make[3]: *** [rtorrent] Error 1
make[3]: Leaving directory `/home/byan/rtorrent/rtorrent-0.7.9/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/byan/rtorrent/rtorrent-0.7.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/byan/rtorrent/rtorrent-0.7.9'
make: *** [all] Error 2
byan@peer:~/rtorrent/rtorrent-0.7.9$

Change History

Changed 4 years ago by anonymous

Try make DEFS=-L/home/byan/rtorrent/lib

Changed 4 years ago by nullstring@terra.chuui.jp

make DEFS=-L/home/byan/rtorrent/lib did not work.

Changed 4 years ago by anonymous

Try LD_LIBRARY_PATH=/home/byan/rtorrent/lib Or DYLD_LIBRARY_PATH=/home/byan/rtorrent/lib (if on OSX or BSD I think)

Changed 4 years ago by anonymous

I have the same problem and the above solutions didn't work

Changed 4 years ago by anonymous

If you have this problem, it means the linker is trying to link in an old version of the library. Try uninstalling any old version you have first.

Also I think the configure option to use is "LDFLAGS=-L/home/byan/rtorrent/lib". Or wherever you installed libtorrent.

Note: See TracTickets for help on using tickets.