LD_RUN_PATH="/usr/local/lib:/wrkdirs/usr/ports/devel/p5-subversion/work/subversion-1.9.4/subversion/bindings/swig/perl/libsvn_swig_perl/.libs" cc -shared -L/usr/local/lib/perl5/5.20/mach/CORE -lperl -L/usr/local/lib -fstack-protector core.o ../libsvn_swig_perl/.libs/libsvn_swig_perl-1.a -o blib/arch/auto/SVN/_Core/_Core.so -L/wrkdirs/usr/ports/devel/p5-subversion/work/subversion-1.9.4/subversion/bindings/swig/perl/libsvn_swig_perl/.libs -lsvn_client-1 -lsvn_delta-1 -lsvn_fs-1 -lsvn_ra-1 -lsvn_repos-1 -lsvn_wc-1 -lsvn_diff-1 -lsvn_subr-1 -lsvn_swig_perl-1 /usr/bin/ld: ../libsvn_swig_perl/.libs/libsvn_swig_perl-1.a(swigutil_pl.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `PL_thr_key' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../libsvn_swig_perl/.libs/libsvn_swig_perl-1.a(swigutil_pl.o)(.text+0x7c): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `PL_thr_key' /usr/bin/ld: final link failed: Bad value cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make[2]: stopped in /wrkdirs/usr/ports/devel/p5-subversion/work/subversion-1.9.4/subversion/bindings/swig/perl/native *** Error code 1 Stop. make[1]: stopped in /wrkdirs/usr/ports/devel/p5-subversion/work/subversion-1.9.4 *** Error code 1 Stop. make: stopped in /usr/ports/devel/p5-subversion
Looks like it should be "generic" problem with perl/swig, not subversion-specific
Adding CFLAGS_aarch64=-fPIC to devel/p5-subversion/Makefile fixes the build for me on a ThunderX.
Fixed, thank you, Andrew!
A commit references this bug: Author: lev Date: Wed Feb 1 17:45:12 UTC 2017 New revision: 433060 URL: https://svnweb.freebsd.org/changeset/ports/433060 Log: Fix build on aarch64 PR: 213866 Submitted by: Andrew Turner <Andrew@FreeBSD.org> Reported by: Glen Barber <gjb@FreeBSD.org> Changes: head/devel/p5-subversion/Makefile