Rewrite the public symbol check to verify the shared libraries, to check for more things, and to avoid duplication; fixes make check on ARM Taken from Debian: https://salsa.debian.org/multimedia-team/mpeg2dec/blob/master/debian/patches/61_global-symbol-test.patch --- mpeg2dec.orig/test/globals +++ mpeg2dec/test/globals @@ -1,4 +1,8 @@ #!/bin/sh +# TODO +# - fix checking of .a libs; problem is that "nm -g --defined-only" lists +# internal symbols; this can be solved by using objdump, but it's probably +# good enough to just run the tests on the shared lib if test x"$srcdir" != x""; then builddir="." # running from make check, but it does not define that @@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd` error=0 -bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\ - awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'` - -if test x"$bad_globals" != x""; then - echo BAD GLOBAL SYMBOLS: - for s in $bad_globals; do echo $s; done +# check_bad_public_symbols [...] +# +# checks public symbols in shared libs: +# - allow prefix_anything +# - reject _prefixanything +# - allow _anything +# - reject anything else +# +# NB: skips missing files +check_bad_public_symbols() { + symbols_prefix="$1" + shift + lib_files=`ls "$@" 2>/dev/null` + [ -z "$lib_files" ] && return + bad_globals=`nm -g --defined-only $lib_files | + awk '{if ($3) print $3}' | + sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"` + [ -z "$bad_globals" ] && return error=1 -fi - -bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\ - awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'` + echo BAD GLOBAL SYMBOLS in $lib_files: + echo "$bad_globals" +} -if test x"$bad_globals" != x""; then - echo BAD GLOBAL SYMBOLS: - for s in $bad_globals; do echo $s; done - error=1 -fi +check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so +check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so exit $error ref='/guix/log/gnu?id=65afb91138cb216ac41907b7d9d8f240b74e08f5'>gnu/packages/avahi.scm
83d91356474c4aef5bbcb0'>gnu: mimalloc: Update to 2.1.2....
AgeCommit message (Expand)Author
2020-01-19gnu: Use HTTPS for avahi.org everywhere....Tobias Geerinckx-Rice
2019-10-23gnu: avahi: Don't use package/inherit....Tobias Geerinckx-Rice
2019-10-23gnu: avahi: Fix CVE-2018-1000845 and duplicate CVE-2017-6519....Tobias Geerinckx-Rice
Efraim Flashner
2023-11-15gnu: mimalloc: Fix building on powerpc-linux....Efraim Flashner
2023-09-08gnu: Add nsync....Andy Tai
2023-06-21gnu: Add tomlc99....Jean-Pierre De Jesus DIAZ
2023-06-18gnu: renameat2: Move to (gnu packages linux)....Maxim Cournoyer
2023-06-18gnu: Add renameat2....Maxim Cournoyer
2023-05-14gnu: Add c-rrb....Liliana Marie Prikler
2023-05-11gnu: Add ISPC....zamfofex
2023-04-01gnu: utf8-h: Install header under include/utf8 prefix....Maxim Cournoyer
2023-04-01gnu: Add orangeduck-mpc....Maxim Cournoyer
2023-02-16gnu: Remove unneeded module imports....Efraim Flashner
2023-02-11gnu: qbe: Update to 1.1....jgart
2023-01-31gnu: c-intro-and-ref: Update to 0.0.0-1.47e5a23....Hilton Chain
2023-01-22gnu: libhx: Update to 4.9....Tobias Geerinckx-Rice
2023-01-15gnu: mimalloc: Update to 2.0.9....Tobias Geerinckx-Rice