Bug 213866 - devel/p5-subversion fails to build on arm64
Summary: devel/p5-subversion fails to build on arm64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Lev A. Serebryakov
URL:
Keywords:
Depends on:
Blocks: 201763
  Show dependency treegraph
 
Reported: 2016-10-28 18:43 UTC by Glen Barber
Modified: 2017-02-01 17:45 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (lev)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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

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
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

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