Bug 213866

Summary: devel/p5-subversion fails to build on arm64
Product: Ports & Packages Reporter: Glen Barber <gjb>
Component: Individual Port(s)Assignee: Lev A. Serebryakov <lev>
Status: Closed FIXED    
Severity: Affects Only Me CC: Andrew, emaste, linimon
Priority: --- Flags: bugzilla: maintainer-feedback? (lev)
Version: Latest   
Hardware: arm64   
OS: Any   
Bug Depends on:    
Bug Blocks: 201763    

Description Glen Barber freebsd_committer 2016-10-28 18:43:53 UTC
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

make[2]: stopped in /wrkdirs/usr/ports/devel/p5-subversion/work/subversion-1.9.4/subversion/bindings/swig/perl/native
*** Error code 1

make[1]: stopped in /wrkdirs/usr/ports/devel/p5-subversion/work/subversion-1.9.4
*** Error code 1

make: stopped in /usr/ports/devel/p5-subversion
Comment 1 Lev A. Serebryakov freebsd_committer 2016-10-28 18:54:41 UTC
Looks like it should be "generic" problem with perl/swig, not subversion-specific
Comment 2 Andrew Turner freebsd_committer 2016-11-08 13:13:45 UTC
Adding CFLAGS_aarch64=-fPIC to devel/p5-subversion/Makefile fixes the build for me on a ThunderX.
Comment 3 Lev A. Serebryakov freebsd_committer 2017-02-01 17:45:26 UTC
Fixed, thank you, Andrew!
Comment 4 commit-hook freebsd_committer 2017-02-01 17:45:33 UTC
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

   Fix build on aarch64

  PR:		213866
  Submitted by:	Andrew Turner <Andrew@FreeBSD.org>
  Reported by:	Glen Barber <gjb@FreeBSD.org>