lsh123 / xmlsec

XML Security Library
Other
128 stars 97 forks source link

Make failure (v. 1.3.1) crypto.c: xmlSecTransform* and xmlSecCrypto* #691

Closed 1pavlov closed 12 months ago

1pavlov commented 1 year ago

Hello,

I'm encountering a problem while attempting to install version 1.3.1 on Ubuntu during the make phase, even though I can install version 1.3.0 without any issues on the same system. Here are the libraries I'm currently using:

- libnspr4
- libltdl7
- libltdl-dev
- libxml2
- libxml2-dev
- libxslt1.1
- libxslt1-dev
- libssl3
- libssl-dev
- openssl
- libssl3
- libssl-dev
- libgnutls30
- libgcrypt20-dev
- help2man
- man2html
- gtk-doc-tools

Installation steps:

gunzip -c xmlsec1-1.3.1.tar.gz | tar xvf -
cd xmlsec1-1.3.1
./configure
make
make install
make check

Error stack trace:

Making all in gcrypt
make[3]: Entering directory /xmlsec1-1.3.1/src/gcrypt'
  CC       libxmlsec1_gcrypt_la-app.lo
  CC       libxmlsec1_gcrypt_la-asn1.lo
  CC       libxmlsec1_gcrypt_la-ciphers.lo
  CC       libxmlsec1_gcrypt_la-crypto.lo
  CC       libxmlsec1_gcrypt_la-digests.lo
  CC       libxmlsec1_gcrypt_la-hmac.lo
  CC       libxmlsec1_gcrypt_la-kt_rsa.lo
  CC       libxmlsec1_gcrypt_la-kw_aes.lo
  CC       libxmlsec1_gcrypt_la-kw_des.lo
  CC       libxmlsec1_gcrypt_la-symkeys.lo
  CC       libxmlsec1_gcrypt_la-asymkeys.lo
  CC       libxmlsec1_gcrypt_la-signatures.lo
  CCLD     libxmlsec1-gcrypt.la
make[3]: Leaving directory '/xmlsec1-1.3.1/src/gcrypt'
make[2]: Leaving directory /xmlsec1-1.3.1/src'
Making all in apps
make[2]: Entering directory /xmlsec1-1.3.1/apps'
  CC       xmlsec.o
  CC       crypto.o
  CC       cmdline.o
  CCLD     xmlsec1
/usr/bin/ld: xmlsec.o: in function `xmlSecAppSignTmpl':
/xmlsec1-1.3.1/apps/xmlsec.c:1695: undefined reference to `xmlSecTransformHmacSha256GetKlass'
/usr/bin/ld: /xmlsec1-1.3.1/apps/xmlsec.c:1714: undefined reference to `xmlSecTransformSha256GetKlass'
/usr/bin/ld: xmlsec.o: in function `xmlSecAppEncryptTmpl':
/xmlsec1-1.3.1/apps/xmlsec.c:2075: undefined reference to `xmlSecTransformAes256CbcGetKlass'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoInit':
/xmlsec1-1.3.1/apps/crypto.c:29: undefined reference to `xmlSecCryptoAppInit'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:33: undefined reference to `xmlSecCryptoInit'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoShutdown':
/xmlsec1-1.3.1/apps/crypto.c:43: undefined reference to `xmlSecCryptoShutdown'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:48: undefined reference to `xmlSecCryptoAppShutdown'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrInit':
/xmlsec1-1.3.1/apps/crypto.c:59: undefined reference to `xmlSecCryptoAppDefaultKeysMngrInit'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrLoad':
/xmlsec1-1.3.1/apps/crypto.c:67: undefined reference to `xmlSecCryptoAppDefaultKeysMngrLoad'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrSave':
/xmlsec1-1.3.1/apps/crypto.c:75: undefined reference to `xmlSecCryptoAppDefaultKeysMngrSave'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrCertLoad':
/xmlsec1-1.3.1/apps/crypto.c:86: undefined reference to `xmlSecCryptoAppKeysMngrCertLoad'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrCrlLoad':
/xmlsec1-1.3.1/apps/crypto.c:106: undefined reference to `xmlSecCryptoAppKeysMngrCrlLoad'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad':
/xmlsec1-1.3.1/apps/crypto.c:132: undefined reference to `xmlSecCryptoAppGetDefaultPwdCallback'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:132: undefined reference to `xmlSecCryptoAppKeyLoadEx'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:151: undefined reference to `xmlSecCryptoAppKeyCertLoad'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:169: undefined reference to `xmlSecCryptoAppDefaultKeysMngrVerifyKey'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:183: undefined reference to `xmlSecCryptoAppDefaultKeysMngrAdoptKey'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrEngineKeyAndCertsLoad':
/xmlsec1-1.3.1/apps/crypto.c:209: undefined reference to `xmlSecCryptoAppGetDefaultPwdCallback'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:209: undefined reference to `xmlSecCryptoAppKeyLoadEx'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:230: undefined reference to `xmlSecCryptoAppKeyCertLoad'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:249: undefined reference to `xmlSecCryptoAppDefaultKeysMngrVerifyKey'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:264: undefined reference to `xmlSecCryptoAppDefaultKeysMngrAdoptKey'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrPkcs12KeyLoad':
/xmlsec1-1.3.1/apps/crypto.c:286: undefined reference to `xmlSecCryptoAppGetDefaultPwdCallback'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:286: undefined reference to `xmlSecCryptoAppKeyLoadEx'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:305: undefined reference to `xmlSecCryptoAppDefaultKeysMngrVerifyKey'
/usr/bin/ld: /xmlsec1-1.3.1/apps/crypto.c:319: undefined reference to `xmlSecCryptoAppDefaultKeysMngrAdoptKey'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrBinaryKeyLoad':
/xmlsec1-1.3.1/apps/crypto.c:375: undefined reference to `xmlSecCryptoAppDefaultKeysMngrAdoptKey'
/usr/bin/ld: crypto.o: in function `xmlSecAppCryptoSimpleKeysMngrKeyGenerate':
/xmlsec1-1.3.1/apps/crypto.c:401: undefined reference to `xmlSecCryptoAppDefaultKeysMngrAdoptKey'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:595: xmlsec1] Error 1
make[2]: Leaving directory /xmlsec1-1.3.1/apps'
make[1]: *** [Makefile:763: all-recursive] Error 1
make[1]: Leaving directory /xmlsec1-1.3.1'
make: *** [Makefile:581: all] Error 2
lsh123 commented 1 year ago

Can you attach your config.log and ./configure output?

lsh123 commented 1 year ago

Also, which version of ubuntu?

1pavlov commented 1 year ago

Also, which version of ubuntu?

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
lsh123 commented 1 year ago

All the CI jobs run successfully on Ubuntu 22.04:

https://github.com/lsh123/xmlsec/blob/master/.github/workflows/make-check.yml#L15

lsh123 commented 12 months ago

I am going to close this bug. If you still have problems, then please re-open with the information requested above to help with diagnosis.