Bug 212159 - net-p2p/qbittorrent-nox11: fails to build
Summary: net-p2p/qbittorrent-nox11: fails to build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on: 209132
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-25 18:51 UTC by Grzegorz Junka
Modified: 2016-10-20 00:06 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
Compilation log from poudriere (59.27 KB, text/x-log)
2016-08-25 18:51 UTC, Grzegorz Junka
no flags Details
Patch-filesystemwatcher.cpp (1004 bytes, text/x-c++src)
2016-08-27 05:03 UTC, Walter Schwarzenfeld
no flags Details
patch-filesystemwatcher.cpp (386 bytes, text/x-c++src)
2016-08-27 05:28 UTC, Walter Schwarzenfeld
no flags Details
patch-application.cpp (259 bytes, text/x-c++src)
2016-08-27 12:35 UTC, Walter Schwarzenfeld
no flags Details
svn-diff_net-p2p_qbittorrent (3.40 KB, patch)
2016-09-07 21:36 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Junka 2016-08-25 18:51:22 UTC
Created attachment 174074 [details]
Compilation log from poudriere

qbittorrent-nox11 fails to compile. I check with default options:

OPTIONS_FILE_UNSET+=DBUS
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_SET+=QT4
OPTIONS_FILE_UNSET+=QT5

and also with the following options:

OPTIONS_FILE_SET+=DBUS
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_UNSET+=QT4
OPTIONS_FILE_SET+=QT5

In both cases it compiles with an error:

[05:24:28] ====>> [02][00:00:00] Starting build of net-p2p/qbittorrent-nox11
[05:25:17] ====>> [02][00:00:49] Finished build of net-p2p/qbittorrent-nox11: Failed: build
Comment 1 Walter Schwarzenfeld freebsd_triage 2016-08-27 05:03:15 UTC
Created attachment 174108 [details]
Patch-filesystemwatcher.cpp
Comment 2 Walter Schwarzenfeld freebsd_triage 2016-08-27 05:12:40 UTC
It is no solution and  I don't know if it is helpful.
Tried it with version 3.3.5 with qt5=ON (qt4 has other errors), but the patch make the intrusive_ptr error disappear.

Later I got a lot of linker errors with boost::asio, like:

