Closed jamesr42 closed 3 years ago
I don't think those are boost.atomic
symbols. Those look like runtime or libgcc symbols
they seem to be part of libccc: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
Apologies I am duh I did not even google that. May also be libatomic, although I Raspbian has that. Continuing to investigate.
Yup it's libatomic; if I do this:
export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1
Then python3 imports libtorrent ok.
Would Boost be responsible for linking in libatomic? My theory is performance_counters -> atomic -> libatomic
no, I just use the standard library. i.e. std::atomic
"no" to it being a transitive dependency via boost. "yes" on the performance counters use atomic operations
OK gotcha. Now to figure out why libatomic is not being linked in.
They're hitting this problem for certain archs in Debian too:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Wait, I am not sure how to solve this yet. I followed the tutorial on the deluge webpage, everything goes well until I try to import libtorrent from python and I get this error:
elusero:elcomputero~ $ python -c "import libtorrent; print (libtorrent.version)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /usr/local/lib/libtorrent-rasterbar.so.10: undefined symbol: __atomic_fetch_add_8
this might give some hints: https://stackoverflow.com/questions/42887975/how-to-link-against-the-libatomic-library-in-gcc
if you run ldd
on the libtorrent module, do you see a dependency on libatomic
?
this might give some hints: https://stackoverflow.com/questions/42887975/how-to-link-against-the-libatomic-library-in-gcc
if you run
ldd
on the libtorrent module, do you see a dependency onlibatomic
?
Hmmm no, I do not see the dependency:
elusero:elcomputero:~ $ ldd /usr/local/lib/libtorrent-rasterbar.so.10
linux-vdso.so.1 (0x7ec41000)
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0x76c10000)
libssl.so.1.1 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.1 (0x76b91000)
libcrypto.so.1.1 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 (0x76978000)
libboost_system.so.1.67.0 => /usr/lib/arm-linux-gnueabihf/libboost_system.so.1.67.0 (0x76964000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x7693a000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x767f3000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76771000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76623000)
/lib/ld-linux-armhf.so.3 (0x76f7c000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x765f6000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x765e3000)
librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x765ca000)
elusero:elcomputero:~ $ ldd /usr/local/lib/libtorrent-rasterbar.so.10 | grep ato
elusero:elcomputero:~ $
About the stackoverflow post, they suggest to look at the file /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libatomic.so
. I did not have one there, and I thought it would be because of the different version of gcc (I have 8.3) so I checked /usr/lib/gcc/x86_64-redhat-linux/8/libatomic.so
but it is not the "single line of text" described in the stackoverflow post, but it seems to be a binary file.
Maybe I should open a different issue?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I think this is basically a duplicate of https://github.com/arvidn/libtorrent/issues/5117 (or, rather, that new one is a duplicate of this one). I have worked on a suitable patch and will submit it soon.
libtorrent version (or branch): 1.2.6 platform/architecture: Raspberry Pi 3 ARM compiler and compiler version: gcc 8.3.0 Boost: 1.73, fresh build of b2
Awesome product, btw ... refreshing my coding and design skills using it. Python bindings make it possible to interactively do torrenting stuff as a learning/technical experience. A+!
libtorrent library shared and static build ok, but client_test does not, seems to be a problem with the Boost atomic library. Odd (in Boost) that it compiled, but could not find functions in library.