Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Issue 0.10.0 #1393

Open
Wisplike3820 opened this issue Feb 1, 2025 · 3 comments
Open

Build Issue 0.10.0 #1393

Wisplike3820 opened this issue Feb 1, 2025 · 3 comments

Comments

@Wisplike3820
Copy link

Wisplike3820 commented Feb 1, 2025

Getting some unusual error while building rtorrent 0.10.0 DSO missing from command line

I use the same build parameters to build older versions but only this new version fails

Log

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  -w  -O3  -L/usr/local/lib64/ -l:libcrypto.a -o rtorrent main.o libsub_root.a -lpthread -lpthread  -lncursesw -ltinfo -lcppunit  -lcurl -L/usr/local/lib -ltorrent  -L/usr/local/lib   -lxmlrpc_server -lxmlrpc  -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lpthread 
/usr/bin/ld: /usr/local/lib/libtorrent.a(diffie_hellman.o): undefined reference to symbol 'BN_num_bits@@OPENSSL_3.0.0'
/usr/bin/ld: /usr/local/lib64/libcrypto.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:888: rtorrent] Error 1

Exact Error

/usr/bin/ld: /usr/local/lib/libtorrent.a(diffie_hellman.o): undefined reference to symbol 'BN_num_bits@@OPENSSL_3.0.0'
/usr/bin/ld: /usr/local/lib64/libcrypto.so.3: error adding symbols: DSO missing from command line

I did some googling and found that adding -Wl,--copy-dt-needed-entries as CXXFLAGS solves this issue. I learnt that this flag ensures all required libraries are included even if not explicitly specified.

Can anyone tell me which library needs to be explicity specified?

@rakshasa
Copy link
Owner

rakshasa commented Feb 1, 2025

Need details on what you're compiling on, cpu/distro/compiler etc.

@Wisplike3820
Copy link
Author

Need details on what you're compiling on, cpu/distro/compiler etc.

Here it is:
CPU: 13th Gen Intel(R) Core(TM) i5-1340P
Distro: Ubuntu 22.04
Compiler: gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~22.04) (Also tested with gcc v11)

@rakshasa
Copy link
Owner

rakshasa commented Feb 4, 2025

Compiled fine on a newly installed Ubuntu 22.04.5 docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants