libtorrent
libtorrent copied to clipboard
libtorrent can't be linked on old ARM boxes, where there is no ATOMIC support
Hí,
I tried to build rtorrent, but it gave me this:
/ffp/bin/ld: conftest: hidden symbol `__sync_val_compare_and_swap_4' in /usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.9.2/libgcc.a(linux-atomic.o) is referenced by DSO
/ffp/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
This would need to wait until I rewrite most of the code to using c++11's std::atomic types.
Any progress on the rewrite? Or is there any hacky way for me to compile libtorrent without atomic support?
@rakshasa It also fails on Darwin ppc due to the same issue (it builds, but library is broken). If it used __atomic* builtins instead of __sync*, that would work fine (provided linking to libatomic is done).
36-246% /opt/local/bin/rtorrent
dyld: lazy symbol binding failed: Symbol not found: ___sync_add_and_fetch_8
Referenced from: /opt/local/lib/libtorrent.21.dylib
Expected in: dynamic lookup
dyld: Symbol not found: ___sync_add_and_fetch_8
Referenced from: /opt/local/lib/libtorrent.21.dylib
Expected in: dynamic lookup
@MrDini123 Well, possibly rewriting to __atomic* will fix it. They are not drop-in replacements, arguments differ, but they provide the same functionality, just better.