Bug 243958 - net-p2p/libtorrent-rasterbar : Fails to build on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit : libtorrent-rasterbar.so.1.2.3: undefined reference to `__atomic_compare_exchange_8'
Summary: net-p2p/libtorrent-rasterbar : Fails to build on FreeBSD 12.1-RELEASE-p1 powe...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on: 243959
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-07 13:43 UTC by canardo
Modified: 2020-02-09 16:33 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description canardo 2020-02-07 13:43:51 UTC
Problem found when building net-p2p/libtorrent-rasterbar on FreeBSD 12.1-RELEASE-p1 r354992 GENERIC powerpc 32 bit, running on Apple Powerbook 17".



/usr/ports/net-p2p/libtorrent-rasterbar # make clean
===>  Cleaning for libtorrent-rasterbar-1.2.3
/usr/ports/net-p2p/libtorrent-rasterbar # make -DBATCH install clean
===>  License BSD3CLAUSE accepted by the user
===>   libtorrent-rasterbar-1.2.3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by libtorrent-rasterbar-1.2.3 for building
===>  Extracting for libtorrent-rasterbar-1.2.3
.....
.....
[169/176] : && /usr/local/bin/g++9  -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9 -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9  -L/usr/local/lib -liconv  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9 examples/CMakeFiles/simple_client.dir/simple_client.cpp.o  -o examples/simple_client  -Wl,-rpath,/usr/ports/net-p2p/libtorrent-rasterbar/work/.build  libtorrent-rasterbar.so.1.2.3  -pthread  /usr/lib/libssl.so  /usr/lib/libcrypto.so  /usr/local/lib/libboost_system.so && :
FAILED: examples/simple_client 
: && /usr/local/bin/g++9  -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9 -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9  -L/usr/local/lib -liconv  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9 examples/CMakeFiles/simple_client.dir/simple_client.cpp.o  -o examples/simple_client  -Wl,-rpath,/usr/ports/net-p2p/libtorrent-rasterbar/work/.build  libtorrent-rasterbar.so.1.2.3  -pthread  /usr/lib/libssl.so  /usr/lib/libcrypto.so  /usr/local/lib/libboost_system.so && :
/usr/local/bin/ld: libtorrent-rasterbar.so.1.2.3: undefined reference to `__atomic_compare_exchange_8'
/usr/local/bin/ld: libtorrent-rasterbar.so.1.2.3: undefined reference to `__atomic_load_8'
/usr/local/bin/ld: libtorrent-rasterbar.so.1.2.3: undefined reference to `__atomic_store_8'
/usr/local/bin/ld: libtorrent-rasterbar.so.1.2.3: undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/net-p2p/libtorrent-rasterbar



NB: net-p2p/py-libtorrent-rasterbar/ is currently marked as broken, I don't know if it is related to problem described above.
Comment 1 Yuri Victorovich freebsd_committer 2020-02-07 14:56:55 UTC
This is the question to compiler people that PPC doesn't support __atomic_compare_exchange_8.
Comment 2 daniel.engberg.lists 2020-02-09 16:33:57 UTC
I think the "easy" solution is to force GCC (not base GCC) on PPC 32-bit although I haven't tried it myself.