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

0.13.4: Check fails to link libz #58

Closed
ingmarv opened this issue May 23, 2014 · 10 comments
Closed

0.13.4: Check fails to link libz #58

ingmarv opened this issue May 23, 2014 · 10 comments

Comments

@ingmarv
Copy link

ingmarv commented May 23, 2014

libtorrent builds fine, but the tests don't build.

Log:
Making check in src
make[1]: Entering directory '/home/ingmar/Repositories/libtorrent/src'
Making check in torrent
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent'
Making check in data
make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent/data'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent/data'
Making check in download
make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent/download'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent/download'
Making check in peer
make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent/peer'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent/peer'
Making check in utils
make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent/utils'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent/utils'
make[3]: Entering directory '/home/ingmar/Repositories/libtorrent/src/torrent'
make[3]: Nothing to be done for 'check-am'.
make[3]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent'
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/torrent'
Making check in data
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/data'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/data'
Making check in dht
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/dht'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/dht'
Making check in download
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/download'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/download'
Making check in net
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/net'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/net'
Making check in protocol
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/protocol'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/protocol'
Making check in tracker
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/tracker'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/tracker'
Making check in utils
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src/utils'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src/utils'
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/src'
make[2]: Nothing to be done for 'check-am'.
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/src'
make[1]: Leaving directory '/home/ingmar/Repositories/libtorrent/src'
Making check in test
make[1]: Entering directory '/home/ingmar/Repositories/libtorrent/test'
make LibTorrentTest
make[2]: Entering directory '/home/ingmar/Repositories/libtorrent/test'
/bin/sh ../libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ -g -O2 -DNDEBUG -fvisibility=hidden -pthread -L/usr/lib64 -lcppunit -ldl -ldl -o LibTorrentTest ../src/LibTorrentTest-thread_disk.o rak/LibTorrentTest-allocators_test.o rak/LibTorrentTest-ranges_test.o data/LibTorrentTest-chunk_list_test.o data/LibTorrentTest-hash_check_queue_test.o data/LibTorrentTest-hash_queue_test.o protocol/LibTorrentTest-test_request_list.o torrent/LibTorrentTest-http_test.o torrent/LibTorrentTest-object_test.o torrent/LibTorrentTest-object_test_utils.o torrent/LibTorrentTest-object_static_map_test.o torrent/LibTorrentTest-object_stream_test.o torrent/LibTorrentTest-tracker_controller_test.o torrent/LibTorrentTest-tracker_controller_features.o torrent/LibTorrentTest-tracker_controller_requesting.o torrent/LibTorrentTest-tracker_list_test.o torrent/LibTorrentTest-tracker_list_features_test.o torrent/LibTorrentTest-tracker_timeout_test.o torrent/utils/LibTorrentTest-log_test.o torrent/utils/LibTorrentTest-log_buffer_test.o torrent/utils/LibTorrentTest-net_test.o torrent/utils/LibTorrentTest-option_strings_test.o torrent/utils/LibTorrentTest-test_extents.o torrent/utils/LibTorrentTest-test_queue_buckets.o torrent/utils/LibTorrentTest-signal_bitfield_test.o torrent/utils/LibTorrentTest-thread_base_test.o tracker/LibTorrentTest-tracker_http_test.o LibTorrentTest-main.o ../src/libtorrent.la ../src/torrent/libsub_torrent.la ../src/torrent/data/libsub_torrentdata.la ../src/torrent/download/libsub_torrentdownload.la ../src/torrent/peer/libsub_torrentpeer.la ../src/data/libsub_data.la ../src/dht/libsub_dht.la ../src/download/libsub_download.la ../src/net/libsub_net.la ../src/protocol/libsub_protocol.la ../src/tracker/libsub_tracker.la ../src/utils/libsub_utils.la ../src/torrent/utils/libsub_torrentutils.la -lcrypto
libtool: link: x86_64-pc-linux-gnu-g++ -g -O2 -DNDEBUG -fvisibility=hidden -pthread -o .libs/LibTorrentTest ../src/LibTorrentTest-thread_disk.o rak/LibTorrentTest-allocators_test.o rak/LibTorrentTest-ranges_test.o data/LibTorrentTest-chunk_list_test.o data/LibTorrentTest-hash_check_queue_test.o data/LibTorrentTest-hash_queue_test.o protocol/LibTorrentTest-test_request_list.o torrent/LibTorrentTest-http_test.o torrent/LibTorrentTest-object_test.o torrent/LibTorrentTest-object_test_utils.o torrent/LibTorrentTest-object_static_map_test.o torrent/LibTorrentTest-object_stream_test.o torrent/LibTorrentTest-tracker_controller_test.o torrent/LibTorrentTest-tracker_controller_features.o torrent/LibTorrentTest-tracker_controller_requesting.o torrent/LibTorrentTest-tracker_list_test.o torrent/LibTorrentTest-tracker_list_features_test.o torrent/LibTorrentTest-tracker_timeout_test.o torrent/utils/LibTorrentTest-log_test.o torrent/utils/LibTorrentTest-log_buffer_test.o torrent/utils/LibTorrentTest-net_test.o torrent/utils/LibTorrentTest-option_strings_test.o torrent/utils/LibTorrentTest-test_extents.o torrent/utils/LibTorrentTest-test_queue_buckets.o torrent/utils/LibTorrentTest-signal_bitfield_test.o torrent/utils/LibTorrentTest-thread_base_test.o tracker/LibTorrentTest-tracker_http_test.o LibTorrentTest-main.o -L/usr/lib64 /usr/lib64/libcppunit.so -ldl ../src/.libs/libtorrent.so ../src/torrent/.libs/libsub_torrent.a ../src/torrent/data/.libs/libsub_torrentdata.a ../src/torrent/download/.libs/libsub_torrentdownload.a ../src/torrent/peer/.libs/libsub_torrentpeer.a ../src/data/.libs/libsub_data.a ../src/dht/.libs/libsub_dht.a ../src/download/.libs/libsub_download.a ../src/net/.libs/libsub_net.a ../src/protocol/.libs/libsub_protocol.a ../src/tracker/.libs/libsub_tracker.a ../src/utils/.libs/libsub_utils.a ../src/torrent/utils/.libs/libsub_torrentutils.a /usr/lib64/../lib64/libstdc++.so -lm -lcrypto -pthread -Wl,-rpath -Wl,/usr/lib64/../lib64
torrent/utils/LibTorrentTest-log_test.o: In function utils_log_test::test_file_output()': /home/ingmar/Repositories/libtorrent/test/torrent/utils/log_test.cc:140: warning: the use oftmpnam' is dangerous, better use mkstemp' ../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In functiontorrent::log_gz_file_write(std::tr1::shared_ptrtorrent::log_gz_output&, char const_, unsigned long, int)':
/home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:377: undefined reference to gzwrite' /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:379: undefined reference togzwrite'
/home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:380: undefined reference to gzwrite' /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:383: undefined reference togzwrite'
/home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:388: undefined reference to gzwrite' ../src/torrent/utils/.libs/libsub_torrentutils.a(log.o):/home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:386: more undefined references togzwrite' follow
../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In function log_gz_output': /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:76: undefined reference togzopen'
../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In function ~log_gz_output': /home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:77: undefined reference togzclose'
/home/ingmar/Repositories/libtorrent/src/torrent/utils/log.cc:77: undefined reference to gzclose' ../src/protocol/.libs/libsub_protocol.a(request_list.o): In functiontorrent::RequestList::delegate()':
/home/ingmar/Repositories/libtorrent/src/protocol/request_list.cc:127: undefined reference to `torrent::Delegator::delegate(torrent::PeerChunks_, int)'
collect2: error: ld returned 1 exit status
Makefile:791: recipe for target 'LibTorrentTest' failed
make[2]: *** [LibTorrentTest] Error 1
make[2]: Leaving directory '/home/ingmar/Repositories/libtorrent/test'
Makefile:1504: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/home/ingmar/Repositories/libtorrent/test'
Makefile:486: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

@rakshasa
Copy link
Owner

Check if it includes '-lz' during the normal build, it's missing above.

@ingmarv
Copy link
Author

ingmarv commented May 23, 2014

It doesn't, full build log is available here: http://dev.exherbo.org/~ingmar/libtorrent.log

@ghostbar
Copy link

Same thing for me. Should add something to the ./configure to have the -lz?

Relevant line:

libtool: link: g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -g -DDEBUG -fvisibility=hidden -pthread -Wl,-z -Wl,relro -o .libs/LibTorrentTe
st ../src/LibTorrentTest-thread_disk.o rak/LibTorrentTest-allocators_test.o rak/LibTorrentTest-ranges_test.o data/LibTorrentTest-chunk_list_test.o data/LibTorrentTest-hash_check_que
ue_test.o data/LibTorrentTest-hash_queue_test.o protocol/LibTorrentTest-test_request_list.o torrent/LibTorrentTest-http_test.o torrent/LibTorrentTest-object_test.o torrent/LibTorren
tTest-object_test_utils.o torrent/LibTorrentTest-object_static_map_test.o torrent/LibTorrentTest-object_stream_test.o torrent/LibTorrentTest-tracker_controller_test.o torrent/LibTor
rentTest-tracker_controller_features.o torrent/LibTorrentTest-tracker_controller_requesting.o torrent/LibTorrentTest-tracker_list_test.o torrent/LibTorrentTest-tracker_list_features
_test.o torrent/LibTorrentTest-tracker_timeout_test.o torrent/utils/LibTorrentTest-log_test.o torrent/utils/LibTorrentTest-log_buffer_test.o torrent/utils/LibTorrentTest-net_test.o
torrent/utils/LibTorrentTest-option_strings_test.o torrent/utils/LibTorrentTest-test_extents.o torrent/utils/LibTorrentTest-test_queue_buckets.o torrent/utils/LibTorrentTest-signal_
bitfield_test.o torrent/utils/LibTorrentTest-thread_base_test.o tracker/LibTorrentTest-tracker_http_test.o LibTorrentTest-main.o  -L/usr/lib/i386-linux-gnu -lcppunit -ldl ../src/.libs/libtorrent.so ../src/torrent/.libs/libsub_torrent.a ../src/torrent/data/.libs/libsub_torrentdata.a ../src/torrent/download/.libs/libsub_torrentdownload.a ../src/torrent/peer/.libs/libsub_torrentpeer.a ../src/data/.libs/libsub_data.a ../src/dht/.libs/libsub_dht.a ../src/download/.libs/libsub_download.a ../src/net/.libs/libsub_net.a ../src/protocol/.libs/libsub_protocol.a ../src/tracker/.libs/libsub_tracker.a ../src/utils/.libs/libsub_utils.a ../src/torrent/utils/.libs/libsub_torrentutils.a -lcrypto -pthread
torrent/utils/LibTorrentTest-log_test.o: In function `utils_log_test::test_file_output()':
/tmp/buildd/libtorrent-0.13.4/test/torrent/utils/log_test.cc:140: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In function `torrent::log_gz_file_write(std::tr1::shared_ptr<torrent::log_gz_output>&, char const*, unsigned int, int)':
/tmp/buildd/libtorrent-0.13.4/src/torrent/utils/log.cc:377: undefined reference to `gzwrite'
/tmp/buildd/libtorrent-0.13.4/src/torrent/utils/log.cc:379: undefined reference to `gzwrite'
/tmp/buildd/libtorrent-0.13.4/src/torrent/utils/log.cc:388: undefined reference to `gzwrite'
/tmp/buildd/libtorrent-0.13.4/src/torrent/utils/log.cc:383: undefined reference to `gzwrite'
/tmp/buildd/libtorrent-0.13.4/src/torrent/utils/log.cc:386: undefined reference to `gzwrite'
../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In function `log_gz_output':
/tmp/buildd/libtorrent-0.13.4/src/torrent/utils/log.cc:76: undefined reference to `gzopen64'
../src/torrent/utils/.libs/libsub_torrentutils.a(log.o): In function `~log_gz_output':
/tmp/buildd/libtorrent-0.13.4/src/torrent/utils/log.cc:77: undefined reference to `gzclose'
/tmp/buildd/libtorrent-0.13.4/src/torrent/utils/log.cc:77: undefined reference to `gzclose'
../src/protocol/.libs/libsub_protocol.a(request_list.o): In function `torrent::RequestList::delegate()':
/tmp/buildd/libtorrent-0.13.4/src/protocol/request_list.cc:127: undefined reference to `torrent::Delegator::delegate(torrent::PeerChunks*, int)'
collect2: error: ld returned 1 exit status
Makefile:797: recipe for target 'LibTorrentTest' failed
make[3]: *** [LibTorrentTest] Error 1
make[3]: Leaving directory '/tmp/buildd/libtorrent-0.13.4/test'
Makefile:1510: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/tmp/buildd/libtorrent-0.13.4/test'
Makefile:493: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/tmp/buildd/libtorrent-0.13.4'

@rakshasa
Copy link
Owner

Seems OpenSSL is pulling in libz, I'll look at adding an explicit test.

@rakshasa
Copy link
Owner

Added ax_check_zlib.m4, should work now.

@ghostbar
Copy link

@rakshasa is there any chance you could make a release with this fix? I don't want to change the Debian packages to be using git commits as versions.

Kind regards.

@rakshasa
Copy link
Owner

I'll do a release in the near future.

@notDavid
Copy link

Hi, could you describe how i can manually work around this so i can build the latest stable version from http://libtorrent.rakshasa.no/ (= rtorrent-0.9.4.tar.gz ) ?

EDIT: nevermind, ignore this comment. I ran into a similar error message because forgot to run 'autogen.sh'...

@galaux
Copy link

galaux commented Nov 29, 2014

Hi Rakshasa! So could we expect a release? I see the Debian maintainer for rtorrent follows this so it seems we have all the required people gathered for a quick resolution of this "0.13.4 release does not build". Thanks a lot for your time!

@ingmarv
Copy link
Author

ingmarv commented Jun 2, 2015

Any chance for a release anytime soon?

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

5 participants