I'm working on switching to LLVM's lld linker as the FreeBSD system linker (/usr/bin/ld)[1], and the port in this PR is reported as a new failure in the exp-run, PR 214864. An excerpt from the build log[2]: --- /usr/bin/ld: error: cannot preempt symbol: xine_check_version >>> defined in /usr/local/lib/libxine.so >>> referenced by emAvServerProc_xine.c >>> obj/emAvServerProc_xine.o:(main) /usr/bin/ld: error: cannot preempt symbol: xine_new >>> defined in /usr/local/lib/libxine.so >>> referenced by emAvServerProc_xine.c >>> obj/emAvServerProc_xine.o:(main) --- Known issues in this port or in lld that affect this port: (3) Shared library protected symbol preemption. reeBSD 11 and later have lld available as /usr/bin/ld.lld, so one simple option for testing is to just symlink /usr/bin/ld to ld.lld (and restore it to ld.bfd). A port Makefile knob, LLD_UNSAFE=yes, exists to indicate that a port does not work with lld, and requires either /usr/bin/ld.bfd or binutils from ports. This should work for the common case of ports written in C using GNU autoconf; it may have no effect on other ports. [1] https://lists.freebsd.org/pipermail/freebsd-current/2018-March/068985.html [2] http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/eaglemode-0.93.1.log
Via tobik@ in ports r465725, BINARY_ALIAS=ld=ld.bfd may be an effective workaround if LLD_UNSAFE does not work.
Followup, if BINARY_ALIAS is used it should be in addition to LLD_UNSAFE, so that architectures without a /usr/bin/ld.bfd (arm64) work. If possible LLD_UNSAFE=yes should imply BINARY_ALIAS=ld=ld.bfd, under discussion on the ports mailing list.
Has stack-protector only from bsd.ssp.mk. Only need SSP_UNSAFE=yes.
(In reply to w.schwarzenfeld from comment #3) The failure here does not appear to be related to bsd.ssp.mk - in that case the issue is that -fstack-protector... gets passed to the link invocation; that is not happening here.
For reference, 0 dependent ports are skipped as a result of this issue when using lld as the system linker (http://package18.nyi.freebsd.org/build.html?mastername=headamd64PR214864-default&build=2018-03-21_17h43m11s)
LLD_UNSAFE is insufficient; with it we still have: Making directory: lib/emAv xine-config is DEPRECATED. Use pkg-config instead. cc -O2 -pipe -fstack-protector -fno-strict-aliasing -fexceptions -fmessage-length=0 -Wall -Winline -Wpointer-arith -Wredundant-decls -Wsign-compare -Wwrite-strings -Iinclude -I/usr/local/include -c src/emAv/emAvServerProc_xine.c -o obj/emAvServerProc_xine.o cc -Llib -L/usr/local/lib obj/emAvServerProc_xine.o -lxine -L/usr/local/lib -lxine -lm -o lib/emAv/emAvServerProc_xine /usr/bin/ld: error: cannot preempt symbol: xine_check_version >>> defined in /usr/local/lib/libxine.so >>> referenced by emAvServerProc_xine.c >>> obj/emAvServerProc_xine.o:(main) ...
LDFLAGS=-Wl,-z,notext didn’t work but adding -fPIC to flags did
Created attachment 197004 [details] Fix LLD build
Created attachment 197005 [details] Fix LLD
Patch LGTM
Neither LLD_UNSAFE nor extra compiler flags are needed after r488328
Still failing on i386 when LLD is /usr/bin/ld: http://package18.nyi.freebsd.org/build.html?mastername=headi386PR214864-default&build=2019-01-05_21h00m02s http://package18.nyi.freebsd.org/data/headi386PR214864-default/2019-01-05_21h00m02s/logs/errors/eaglemode-0.94.0.log
It was fixed on Jan 8th.
(In reply to Dmitry Marakasov from comment #13) > It was fixed on Jan 8th. Thanks, I didn't notice the change - sorry for the false alarm.