https://bugs.openldap.org/show_bug.cgi?id=9441
Issue ID: 9441 Summary: make error on centos8 Product: OpenLDAP Version: 2.4.57 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: build Assignee: bugs@openldap.org Reporter: tchatz@arx.gr Target Milestone: ---
I tried to compile openldap on centos8
using ./configure --with-cyrus-sasl --enable-crypt --enable-slapd --enable-perl
and I got a an error in make which I dont understand. I present when the funny messages start appearing and a couple of lines before(just in case they help)
cc -g -O2 -o slapd main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o lock.o controls.o extended.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o txn.o slapschema.o version.o -Wl,--enable-new-dtags -Wl,-z -Wl,relro -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,relro -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -pthread libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/.libs/libldap_r.a /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a ../../libraries/liblber/.libs/liblber.a -ldb-5.3 -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -ldl -lm -lutil -lsasl2 -lcrypt -lresolv -pthread daemon.o: In function `slap_listener': /usr/local/src/openldap-2.4.57/servers/slapd/daemon.c:1934: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead /usr/local/src/openldap-2.4.57/servers/slapd/daemon.c:1934: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead /usr/bin/ld: main.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: bconfig.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
lots of same messages for various *.o and *.a files ....................................... ........................................ ...................................... /usr/bin/ld: /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a(decode.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a(encode.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a(io.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a(bprint.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a(debug.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a(memory.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a(options.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /usr/local/src/openldap-2.4.57/libraries/liblber/.libs/liblber.a(sockbuf.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make[2]: *** [Makefile:518: slapd] Error 1 make[2]: Leaving directory '/usr/local/src/openldap-2.4.57/servers/slapd' make[1]: *** [Makefile:291: all-common] Error 1 make[1]: Leaving directory '/usr/local/src/openldap-2.4.57/servers' make: *** [Makefile:312: all-common] Error 1
O dont understand what "ld: final link failed: Nonrepresentable section on output" means and if this is the error at all to be honest.
Any help would be much appreciated as I dont have any idea how to continue
https://bugs.openldap.org/show_bug.cgi?id=9441
Thomas tchatz@arx.gr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tchatz@arx.gr OS|All |Linux Hardware|All |x86_64
https://bugs.openldap.org/show_bug.cgi?id=9441
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Howard Chu hyc@openldap.org --- Do what the error message tells you to do.
/usr/bin/ld: bconfig.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
Recompile all of the code with -fPIC added to CFLAGS.
https://bugs.openldap.org/show_bug.cgi?id=9441
Thomas tchatz@arx.gr changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |FIXED
--- Comment #2 from Thomas tchatz@arx.gr --- Thank you Howard! It worked like this, some warnings only, which I think is not a big deal. I thought the message was saying that it is being recompiling with fPIC of some sort. But isnt fPIC supposed to be used when you are building a shared library? or is it because I used enable-perl?
https://bugs.openldap.org/show_bug.cgi?id=9441
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Resolution|FIXED |INVALID