pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH] devel/gmp: illegal text-relocation on OS X Yosemite



Hello!

On OS X Yosemite 10.10.4 with Xcode 6.4, building for x86_64, devel/gmp
from pkgsrc-2015Q2 fails to build with the following error:

===
ld: illegal text-relocation to '___gmp_binvert_limb_table' in .libs/mp_minv_tab.o from '___gmpn_divexact_1' in mpn/.libs/dive_1.o for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
===

Has anyone else hit this?

Disabling assembly loops by adding the "--disable-assembly" configure
option allows it to build.  A patch against pkgsrc-2015Q2 to do this on
Darwin is below.  Would a developer be willing to review this patch and
commit?

Thank you!

Lewis

P.S. I had the same problem earlier this year [1].

[1] http://mail-index.netbsd.org/pkgsrc-users/2015/04/18/msg021399.html

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gmp/Makefile,v
retrieving revision 1.77
diff -u -r1.77 Makefile
--- Makefile	30 Mar 2015 18:48:08 -0000	1.77
+++ Makefile	10 Jul 2015 20:45:46 -0000
@@ -74,6 +74,15 @@
 .  endif
 .endif
 
+# On OS X Yosemite (10.10.3 with Xcode 6.3 and 10.10.4 with Xcode 6.4), the
+# build for version 6.0.0a fails with the linker complaining about an illegal
+# text-relocation ("to '___gmp_binvert_limb_table' in .libs/mp_minv_tab.o
+# from '___gmpn_divexact_1' in mpn/.libs/dive_1.o for architecture x86_64").
+# Disabling assembly loops makes it build successfully.
+.if ${OPSYS} == "Darwin"
+CONFIGURE_ARGS+=	--disable-assembly
+.endif
+
 pre-configure:
 	cd ${WRKSRC} && type autoconf && autoconf



Home | Main Index | Thread Index | Old Index