
[auto line breaks intentionally disabled] Hi, today, I found the package libx264 succeeding with "obs build", but failing with "obs build --vm-type=kvm", and could track this down to a failing endian test in configure: # skip endianness check for Intel Compiler and MSVS, as all supported platforms are little. each have flags that will cause the check to fail as well CPU_ENDIAN="little-endian" if [ $compiler = GNU ]; then echo "int i[2] = {0x42494745,0}; double f[2] = {0x1.0656e6469616ep+102,0};" > conftest.c $CC $CFLAGS conftest.c -c -o conftest.o 2>/dev/null || die "endian test failed" if (${cross_prefix}strings -a conftest.o | grep -q BIGE) && (${cross_prefix}strings -a conftest.o | grep -q FPendian) ; then define WORDS_BIGENDIAN CPU_ENDIAN="big-endian" elif !(${cross_prefix}strings -a conftest.o | grep -q EGIB && ${cross_prefix}strings -a conftest.o | grep -q naidnePF) ; then die "endian test failed" fi fi Let's ignore the "beauty" of this test for a moment. Since TW compiles with -flto=auto, the resulting object file is in GIMBLE format, missing the usual debug info, this test relies on. So for the minimum invasive fix, either: %global _lto_cflags %{_lto_cflags} -ffat-lto-objects or %define _lto_cflags %{nil} will help. Since these kind of tests can fail everywhere, shouldn't -ffat-lto-objects be provided as default? I've no idea, why the local chroot build succeeds? For local testing, here's some code: cat > conftest.c << EOF int i[2] = {0x42494745,0}; double f[2] = {0x1.0656e6469616ep+102,0}; EOF gcc -m64 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -Wall -I. '-I$(SRCPATH)' -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 conftest.c -c -o conftest.o strings -a conftest.o gcc -m64 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -ffat-lto-objects -g -Wall -I. '-I$(SRCPATH)' -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 conftest.c -c -o conftest-fat-lto.o strings -a conftest-fat-lto.o Cheers, Pete https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org