OpenSCAP / openscap

NIST Certified SCAP 1.2 toolkit
https://www.open-scap.org/tools/openscap-base
GNU Lesser General Public License v2.1
1.39k stars 380 forks source link

Build fails with undefined reference to `risdigit' #1909

Closed bmwiedemann closed 9 months ago

bmwiedemann commented 1 year ago

Description of Problem:

OpenSCAP Version:

1.3.6 and maint-1.3 = 70cb3c113db63e6fc5a7587045e1f8140375cf78

Operating System & Version:

openSUSE-Tumbleweed-20221219

Steps to Reproduce:

  1. on openSUSE or Debian, with an openSUSE account, build from clean state with
    osc co openSUSE:Factory/openscap && cd $_
    osc build --vm-type=kvm -j1 --noservice standard

Actual Results:

build fails with

cd /home/abuild/rpmbuild/BUILD/openscap-1.3.6/build/utils && /usr/bin/cmake -E cmake_link_script CMakeFiles/oscap.dir/link.txt --verbose=1
/usr/bin/cc -O2 -Wall ..."CMakeFiles/oscap.dir/oscap-cpe.c.o" "CMakeFiles/oscap.dir/oscap-cve.c.o" "CMakeFiles/oscap.dir/oscap-cvrf.c.o" "CMakeFiles/oscap.dir/oscap-cvss.c.o" "CMakeFiles/oscap.dir/oscap-ds.c.o" "CMakeFiles/oscap.dir/oscap-info.c.o" "CMakeFiles/oscap.dir/oscap-oval.c.o" "CMakeFiles/oscap.dir/oscap-tool.c.o" "CMakeFiles/oscap.dir/oscap-xccdf.c.o" CMakeFiles/oscap.dir/oscap.c.o -o oscap  -Wl,-rpath,/home/abuild/rpmbuild/BUILD/openscap-1.3.6/build/src: ../src/libopenscap.so.25.5.0 /usr/lib64/libxml2.so /usr/lib64/libxslt.so /usr/lib64/libxmlsec1.so /usr/lib64/libxmlsec1-openssl.so /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libexslt.so /usr/lib64/libpcre.so /usr/lib64/libcurl.so /usr/lib64/libbz2.so /usr/lib64/librpm.so /usr/lib64/librpmio.so /usr/lib64/libgcrypt.so /usr/lib64/libselinux.so /usr/lib64/libprocps.so /usr/lib64/libblkid.so /usr/lib64/libdbus-1.so /usr/lib64/libacl.so /usr/lib64/libcap.so /usr/lib64/libyaml.so 
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: ../src/libopenscap.so.25.5.0: undefined reference to `risdigit'
collect2: error: ld returned 1 exit status
make[2]: *** [utils/CMakeFiles/oscap.dir/build.make:265: utils/oscap] Error 1
make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/openscap-1.3.6/build'

Expected Results:

build should not fail

Additional Information / Debugging Steps:

It might be caused by updates to our build dependencies (e.g. make-4.4)

evgenyz commented 1 year ago

Hey! Could it be that the reason is the same as in here: https://github.com/OpenSCAP/openscap/pull/1894? I.e. fixed by https://github.com/OpenSCAP/openscap/commit/8dec1bb5e9546e75ae6e7b7cf94cf00197ce3e5d?

bmwiedemann commented 1 year ago

Yes, that could be the cause. https://code.opensuse.org/package/rpm/commits/master shows we upgraded to 4.18.0 on 2022-12-12 and the first build failure was observed on 2022-12-13 (though the previous build was from 2022-09-21)

Edit: running another test with 8dec1bb5e9546e75ae6e7b7cf94cf00197ce3e5d ontop of 1.3.6 makes the build pass. Will there be a 1.3.7 that includes the patch soon or should I add it in our package?

Going back to rpm-4.17.1.1 seems to help.

evgenyz commented 9 months ago

Fixed in 1.3.7.