Not sure if issue is libtorrent or rtorrent, but since libtorrent builds and rtorrent does not, I am submitting the bug here. I have a fresh ports tree on 11.3-RELEASE-p1. Have rebuilt libtorrent (0.13.8), curl (7.65.3), xmlrpc-c (1.51.03_1) ports and get the following build error that is repeatable on multiple boxes: #################TRIMMED################# --- rtorrent --- /bin/sh ../libtool --tag=CXX --mode=link c++ -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -Wall -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include -lexecinfo -pthread -fstack-protector-strong -o rtorrent main.o libsub_root.a ui/libsub_ui.a core/libsub_core.a display/libsub_display.a input/libsub_input.a rpc/libsub_rpc.a utils/libsub_utils.a -lncursesw -L/usr/local/lib -lcurl -L/usr/local/lib -ltorrent -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lxmlrpc_server -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lpthread libtool: link: c++ -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -Wall -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include -pthread -fstack-protector-strong -o rtorrent main.o -Wl,-rpath -Wl,/usr/local/lib -lexecinfo libsub_root.a ui/libsub_ui.a core/libsub_core.a display/libsub_display.a input/libsub_input.a rpc/libsub_rpc.a utils/libsub_utils.a -lncursesw -L/usr/local/lib -lcurl -ltorrent -lxmlrpc_server -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lpthread -pthread /usr/local/lib/libtorrent.so: undefined reference to `inotify_add_watch' /usr/local/lib/libtorrent.so: undefined reference to `inotify_init' c++: error: linker command failed with exit code 1 (use -v to see invocation) *** [rtorrent] Error code 1 make[5]: stopped in /usr/ports/net-p2p/rtorrent/work/rtorrent-0.9.8/src 1 error make[5]: stopped in /usr/ports/net-p2p/rtorrent/work/rtorrent-0.9.8/src *** [all-recursive] Error code 1 make[4]: stopped in /usr/ports/net-p2p/rtorrent/work/rtorrent-0.9.8/src 1 error make[4]: stopped in /usr/ports/net-p2p/rtorrent/work/rtorrent-0.9.8/src *** [all-recursive] Error code 1 make[3]: stopped in /usr/ports/net-p2p/rtorrent/work/rtorrent-0.9.8 1 error make[3]: stopped in /usr/ports/net-p2p/rtorrent/work/rtorrent-0.9.8 *** [all] Error code 2 make[2]: stopped in /usr/ports/net-p2p/rtorrent/work/rtorrent-0.9.8 1 error make[2]: stopped in /usr/ports/net-p2p/rtorrent/work/rtorrent-0.9.8 ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/net-p2p/rtorrent *** Error code 1 Stop. make: stopped in /usr/ports/net-p2p/rtorrent
Thanks for the report. Are you using the default options? Could you share the full build log of libtorrent and rtorrent? I couldn't reproduce this issue with poudriere on: - 11.3 (i386|amd64) - 12.0-RELEASE (i386|amd64) - 13.0-CURRENT 1300036 (i386|amd64) I'm interested in finding what is happening. Regards.
Same error here (11.2-amd64).
I tried on the commandline with make CXXFLAGS+=-linotify, and this works.
I changed USES= compiler:c++11-lang ncurses pkgconfig localbase and LDFLAGS+= -lexecinfo -pthread -linotify
(In reply to w.schwarzenfeld from comment #3) Could you share the build logs from before and after? I want to understand why this is not breaking on poudriere.
Created attachment 206245 [details] screenlog_before I tried only in the port.
Created attachment 206246 [details] screenlog_after
Comment on attachment 206246 [details] screenlog_after Sorry, something went wrong.
Created attachment 206247 [details] screenlog_before
Created attachment 206248 [details] screenlog_after
Confirm w.schwarzenfeld's changes to Makefile resolve the problem on my end. I performed "make rmconfig" and used the port defaults with a new build which resulted in the same errors in my original report. I can build logs using the un-altered Makefile if needed.
Sorry, is not clear. > I performed "make rmconfig" and used the port defaults with a new build which resulted in the > same errors in my original report. Does it work or does it not work?
Using the un-altered Makefile and building using the port default configs on both libtorrent and rtorrent, the rtorrent build fails., Using your changes to Makefile for rtorrent, the build completes successfully.
Ok, clear now.
(In reply to Walter Schwarzenfeld from comment #4) Thank you all for the information/patch. I noted that this issue happens only when you have libinotify installed in your system (a Samba dependency). And this approach won't work when you don't have it. I reported this upstream to check if inotify is mandatory or optional and asked for the best approach to enable/disable it if it's not mandatory, because we don't have a configure option for doing that. https://github.com/rakshasa/libtorrent/issues/199
(In reply to Walter Schwarzenfeld from comment #4) at 13.1-RELEASE-p3 GENERIC amd64 your advice worked. thank you!
^Triage: canonicalize assignment. To submitter: is this problem now fixed?
^Triage: feedback timeout (> 6 months).