rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.05k stars 412 forks source link

Debian 11 build failure #1110

Closed jomajm closed 2 years ago

jomajm commented 2 years ago

I have executed following to build libtorrent: autoreconf -i -f ./configure --enable-static --disable-shared --disable-debug --with-xmlrpc-c --prefix=/dev/shm/lto make -j5 make install this works fine, now rtorrent: autoreconf -i -f

configure:7406: error: possibly undefined macro: PKG_CHECK_EXISTS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

from file scripts/ax_with_curses.m4 if I remove ' AX_REQUIRE_DEFINED([PKG_CHECK_EXISTS])' autoreconf -i -f ./configure --enable-static --disable-shared --disable-debug --with-xmlrpc-c --prefix=/dev/shm/lto make -j5 this throws following issue:

      |       ^~~~~~~~~~~~~~
rm -f libsub_root.a
ar cru libsub_root.a core/curl_get.o core/curl_socket.o core/curl_stack.o core/dht_manager.o core/download.o core/download_factory.o core/download_list.o core/download_store.o core/http_queue.o core/manager.o core/poll_manager.o core/view.o core/view_manager.o display/canvas.o display/frame.o display/manager.o display/utils.o display/text_element_list.o display/text_element_string.o display/text_element_value.o display/window.o display/window_download_chunks_seen.o display/window_download_list.o display/window_download_statusbar.o display/window_download_transfer_list.o display/window_file_list.o display/window_http_queue.o display/window_input.o display/window_log.o display/window_log_complete.o display/window_peer_list.o display/window_statusbar.o display/window_string_list.o display/window_text.o display/window_title.o display/window_tracker_list.o input/bindings.o input/input_event.o input/manager.o input/path_input.o input/text_input.o rpc/command.o rpc/command_map.o rpc/command_scheduler.o rpc/command_scheduler_item.o rpc/exec_file.o rpc/object_storage.o rpc/parse.o rpc/parse_commands.o rpc/parse_options.o rpc/scgi.o rpc/scgi_task.o rpc/xmlrpc.o ui/download.o ui/download_list.o ui/element_base.o ui/element_chunks_seen.o ui/element_download_list.o ui/element_file_list.o ui/element_log_complete.o ui/element_menu.o ui/element_peer_list.o ui/element_string_list.o ui/element_text.o ui/element_tracker_list.o ui/element_transfer_list.o ui/root.o utils/directory.o utils/file_status_cache.o utils/lockfile.o utils/socket_fd.o command_download.o command_dynamic.o command_events.o command_file.o command_ip.o command_helpers.o command_groups.o command_local.o command_logging.o command_network.o command_peer.o command_throttle.o command_tracker.o command_scheduler.o command_ui.o control.o globals.o option_parser.o signal_handler.o thread_base.o thread_worker.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libsub_root.a
g++ -std=c++14  -g -O2 -DNDEBUG -Wall -I/usr/include  -pthread   -I/usr/include/x86_64-linux-gnu -I/dev/shm/lto/include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600   -o rtorrent main.o libsub_root.a -lpthread -lpthread  -lncursesw -ltinfo   -lcurl -L/dev/shm/lto/lib -ltorrent  -L/usr/lib/x86_64-linux-gnu   -lxmlrpc_server -lxmlrpc  -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util
/usr/bin/ld: /dev/shm/lto/lib/libtorrent.a(diffie_hellman.o): undefined reference to symbol 'BN_num_bits@@OPENSSL_1_1_0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:887: rtorrent] Error 1

With debian 10 I have no build issue

PRESFIL commented 2 years ago

Can confirm this issue on Manjaro.

Autoconf version: autoconf == 2.71-1

csgithubgamer commented 2 years ago

Debian 7

sudo apt-get install rtorrent

I can't install rtorrent client, because is no access to this file: Failed to get http://ftp.fr.debian.org/debian/pool/main/x/xmlrpc-c/libxmlrpc-core-c3_1.16.33-3.2_amd64.deb 404 Not Found [IP: 212.27.32.66 80 How to solve this problem? Do you have a script for manual installation rtorrent?

PRESFIL commented 2 years ago

@csgithubgamer, i this your message is offtopic. :eyes:

Maybe you need sudo apt-get update to sync apt's database.

ponasromas commented 2 years ago

Debian 7

sudo apt-get install rtorrent

I can't install rtorrent client, because is no access to this file: Failed to get http://ftp.fr.debian.org/debian/pool/main/x/xmlrpc-c/libxmlrpc-core-c3_1.16.33-3.2_amd64.deb 404 Not Found [IP: 212.27.32.66 80 How to solve this problem?

Upgrade your debian version! Version 7 is out of support for years now.

PRESFIL commented 2 years ago

On Manjaro (and Arch, probably) autoconf-archive required as build-dependency. Installing it before build fixes this issue.

See original thread.

jomajm commented 2 years ago

after installing autoconf-archive configuration works, however it fails with:

make  all-recursive
make[1]: Entering directory '/dev/shm/rtorrent'
Making all in doc
make[2]: Entering directory '/dev/shm/rtorrent/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/dev/shm/rtorrent/doc'
Making all in src
make[2]: Entering directory '/dev/shm/rtorrent/src'
g++ -std=c++14  -g -O2 -DNDEBUG -Wall -I/usr/include  -pthread   -I/usr/include/x86_64-linux-gnu -I/dev/shm/lto/include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600   -o rtorrent main.o libsub_root.a -lpthread -lpthread  -lncursesw -ltinfo   -lcurl -L/dev/shm/lto/lib -ltorrent  -L/usr/lib/x86_64-linux-gnu   -lxmlrpc_server -lxmlrpc  -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util 
/usr/bin/ld: /dev/shm/lto/lib/libtorrent.a(diffie_hellman.o): undefined reference to symbol 'BN_num_bits@@OPENSSL_1_1_0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:887: rtorrent] Error 1
make[2]: Leaving directory '/dev/shm/rtorrent/src'
make[1]: *** [Makefile:426: all-recursive] Error 1
make[1]: Leaving directory '/dev/shm/rtor

BN_num_bits@@OPENSSL_1_1_0 - do i need to have specific openssl version ? I have this one:

ii  openssl                              1.1.1k-1                              amd64        Secure Sockets Layer toolkit - cryptographic utility
PRESFIL commented 2 years ago

I have same version...

jomajm commented 2 years ago

adding -lcrypto -lz to the linker helped.

g++ -std=c++14  -g -O2 -DNDEBUG -Wall -I/usr/include  -pthread   -I/usr/include/x86_64-linux-gnu -I/dev/shm/lto/include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600   -o rtorrent main.o libsub_root.a -lpthread -lpthread  -lncursesw -ltinfo   -lcurl -L/dev/shm/lto/lib -ltorrent  -L/usr/lib/x86_64-linux-gnu   -lxmlrpc_server -lxmlrpc  -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util **-lcrypto -lz**
wuyongzheng commented 8 months ago

I can confirm the problem in Fedora 39, autoconf 2.71, automake 1.16.5, gcc 13.2.1.

$ autoreconf -fi
configure:8312: error: possibly undefined macro: PKG_CHECK_EXISTS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /usr/bin/autoconf failed with exit status: 1

After removing the line AX_REQUIRE_DEFINED([PKG_CHECK_EXISTS]) from ax_with_curses.m4, everything works like a charm.