linking qbittorrent
application.o: In function `__cxx_global_var_init73':
app/application.cpp:(.text+0x461e): undefined reference to `boost::asio::detail::posix_tss_ptr_create(int&)'
application.o: In function `global constructors keyed to a':
app/application.cpp:(.text+0x4688): undefined reference to `boost::asio::error::get_netdb_category()'
app/application.cpp:(.text+0x4694): undefined reference to `boost::asio::error::get_addrinfo_category()'
app/application.cpp:.......
Comment 3 Walter Schwarzenfeld freebsd_triage 2016-08-27 05:28:15 UTC
Created attachment 174109 [details]
patch-filesystemwatcher.cpp
Comment 4 Walter Schwarzenfeld freebsd_triage 2016-08-27 05:29:40 UTC
There was a typo in it.
Comment 5 Walter Schwarzenfeld freebsd_triage 2016-08-27 11:10:54 UTC
I could eliminate the Boost::asio error, including #include <boost/asio/impl/src.hpp> in src/app/applications.cpp.
now left this:
linking qbittorrent
session.o: In function `BitTorrent::Session::saveResumeData()':
base/bittorrent/session.cpp:(.text+0xa00e): undefined reference to `libtorrent::session_handle::wait_for_alert(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >)'
session.o: In function `BitTorrent::Session::getPendingAlerts(std::__1::vector<libtorrent::alert*, std::__1::allocator<libtorrent::alert*> >&, unsigned long)':
base/bittorrent/session.cpp:(.text+0x15cfe): undefined reference to `libtorrent::session_handle::wait_for_alert(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >)'
string.o: In function `Utils::String::naturalCompareCaseSensitive(QString const&, QString const&)':
base/utils/string.cpp:(.text+0x53): undefined reference to `__cxa_thread_atexit'
string.o: In function `Utils::String::naturalCompareCaseInsensitive(QString const&, QString const&)':
base/utils/string.cpp:(.text+0x180): undefined reference to `__cxa_thread_atexit'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 6 Walter Schwarzenfeld freebsd_triage 2016-08-27 12:35:01 UTC
Created attachment 174119 [details]
patch-application.cpp
Comment 7 Walter Schwarzenfeld freebsd_triage 2016-08-27 12:36:12 UTC
I am a little step further ;-).
Thsi two patches compiles with version 3.3.4 and qt5=ON.
Starts but, but crashes short after.
Comment 8 Walter Schwarzenfeld freebsd_triage 2016-08-27 12:44:49 UTC
And also compiles with qt4, but:
does not start and segfaulted with:
Catching signal: SIGSEGV
Please file a bug report at http://bug.qbittorrent.org and provide the following information:

qBittorrent version: v3.3.4
stack trace:
  0x80402422c <pthread_getspecific+0xe1c> at /lib/libthr.so.3
Comment 9 Walter Schwarzenfeld freebsd_triage 2016-08-27 12:59:51 UTC
After set locale in conf qt5 starts without problems, and don't crash.
Comment 10 Walter Schwarzenfeld freebsd_triage 2016-08-27 13:12:01 UTC
And the start error with qt4 seems located:
gdb tells
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 808806400 (LWP 100460/qbittorrent)]
0x000000080462304c in SSL_clear () from /usr/local/lib/libssl.so.39
(gdb) exit
(I have libressl as default).
Comment 11 Walter Schwarzenfeld freebsd_triage 2016-08-27 14:55:45 UTC
Testbuilds with qbittorrent and qbittorrent-nox1! works on 103amd64 jail with qt5 and qt4 and with the port.
Qbittorrent-nox11 starts with qt5. Qt4 seems to start, but shows no messages, like qt5. (no crash or segfault).

(Btw, I think we can comment out or remove CXXFLAGS+= -DQ_COMPILER_INITIALIZER_LISTS to silence the ugly warning).
----
And, I made erronously a test with 3.3.3 with poudriere (qt5) and this works. Maybe, the patches also works with 3.3.3.
Comment 12 Walter Schwarzenfeld freebsd_triage 2016-08-27 20:22:58 UTC
Now I have tested abittorrent-qt4 with openssl-base and openssl-port, compiles and starts without problems. 

Does not compile on 93i386 seems qt4 is broken (seems wrong libtorrent version).
Comment 13 Grzegorz Junka 2016-08-28 18:52:09 UTC
Many thanks for your work on this. Should I test it in any way or should I just wait until the fix is tested and committed to the repository?
Comment 14 Walter Schwarzenfeld freebsd_triage 2016-08-28 19:07:35 UTC
It is your decision. I work with an other torrent program. So I think it will good, you try it, and if there is still any error you can report it.
Comment 15 Walter Schwarzenfeld freebsd_triage 2016-09-07 21:36:02 UTC
Created attachment 174493 [details]
svn-diff_net-p2p_qbittorrent
Comment 16 Walter Schwarzenfeld freebsd_triage 2016-09-07 21:37:17 UTC
Works now also with qt4 and libressl. (Don't where the error was).
Set it on 9.3 Broken.
Comment 17 Kubilay Kocak freebsd_committer freebsd_triage 2016-09-12 07:38:50 UTC
@Walter unless updating to 3.3.4 is *required* to fix this issue, please update attachment 174493 [details] to *only* address the build failure (leaving out the update to 3.3.4), as bug 209132 already covers the version update.

If 3.3.4 is infact *required* to fix the issue reported here, then this issue can continue to depend on bug 209132, but its attachments should be obsoleted, in favour of those in bug 209132
Comment 18 Walter Schwarzenfeld freebsd_triage 2016-09-12 09:21:33 UTC
Update is required. I can wait. But the last post in PR 209132 is from 5th of may. 
(I fear there will never any advance).

The try with the "combined" update of libtorrent-rasterbar was not really a good  idea, I think.
In the meantime libtorrent-rasterbar has 1.1.1 (in the patch of the   PR it  is 1.1.10).
Comment 19 Walter Schwarzenfeld freebsd_triage 2016-09-12 09:27:41 UTC
correct typo_
in the patch of the  pther PR it  is 1.1.0.
Comment 20 Walter Schwarzenfeld freebsd_triage 2016-09-12 09:39:35 UTC
In the meantime there exists a "third" PR )Bug 212235) from matthew (update 1.1.1).
I think we should  make first this update. Then the update of qbittorrent and at the last the changes
tried in PR 209132 (if still needed).
Comment 21 Walter Schwarzenfeld freebsd_triage 2016-09-12 09:45:13 UTC
To the point required:
I got with 3.3.3
/base/bittorrent/torrentinfo.h:80:16: error: no type named 'intrusive_ptr' in namespace 'boost'
        boost::intrusive_ptr<libtorrent::torrent_info> nativeInfo() const;
        ~~~~~~~^

seems the is a header-file missing. This message does not appear in 3.3.4. And i think if it is solved 
with the source, it is better as an additional patch.
Comment 22 Kubilay Kocak freebsd_committer freebsd_triage 2016-09-12 13:23:15 UTC
@Walter Does the patch in bug 209132 resolve this issue?
Comment 23 Walter Schwarzenfeld freebsd_triage 2016-09-12 14:40:06 UTC
Yes it does. Seems this "CXXFLAGS+=             -DBOOST_ASIO_DYN_LINK" was the cause.
Compiles and starts with qt4 and  qt5.So I think, you can close this PR. 
(Only tested the qbitorrent part , not the libtorrent-rasterbar part).
Comment 24 Kubilay Kocak freebsd_committer freebsd_triage 2016-09-12 14:44:26 UTC
We'll leave this issue open depending on resolution of bug 209132

@Walter can you obsolete the attachment here please
Comment 25 Yuri Victorovich freebsd_committer freebsd_triage 2016-10-18 09:24:26 UTC
Bug#209132 fixes this. This bug needs to be closed.
Comment 26 Walter Schwarzenfeld freebsd_triage 2016-10-19 23:16:40 UTC
Is  fixed with update to 3.3.7, could be closed.
Comment 27 Kubilay Kocak freebsd_committer freebsd_triage 2016-10-20 00:06:17 UTC
Assign to committer that resolved bug 209132. Fix removal of depends to keep history/relation intact.