Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830846 - net-libs/libtorrent-rasterbar: build fails on raspberry pi 3 64 bits
Summary: net-libs/libtorrent-rasterbar: build fails on raspberry pi 3 64 bits
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mikle Kolyada (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-09 13:03 UTC by Jose Roberto
Modified: 2022-03-07 07:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (build.log,30.06 KB, text/plain)
2022-01-09 15:55 UTC, Jose Roberto
Details
emerge info (emerge.info,6.18 KB, application/x-info)
2022-01-09 15:57 UTC, Jose Roberto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Roberto 2022-01-09 13:03:05 UTC
Can not build libtorrent-rasterbar on raspberry pi 3 64 bits. I got the following error:

[10/188] /usr/bin/aarch64-unknown-linux-gnu-g++ -DBOOST_ALL_NO_LIB -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_HAS_STD_CHRONO -DBOOST_ASIO_NO_DEPRECATED -DBOOST_EXCEPTION_DISABLE -DOPENSSL_NO_SSL2 -DTORRENT_BUILDING_LIBRARY -DTORRENT_BUILDING_SHARED -DTORRENT_DISABLE_LOGGING -DTORRENT_SSL_PEERS -DTORRENT_USE_LIBCRYPTO -DTORRENT_USE_OPENSSL -D_FILE_OFFSET_BITS=64 -Dtorrent_rasterbar_EXPORTS -I/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/include -I/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/deps/try_signal  -march=armv8-a+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wc++11-compat -Wextra -Wno-format-zero-length -Wparentheses -Wpedantic -Wvla -Wno-c++11-compat -Wno-noexcept-type -ftemplate-depth=512 -fexceptions -std=gnu++17 -MD -MT CMakeFiles/torrent-rasterbar.dir/src/crc32c.cpp.o -MF CMakeFiles/torrent-rasterbar.dir/src/crc32c.cpp.o.d -o CMakeFiles/torrent-rasterbar.dir/src/crc32c.cpp.o -c /var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/src/crc32c.cpp

FAILED: CMakeFiles/torrent-rasterbar.dir/src/crc32c.cpp.o 
/usr/bin/aarch64-unknown-linux-gnu-g++ -DBOOST_ALL_NO_LIB -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_HAS_STD_CHRONO -DBOOST_ASIO_NO_DEPRECATED -DBOOST_EXCEPTION_DISABLE -DOPENSSL_NO_SSL2 -DTORRENT_BUILDING_LIBRARY -DTORRENT_BUILDING_SHARED -DTORRENT_DISABLE_LOGGING -DTORRENT_SSL_PEERS -DTORRENT_USE_LIBCRYPTO -DTORRENT_USE_OPENSSL -D_FILE_OFFSET_BITS=64 -Dtorrent_rasterbar_EXPORTS -I/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/include -I/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/deps/try_signal  -march=armv8-a+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wc++11-compat -Wextra -Wno-format-zero-length -Wparentheses -Wpedantic -Wvla -Wno-c++11-compat -Wno-noexcept-type -ftemplate-depth=512 -fexceptions -std=gnu++17 -MD -MT CMakeFiles/torrent-rasterbar.dir/src/crc32c.cpp.o -MF CMakeFiles/torrent-rasterbar.dir/src/crc32c.cpp.o.d -o CMakeFiles/torrent-rasterbar.dir/src/crc32c.cpp.o -c /var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/src/crc32c.cpp
/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/src/crc32c.cpp:54:16: error: conflicting declaration of ‘uint32_t libtorrent::crc32c_32(uint32_t)’ with ‘C’ linkage
   54 |  std::uint32_t crc32c_32(std::uint32_t v)
      |                ^~~~~~~~~
In file included from /var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/src/crc32c.cpp:36:
/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/include/libtorrent/crc32c.hpp:42:37: note: previous declaration with ‘C++’ linkage
   42 |  TORRENT_EXTRA_EXPORT std::uint32_t crc32c_32(std::uint32_t);
      |                                     ^~~~~~~~~
/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/src/crc32c.cpp:87:16: error: conflicting declaration of ‘uint32_t libtorrent::crc32c(const uint64_t*, int)’ with ‘C’ linkage
   87 |  std::uint32_t crc32c(std::uint64_t const* buf, int num_words)
      |                ^~~~~~
In file included from /var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/src/crc32c.cpp:36:
/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/include/libtorrent/crc32c.hpp:43:37: note: previous declaration with ‘C++’ linkage
   43 |  TORRENT_EXTRA_EXPORT std::uint32_t crc32c(std::uint64_t const*, int);
      |                                     ^~~~~~
/var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/src/crc32c.cpp:151:1: error: expected ‘}’ at end of input
  151 | }
      | ^
