wolfSSL / wolfssl

The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
https://www.wolfssl.com
GNU General Public License v2.0
2.37k stars 834 forks source link

[Bug]: failed build on CentOS 10 with --enable-distro #8217

Open sergey-safarov opened 1 week ago

sergey-safarov commented 1 week ago

Contact Details

s.safarov@gmail.com

Version

5.7.4

Description

wolfssl build failed on CentOS 10 with --enable-distro Similar ticket https://github.com/wolfSSL/wolfssl/issues/8190 but CentOS:11 will come after several years and probable need to look other way to build on this dist.

Reproduction steps

./configure --enable-distro
make rpm
mkdir -p ~/rpmbuild/SOURCES/
rpmbuild -bb --undefine=_disable_source_fetch rpm/spec

Relevant log output

CC       tests/unit_test-hash.o
  CC       tests/unit_test-w64wrapper.o
  CC       tests/unit_test-srp.o
  CC       tests/unit_test-quic.o
  CCLD     src/libwolfssl.la
/usr/bin/ld: wolfcrypt/src/.libs/src_libwolfssl_la-ecc.o: unable to decompress section .gnu.debuglto_.debug_str
/usr/bin/ld: /tmp/ccCsjjfw.ltrans5.ltrans.o: in function `wolfCrypt_Init':
/root/rpmbuild/BUILD/wolfssl-5.7.4/wolfcrypt/src/wc_port.c:370:(.text+0x60e2): undefined reference to `wc_ecc_oid_cache_init'
/usr/bin/ld: /tmp/ccCsjjfw.ltrans5.ltrans.o: in function `wolfCrypt_Cleanup':
/root/rpmbuild/BUILD/wolfssl-5.7.4/wolfcrypt/src/wc_port.c:468:(.text+0x6134): undefined reference to `wc_ecc_oid_cache_free'
/usr/bin/ld: /tmp/ccCsjjfw.ltrans19.ltrans.o: in function `ec_point_convert_to_affine':
/root/rpmbuild/BUILD/wolfssl-5.7.4/src/pk.c:10739:(.text+0x99ff): undefined reference to `ecc_map'
/usr/bin/ld: /tmp/ccCsjjfw.ltrans7.ltrans.o: in function `EccSpecifiedECDomainDecode.lto_priv.0':
/root/rpmbuild/BUILD/wolfssl-5.7.4/wolfcrypt/src/asn.c:34137:(.text+0x5e61): undefined reference to `wc_ecc_free_curve'
/usr/bin/ld: /tmp/ccCsjjfw.ltrans20.ltrans.o: in function `wolfssl_ec_point_add':
/root/rpmbuild/BUILD/wolfssl-5.7.4/src/pk.c:11040:(.text+0x2ecb): undefined reference to `ecc_projective_add_point'
/usr/bin/ld: /root/rpmbuild/BUILD/wolfssl-5.7.4/src/pk.c:11047:(.text+0x2eeb): undefined reference to `ecc_map'
/usr/bin/ld: /tmp/ccCsjjfw.ltrans20.ltrans.o: in function `wolfssl_ec_point_mul':
/root/rpmbuild/BUILD/wolfssl-5.7.4/src/pk.c:11151:(.text+0x3684): undefined reference to `ecc_mul2add'
/usr/bin/ld: /tmp/ccCsjjfw.ltrans29.ltrans.o: in function `eccsi_mulmod_base_add.constprop.0':
/root/rpmbuild/BUILD/wolfssl-5.7.4/wolfcrypt/src/eccsi.c:1375:(.text+0x2557): undefined reference to `ecc_projective_add_point'
/usr/bin/ld: /root/rpmbuild/BUILD/wolfssl-5.7.4/wolfcrypt/src/eccsi.c:1379:(.text+0x2577): undefined reference to `ecc_map'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:6342: src/libwolfssl.la] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/root/rpmbuild/BUILD/wolfssl-5.7.4'
make[1]: *** [Makefile:9026: all-recursive] Error 1
make[1]: Leaving directory '/root/rpmbuild/BUILD/wolfssl-5.7.4'
make: *** [Makefile:5376: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.mDurIr (%build)

RPM build warnings:
    Downloading http://wolfssl.com/wolfssl-5.7.4.tar.gz to /root/rpmbuild/SOURCES/wolfssl-5.7.4.tar.gz

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.mDurIr (%build)
philljj commented 1 week ago

Hi @sergey-safarov,

Thank you for the report, I will look at this.

Best, Jordan

philljj commented 2 days ago

Hi @sergey-safarov,

Sorry for the slow reply.

I tried this first with Centos 9 Stream latest, and the build worked.

I then tried the same with Centos 10 Stream latest (from the centos mirror) and found the same build issue that you did.

It seems like Centos 10 Stream is not yet officially released and is still experimental. I would recommend in the meantime to try building with docker (make rpm-docker), or to use Centos 9.

Best, Jordan