[Bug 278141] stable/13: Incremental build sometimes gives "ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC" for ftpd(8) and sshd(8)
Date: Fri, 20 Mar 2026 10:20:34 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278141 --- Comment #3 from Trond Endrestøl <Trond.Endrestol@ximalas.info> --- (In reply to polyduekes from comment #2) After commit 14b9955e57cc28b61e785165b9effcbe620edb46, I get these error messages during make buildworld for 16.0-CURRENT: Building shared library libstats.so.0 ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC >>> defined in legacyprov.pico >>> referenced by legacyprov.c >>> legacyprov.pico:(OSSL_provider_init) ld: error: relocation R_X86_64_PC32 cannot be used against symbol '__stack_chk_guard'; recompile with -fPIC >>> defined in /usr/obj/usr/src/amd64.amd64/tmp/lib/libc.so.7 >>> referenced by legacyprov.c >>> legacyprov.pico:(ERR_set_error) ld: error: relocation R_X86_64_PC32 cannot be used against symbol '__stack_chk_guard'; recompile with -fPIC >>> defined in /usr/obj/usr/src/amd64.amd64/tmp/lib/libc.so.7 >>> referenced by legacyprov.c >>> legacyprov.pico:(ERR_set_error) ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC >>> defined in legacyprov.pico >>> referenced by legacyprov.c >>> legacyprov.pico:(legacy_gettable_params) ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC >>> defined in legacyprov.pico >>> referenced by legacyprov.c >>> legacyprov.pico:(legacy_get_params) … ad neuseum … I doubt this has anything to do with compiling the source tree in parallel when allowing an astronomical amount of parallel processes. The only way out in this case is to comment out PICFLAG+=-DOPENSSL_PIC in secure/lib/libcrypto/modules/Makefile.inc. Just for kicks, I tried adding PICFLAG+=-DOPENSSL_PIC in secure/lib/libcrypto/modules/legacy/Makefile to no avail. -- You are receiving this mail because: You are the assignee for the bug.