shibatch / sleef

SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
https://sleef.org
Boost Software License 1.0
661 stars 131 forks source link

Failure on ppc64 when cross compiled with gcc-11 toolchain #505

Closed joanaxcruz closed 3 days ago

joanaxcruz commented 9 months ago

When I try to cross-compile sleef for ppc64el with gcc toolchain (using the following command):

CROSS_ARCH=ppc64el
COMPILER=gcc
 QEMU_EMULATOR=qemu-ppc64le
 export QEMU_CPU=power10
cmake -S . -B build-${CROSS_ARCH}-${COMPILER} \
    -DCMAKE_TOOLCHAIN_FILE=$PWD/toolchains/${CROSS_ARCH}-${COMPILER}.cmake \
    -DNATIVE_BUILD_DIR=$PWD/native-build-${COMPILER} \
    -DEMULATOR=${QEMU_EMULATOR} \
    ${COMMON_CMAKE_CFLAGS} \
    ${EXTRA_CMAKE_FLAGS} 

cmake --build build-${CROSS_ARCH}-${COMPILER}  --clean-first

ctest --output-on-failure --test-dir build-${CROSS_ARCH}-${COMPILER} 

Get the following failure:

1/21 Test #21: iutscalar ........................***Failed 1.01 sec *** Now testing /home/joacru01/sleef/build-ppc64el-gcc/bin/iutscalar sqrtf_u35 denormal/nonnumber test : arg = 0, test = -0, correct = 0

I believe this is not shown in GHA tests due to different interactions of qemu and the test suite (I pass the emulator through cmake, while qemu is built in the docker used in GHA). Still worth an investigation I believe...

blapie commented 3 days ago

I'm going to close this issue as it wasn't reproduced in GHA, in fact cross-compilation with gcc11 was successful and passing tests on all architectures. If it is ever reported again we will investigate further.