openscap icon indicating copy to clipboard operation
openscap copied to clipboard

crypto.h:61:2: error: No crypto library defined

Open yonas opened this issue 2 years ago • 0 comments

Description of Problem:

I'm getting a compiling error:

/usr/local/include/xmlsec1/xmlsec/crypto.h:61:2: error: No crypto library defined

Installing openssl-devel doesn't fix the issue.

OpenSCAP Version:

maint-1.3 as of Mon Jul 11 01:34:32 EDT 2022

Operating System & Version:

FreeBSD 13.0-RELEASE-p10 amd64

Steps to Reproduce:

  1. sudo pkg install cmake xmlsec1 libxslt
  2. git clone --depth 1 https://github.com/OpenSCAP/openscap
  3. cd openscap/build
  4. cmake -DCMAKE_BUILD_TYPE=Release
  5. make all

Actual Results:

yonas in 🌐 backups in openscap/build on  maint-1.3 via C v11.0.1-clang via △ v3.23.2 took 12s 
❯ make all
[  1%] Built target compat_object
[  6%] Built target common_object
[  8%] Built target cpe_object
[  9%] Built target cve_object
[  9%] Built target cvss_object
[ 10%] Built target cvrf_object
[ 13%] Built target ds_object
[ 28%] Built target oval_object
[ 29%] Built target ovalcmp_object
[ 31%] Built target ovalresults_object
[ 33%] Built target ovaladt_object
[ 40%] Built target seap_object
[ 41%] Built target rbt_object
[ 44%] Built target probe_object
[ 46%] Built target crapi_object
[ 49%] Built target independent_probes_object
[ 53%] Built target unix_probes_object
Consolidate compiler generated dependencies of target oscapsource_object
[ 53%] Building C object src/source/CMakeFiles/oscapsource_object.dir/signature.c.o
In file included from /usr/home/yonas/git/openscap/src/source/signature.c:41:
/usr/local/include/xmlsec1/xmlsec/crypto.h:61:2: error: No crypto library defined
#error No crypto library defined
 ^
/usr/home/yonas/git/openscap/src/source/signature.c:147:6: warning: implicit declaration of function 'xmlSecCryptoAppInit' is invalid in C99 [-Wimplicit-function-declaration]
        if (xmlSecCryptoAppInit(NULL) < 0) {
            ^
/usr/home/yonas/git/openscap/src/source/signature.c:153:6: warning: implicit declaration of function 'xmlSecCryptoInit' is invalid in C99 [-Wimplicit-function-declaration]
        if (xmlSecCryptoInit() < 0) {
            ^
/usr/home/yonas/git/openscap/src/source/signature.c:185:6: warning: implicit declaration of function 'xmlSecCryptoAppDefaultKeysMngrInit' is invalid in C99 [-Wimplicit-function-declaration]
        if (xmlSecCryptoAppDefaultKeysMngrInit(mngr) < 0) {
            ^
/usr/home/yonas/git/openscap/src/source/signature.c:258:2: warning: implicit declaration of function 'xmlSecCryptoShutdown' is invalid in C99 [-Wimplicit-function-declaration]
        xmlSecCryptoShutdown();
        ^
/usr/home/yonas/git/openscap/src/source/signature.c:261:2: warning: implicit declaration of function 'xmlSecCryptoAppShutdown' is invalid in C99 [-Wimplicit-function-declaration]
        xmlSecCryptoAppShutdown();
        ^
5 warnings and 1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/yonas/git/openscap/build
*** Error code 1

Stop.
make[1]: stopped in /usr/home/yonas/git/openscap/build
*** Error code 1

Stop.
make: stopped in /usr/home/yonas/git/openscap/build

Expected Results:

No errors should be produced.

yonas avatar Jul 11 '22 05:07 yonas