In file included from /var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.5/work/libtorrent-rasterbar-2.0.5/src/crc32c.cpp:49:
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.4.0/include/arm_acle.h:33:12: note: to match this ‘{’
   33 | extern "C" {
      |            ^
Comment 1 Jonas Stein gentoo-dev 2022-01-09 14:22:24 UTC
Thank you for the report. We need to have all information at hand before ticket assignment. Please provide
* the complete build.log as attachment and
* paste the emerge info 
as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket

Please reopen this ticket (Status:UNCONFIRMED) afterwards.
Comment 2 Jose Roberto 2022-01-09 15:55:15 UTC
Created attachment 761713 [details]
Build log
Comment 3 Jose Roberto 2022-01-09 15:57:22 UTC
Created attachment 761714 [details]
emerge info
Comment 4 Jose Roberto 2022-01-09 15:58:13 UTC
Hi,

I uploaded the required information.
Comment 5 Jose Roberto 2022-01-10 17:37:51 UTC
Hello,

I followed the procedure available in 

https://github.com/arvidn/libtorrent/blob/RC_2_0/docs/building.rst

and the library was built correctly. The only difference is: I did not apply any boost patch. My boost library is 1.77. I will try to update it to 1.78 (accordingly to the ebuild patch version.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-13 01:43:22 UTC
Please try with GCC 10 or 11.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-13 01:43:33 UTC
(In reply to Sam James from comment #6)
> Please try with GCC 10 or 11.

(the log of it building outside of Portage would be helpful too)
Comment 8 Jose Roberto 2022-01-17 10:59:13 UTC
Hi,

Sorry by the delay. I was in a farm without internet connection for some days. I updated my gcc to version 11 and it almost did the job. I believe this is a gcc related issue.

I will try to use clang to build it. I will let you know.

Seeya.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-17 11:13:31 UTC
(In reply to Jose Roberto from comment #8)
> Hi,
> 
> Sorry by the delay. I was in a farm without internet connection for some
> days. I updated my gcc to version 11 and it almost did the job. I believe
> this is a gcc related issue.
> 
> I will try to use clang to build it. I will let you know.
> 
> Seeya.

No problem!
Comment 10 Jose Roberto 2022-02-19 10:04:14 UTC
Hello,

Some updates:
- gcc 11 also reports a build error
- clang 13 builds it

However, if I try 
$ python -c "import libtorrent; print(libtorrent.version)"

then I get an undefined symbol error:

Traceback (most recent call last):
<colombojrj>   File "<string>", line 1, in <module>
<colombojrj> ImportError: /usr/lib/python3.9/site-packages/libtorrent.cpython-39-aarch64-linux-gnu.so: undefined symbol: ERR_lib_error_string

However, Sam helped to solve this issue by:
1. disable gnutls
2. build it with clang 13

I will test it with deluge and then I will post the results here.
Comment 11 Jose Roberto 2022-02-19 11:07:00 UTC
It worked with deluge! Now I have a low power torrent client!
Comment 12 Larry the Git Cow gentoo-dev 2022-03-07 07:30:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca438a261864a6ec6eac15cbf3f95fcb6b694593

commit ca438a261864a6ec6eac15cbf3f95fcb6b694593
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-03-07 07:27:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-03-07 07:30:47 +0000

    net-libs/libtorrent-rasterbar: drop broken USE=gnutls
    
    Produces underlinked Python bindings which breaks Deluge. Everyone
    else seems to build with OpenSSL anyway.
    
    (Had numerous reports of this on IRC and on the forums, as well
    as on Bugzilla).
    
    Closes: https://bugs.gentoo.org/830846
    See: https://forums.gentoo.org/viewtopic-t-1146607.html
    Signed-off-by: Sam James <sam@gentoo.org>

 .../libtorrent-rasterbar-2.0.5-r1.ebuild           | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)