Bug 220580

Summary: databases/postgresql96-client: (LLD) linker error: can't create dynamic relocation R_X86_64_PC32 against symbol
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: pgsql
Status: Closed DUPLICATE    
Severity: Affects Many People CC: emaste, trix
Priority: --- Flags: bugzilla: maintainer-feedback? (pgsql)
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219758
Bug Depends on:    
Bug Blocks: 214864    
Attachments:
Description Flags
set LLD_UNSAFE for pgsql none

Description O. Hartmann 2017-07-09 12:59:09 UTC
On 12-CURRENT (12.0-CURRENT #15 r320829: Sun Jul  9 14:21:44 CEST 2017 amd64), port databases/postgresql96-client started recently failing compiling due to linker error when system (OS) is build WITH_LLD_IS_LD=YES.

The same happens to poudriere build (most recent poudriere, jail is the very same copied/installed from /usr/src. In poudriere, even linking ld -> ld.bfd doesn't resolve the problem as it does on a system which has been installed WITH_LLD_IS_LD=YES and then link ld -> ll.bdf. This "trick" worked for me on the host.


[...]
cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -pipe -O3  -O3 -funroll-loops -fstack-protector -fno-strict-aliasing -fPIC -DPIC -L../../src/port -L../../src/common -L/usr/local/lib -lpthread -lgssapi -L/usr/local/lib  -fstack-protector  -L/usr/local/lib -Wl,--as-needed -Wl,-R'/usr/local/lib' -L../../src/port -lpgport -lgssapi -shared -o timetravel.so timetravel.o
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_strcasecmp): can't create dynamic relocation R_X86_64_PC32 against symbol '__mb_sb_limit' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_strcasecmp): can't create dynamic relocation R_X86_64_PC32 against symbol '_CurrentRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_strcasecmp): can't create dynamic relocation R_X86_64_32 against symbol '_DefaultRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_strncasecmp): can't create dynamic relocation R_X86_64_PC32 against symbol '__mb_sb_limit' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_strncasecmp): can't create dynamic relocation R_X86_64_PC32 against symbol '_CurrentRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_strncasecmp): can't create dynamic relocation R_X86_64_32 against symbol '_DefaultRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_toupper): can't create dynamic relocation R_X86_64_PC32 against symbol '__mb_sb_limit' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_toupper): can't create dynamic relocation R_X86_64_PC32 against symbol '_CurrentRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_toupper): can't create dynamic relocation R_X86_64_32 against symbol '_DefaultRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_toupper): can't create dynamic relocation R_X86_64_PC32 against symbol '_CurrentRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_toupper): can't create dynamic relocation R_X86_64_32 against symbol '_DefaultRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_tolower): can't create dynamic relocation R_X86_64_PC32 against symbol '__mb_sb_limit' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_tolower): can't create dynamic relocation R_X86_64_PC32 against symbol '_CurrentRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_tolower): can't create dynamic relocation R_X86_64_32 against symbol '_DefaultRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_tolower): can't create dynamic relocation R_X86_64_PC32 against symbol '_CurrentRuneLocale' defined in /lib/libc.so.7
/usr/bin/ld: error: pgstrcasecmp.c:(function pg_tolower): can't create dynamic relocation R_X86_64_32 against symbol '_DefaultRuneLocale' defined in /lib/libc.so.7
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [../../src/Makefile.port:16: timetravel.so] Error 1
gmake[3]: Leaving directory '/usr/ports/databases/postgresql96-client/work/postgresql-9.6.3/contrib/spi'
gmake[2]: *** [GNUmakefile:111: submake-contrib-spi] Error 2
gmake[2]: Leaving directory '/usr/ports/databases/postgresql96-client/work/postgresql-9.6.3/src/test/regress'
*** Error code 2
Comment 1 Ed Maste freebsd_committer freebsd_triage 2017-08-22 20:31:20 UTC
This is a duplicate of PR219758?
Comment 2 Ed Maste freebsd_committer freebsd_triage 2017-12-07 15:38:43 UTC
Created attachment 188615 [details]
set LLD_UNSAFE for pgsql
Comment 3 Ed Maste freebsd_committer freebsd_triage 2017-12-07 15:42:38 UTC
Oh, I had already added the patch in PR219758. Closing this as a duplicate.

*** This bug has been marked as a duplicate of bug 219758 ***