389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
213 stars 94 forks source link

Issue 4596 - Build with clang/lld fails when LTO enabled #6392

Open vashirov opened 3 weeks ago

vashirov commented 3 weeks ago

Issue 4596 - Build with clang/lld fails when LTO enabled

Bug Description: Build with clang/lld fails with undefined reference error.

ld.lld: error: ./.libs/libslapd.so: undefined reference to __rust_probestack [--no-allow-shlib-undefined]
ld.lld: error: ./.libs/libslapd.so: undefined reference to __muloti4 [--no-allow-shlib-undefined]

Fix Description:

Fixes: https://github.com/389ds/389-ds-base/issues/4596

Reviewed by: ???

vashirov commented 3 weeks ago

This PR is a copy of https://github.com/389ds/389-ds-base/pull/4929 which got closed when I recreated my fork. Last time there was an issue building with gcc. I tried today to build it on F40 and the build was successful. So giving it another try.

vashirov commented 3 weeks ago

gcc compilation pipeline failed with:

/usr/bin/ld: ldap/servers/snmp/agent-main.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
vashirov commented 3 weeks ago

Pipeline is fixed, compilation with gcc is now successful.