Legrandin / pycryptodome

A self-contained cryptographic library for Python
https://www.pycryptodome.org
Other
2.74k stars 492 forks source link

pycryptodome 3.20.0 fails on Debian armel #794

Open bdrung opened 5 months ago

bdrung commented 5 months ago

pycryptodome 3.20.0 fails on Debian armel:

cd src/test && export PYTHON=python3 && cmake -DPYTHON= && /usr/bin/make
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.

-- The C compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_CXX_COMPILER_ID="" ; CMAKE_CXX_COMPILER_VERSION="" ; CMAKE_SIZEOF_VOID_P="4" ; CMAKE_SYSTEM_PROCESSOR="armv7l" ; SSE=""
-- Configuring done (1.4s)
-- Generating done (0.1s)
-- Build files have been written to: /<<PKGBUILDDIR>>/src/test
make[2]: Entering directory '/<<PKGBUILDDIR>>/src/test'
make[3]: Entering directory '/<<PKGBUILDDIR>>/src/test'
make[4]: Entering directory '/<<PKGBUILDDIR>>/src/test'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src/test'
make[4]: Entering directory '/<<PKGBUILDDIR>>/src/test'
[  1%] Building C object CMakeFiles/mont.dir/<<PKGBUILDDIR>>/src/mont.c.o
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src/test'
[  1%] Built target mont
make[4]: Entering directory '/<<PKGBUILDDIR>>/src/test'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src/test'
make[4]: Entering directory '/<<PKGBUILDDIR>>/src/test'
[  3%] Building C object CMakeFiles/test_mont.dir/test_mont.c.o
[  4%] Linking C executable test_mont
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/13/libasan.so: undefined reference to `__atomic_compare_exchange_8'
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/13/libasan.so: undefined reference to `__atomic_load_8'
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabi/13/libasan.so: undefined reference to `__atomic_store_8'
collect2: error: ld returned 1 exit status
make[4]: *** [CMakeFiles/test_mont.dir/build.make:99: test_mont] Error 1

Full log: https://buildd.debian.org/status/fetch.php?pkg=pycryptodome&arch=armel&ver=3.20.0%2Bdfsg-1&stamp=1704982587&raw=0

thesamesam commented 5 months ago

This sounds like a GCC bug given libasan is underlinked wrt libatomic (I had a similar but different bug for ppc32+ubsan: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110553).