Bug 253980

Summary: security/ipv6toolkit: can't create dynamic relocation R_X86_64_32S against local symbol in readonly segment
Product: Ports & Packages Reporter: Trond.Endrestol
Component: Individual Port(s)Assignee: Hiroki Sato <hrs>
Status: New ---    
Severity: Affects Only Me Keywords: buildisok
Priority: --- Flags: bugzilla: maintainer-feedback? (hrs)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for security/ipv6toolkit/files/Makefile.lib.in adding CFLAGS+=-fPIC none

Description Trond.Endrestol 2021-03-03 11:28:36 UTC
Created attachment 222939 [details]
Patch for security/ipv6toolkit/files/Makefile.lib.in adding CFLAGS+=-fPIC

On yesterday's src/main amd64 with the ports tree at r567033, security/ipv6toolkit fails to build unless the library's object files are compiled with -fPIC.

--- addr6 ---
cc -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -I/usr/ports/workdirs/usr/ports/security/ipv6toolkit/work/ipv6toolkit-v2.0/addr6/../tools -DIPV6TOOLKITCONF=\"/usr/local/etc/ipv6toolkit.conf\" -fPIE -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/11.0.1/include -fstack-protector-strong -Qunused-arguments  -fstack-protector-strong  -pie   -o addr6 addr6.o  -lpcap -lm /usr/ports/workdirs/usr/ports/security/ipv6toolkit/work/ipv6toolkit-v2.0/libipv6/libipv6.a
ld: error: can't create dynamic relocation R_X86_64_32S against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /usr/ports/workdirs/usr/ports/security/ipv6toolkit/work/ipv6toolkit-v2.0/libipv6/libipv6.a(libipv6.o)
>>> referenced by libipv6.c
>>>               libipv6.o:(is_service_port) in archive /usr/ports/workdirs/usr/ports/security/ipv6toolkit/work/ipv6toolkit-v2.0/libipv6/libipv6.a
Comment 1 Automation User 2021-03-18 01:23:11 UTC
Build and package info is available at https://gitlab.com/swills/freebsd-ports/pipelines/272308027