besser82 / libxcrypt

Extended crypt library for descrypt, md5crypt, bcrypt, and others
GNU Lesser General Public License v2.1
189 stars 52 forks source link

compute-symver-floor sporadically fails #123

Closed kanavin closed 3 years ago

kanavin commented 3 years ago

Sadly since introduction of compute-symver-floor the Yocto project sees sporadic failures of that script, e.g. here: https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/3504/steps/11/logs/stdio

LC_ALL=C /home/pokybuild/yocto-worker/buildtools/build/build/tmp/hosttools/perl \
  ../git/build-aux/gen-crypt-symbol-vers-h \
  SYMVER_MIN=GLIBC_2.0 \
  SYMVER_FLOOR= \
  COMPAT_ABI=yes \
     ../git/lib/libcrypt.map.in > crypt-symbol-vers.h.T

Unfortunately at the moment I can't provide more information about what goes wrong at ./configure step - perhaps the script and configure.ac could be first hardened to fail when this happens?

zackw commented 3 years ago

Commit f0ca1fe2275381f37b21faede6ae873986636254 should move the sporadic failure from the ‘make’ step to the ‘configure’ step. You'll get an error message like this:

checking minimum symbol version to use for compatibility symbols... 
configure: error: compute-symver-floor failed, see config.log for details

instead of build scripts malfunctioning because SYMVER_FLOOR isn't set.

To diagnose the actual bug we will need to see the contents of config.log when the failure happens. The relevant bit will, unfortunately, be somewhere in the middle of that file, so please attach the entire thing.

Note that if you are cross-compiling, the problem may already have been fixed by 86d1e4e.

zackw commented 3 years ago

@besser82 When you get a chance could you put out a 4.4.19 release? f0ca1fe, 86d1e4e, and 30f89f4 are all pretty important for redistributors.

kanavin commented 3 years ago

Thanks @zackw , is it feasible to print the error directly to stdout/stderr though?

Getting special log files out of CI systems can be awkward, especially if the error is sporadic and not easily reproducible locally.

zackw commented 3 years ago

Due to the way configure scripts work, that would be very difficult. Can you change your configure invocation to something like this?

../path/to/srcdir/configure $configure_args || (cat config.log; exit 1)

(I'd recommend doing this in your build harness for all packages that use Autoconf configure scripts. They always generate a log file with this name and it often contains valuable debugging information.)

kanavin commented 3 years ago

Thanks, we'll do this for libxcrypt at least, but we need the version with the fix first :)

kanavin commented 3 years ago

We managed to get the failing config.log: https://autobuilder.yocto.io/pub/logs/config.log

The critical bit of information seems to be:

configure:15913: checking minimum symbol version to use for compatibility symbols
/home/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-libxcrypt-compat/4.4.18-r0/git/build-aux: testing defined __x86_64__ && ULONG_MAX == UINT_MAX /* x32 */
+ /home/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-libxcrypt-compat/4.4.18-r0/recipe-sysroot-native/usr/bin/x86_64-pokysdk-linux/x86_64-pokysdk-linux-gcc --sysroot=/home/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-libxcrypt-compat/4.4.18-r0/recipe-sysroot  -O2 -pipe -fmacro-prefix-map=/home/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-libxcrypt-compat/4.4.18-r0=/usr/src/debug/nativesdk-libxcrypt-compat/4.4.18-r0 -fdebug-prefix-map=/home/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-libxcrypt-compat/4.4.18-r0=/usr/src/debug/nativesdk-libxcrypt-compat/4.4.18-r0 -fdebug-prefix-map=/home/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-libxcrypt-compat/4.4.18-r0/recipe-sysroot= -fdebug-prefix-map=/home/pokybuild/yocto-worker/buildtools/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-libxcrypt-compat/4.4.18-r0/recipe-sysroot-native= -fsyntax-only -xc -
x86_64-pokysdk-linux-gcc: error: : No such file or directory
configure:15920: result: 

At first glance, looks like gcc invocation becomes truncated somehow?

kanavin commented 3 years ago

config.log

besser82 commented 3 years ago

@besser82 When you get a chance could you put out a 4.4.19 release? f0ca1fe, 86d1e4e, and 30f89f4 are all pretty important for redistributors.

v4.4.19 just got released.

rpurdie commented 3 years ago

I think https://github.com/besser82/libxcrypt/pull/126 may be the cause of the issues we were seeing. You can reproduce with CFLAGS with a leading space. Sadly the error is still silent and doesn't cause a build failure even after the recent changes, wasn't sure how to fix that.

besser82 commented 3 years ago

@kanavin Can you confirm fed81d1a98fab52839b60a55447d368899034847 will fix this issue?

kanavin commented 3 years ago

I believe so - @rpurdie and myself are in the same project, so he's just taken time to look into it properly :)

besser82 commented 3 years ago

Allrighty, will create the 4.4.20 release then.

besser82 commented 3 years ago

v4.4.20 has just been released.