Summary: | databases/postgresql96-contrib: linker error: can't create dynamic relocation | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | O. Hartmann <ohartmann> | ||||
Component: | Individual Port(s) | Assignee: | pgsql | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Many People | CC: | emaste, girgen, ohartmann, trix | ||||
Priority: | --- | Keywords: | patch | ||||
Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(pgsql) |
||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220580 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229523 |
||||||
Bug Depends on: | |||||||
Bug Blocks: | 214864 | ||||||
Attachments: |
|
Description
O. Hartmann
2017-06-03 18:06:28 UTC
Confirmed with LLD 5.0.0 in FreeBSD-current: /usr/bin/ld: error: can't create dynamic relocation R_X86_64_PC32 against symbol: __mb_sb_limit in readonly segment >>> defined in /lib/libc.so.7 >>> referenced by pgstrcasecmp.c >>> pgstrcasecmp.o:(pg_strcasecmp) in archive ../../src/port/libpgport.a /usr/bin/ld: error: can't create dynamic relocation R_X86_64_PC32 against symbol: _CurrentRuneLocale in readonly segment >>> defined in /lib/libc.so.7 >>> referenced by pgstrcasecmp.c >>> pgstrcasecmp.o:(pg_strcasecmp) in archive ../../src/port/libpgport.a /usr/bin/ld: error: can't create dynamic relocation R_X86_64_32 against symbol: _DefaultRuneLocale in readonly segment >>> defined in /lib/libc.so.7 >>> referenced by pgstrcasecmp.c >>> pgstrcasecmp.o:(pg_strcasecmp) in archive ../../src/port/libpgport.a Created attachment 185680 [details]
databases/postgresql*: set LLD_UNSAFE
*** Bug 220580 has been marked as a duplicate of this bug. *** Worked around by r456635, https://svnweb.freebsd.org/changeset/ports/456635 @ed is this a work-around or a proper fix? Can we close this issue? Palle *** Bug 221827 has been marked as a duplicate of this bug. *** I've verified that it works after Ed's commit LLD_UNSAFE is really a workaround - we just cause things to build as they do in the absence of lld as /usr/bin/ld, while further investigation happens. At least the "can't create dynamic relocation ... in readonly segment" issue stems from different defaults in ld.bfd and ld.lld -- bfd defaults to -z notext (allow relocations against readonly segments) while lld defaults to -z text (relocations in readonly segments are an error). It may be that adding "LDFLAGS+= -Wl,-z,notext" (and removing LLD_UNSAFE) will let the port build with lld. I think it's fine to close this PR if you like; we can later iterate on finding the ports marked with LLD_UNSAFE and trying to switch them to linking with lld. Closing the PR since Ed's work around is committed. Thanks! |