Compile from source failure

Hello guys,
I use almalinux 8.8 and i try to compile openvas-smb from lastest source and last version. I was able to address all dependencies errors, but it still fails on the last steps :

[user]$ LIBRARY_PATH="$LIBRARY_PATH:/usr/lib64/heimdal/lib" C_INCLUDE_PATH="$C_INCLUDE_PATH:/usr/include/heimdal:/usr/include/heimdal/gssapi" make

[ 99%] Linking C executable wmic
/usr/bin/ld: libopenvas_wmiclient.so.22.5.3: undefined reference to symbol 'krb5_get_error_string@@HEIMDAL_KRB5_2.0'
/usr/lib64/heimdal/lib/libkrb5.so.26: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [wmi/CMakeFiles/wmic.dir/build.make:131: wmi/wmic] Error 1
make[1]: *** [CMakeFiles/Makefile2:163: wmi/CMakeFiles/wmic.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Someone know how to fix this error ? I’m out of idea :

undefined reference to symbol ‘krb5_get_error_string@@HEIMDAL_KRB5_2.0

Thanks

The error is suggesting that the code you’re trying to compile is referencing the krb5_get_error_string symbol from the Heimdal Kerberos library (version 2.0), but the linker cannot find the corresponding definition of this symbol in the libraries you’re linking against.

Make sure you are linking against the correct version of the Heimdal Kerberos library (version 2.0 in this case) and that the library is properly installed on your system.

You would want to verify that the Heimdal Kerberos library in almalinux is compatible. If not, you would have to remove it and install a compatible version.

1 Like

It seems that i use the right version heimdal-devel-7.7.1-7.el8.x86_64 >= 2.0

I also remove the default MIT krb5-devel library, in case it conflicts with this one.

You would want to verify that the Heimdal Kerberos library in almalinux is compatible.
It seems too :

 nm -gDC  /usr/lib64/heimdal/lib/libkrb5.so | grep get_error_string
                 U hx509_get_error_string
000000000003acf0 T krb5_get_error_string

And for the last one “Make sure you are linking against the correct version of the Heimdal Kerberos library (version 2.0 in this case) and that the library is properly installed on your system.”
I specify lib path from args :

LIBRARY_PATH="$LIBRARY_PATH:/usr/lib64/heimdal/lib"

Hum. i’m lost.

Problem fixed,
missing library was culprit (heimdal-krb5), but because of cmake was not crashing while building makefiles. I did not mention it.

1 Like