pkgsrc-Users archive

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

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

On Sat, Jul 11, 2015 at 07:11:21PM -0400, Greg Troxel wrote:
> I wonder if this should be adjusted to be on 10.10 only, or if we
> should just simplify all OS X because one is flaky.

Hi, Greg.

OK, below is a new patch that only applies the change for OS X Yosemite
and above.

> Can someone else with a 10.10 system try this?  I would like to
> understand if this is a general 10.10 issue vs something odd with
> jlmuir@'s system.  I certainly have seen mysterious non-repeatable
> issues on macs before...

I agree that there can be mysterious issues, so I'd be happy for someone
else to confirm too.  I will note, however, that, looking more closely
at the existing Makefile, I see the following if ${MACHINE_ARCH} ==
"i386" and ${OPSYS} == "Darwin" (among others):

  # don't use x86 assembly (it doesn't build)
  CONFIGURE_ENV+=         MPN_PATH="generic"

I don't know anything about MPN_PATH, but trusting the comment, perhaps
assembly is disabled already for Darwin/i386?  But not x86_64.

I've gone back and reviewed my setup, so I'll give more details about
it now.  I'm using pbulk to build in a chroot as described in Jonathan
Perkin's "Distributed chrooted pkgsrc bulk builds" post [1].  Instead of
the patch provided in that post, I used the patch from commit 872bcad194
[2] from Joyent's GitHub joyent/feature/miscfix/2015Q2 branch.

Perhaps the biggest different between my setup and most others is that
I'm using Command Line Tools (OS X 10.10) for Xcode 6.4 [3] (free
download with a free Apple ID); I'm *not* using the command line tools
that come with because unfortunately they don't work inside
the chroot. :-(

In the chroot, I don't make /Applications available (where
is), and I set the DEVELOPER_DIR environment variable (see the
xcode-select(1) man page) to "/Library/Developer/CommandLineTools" (to
select the Command Line Tools).  I set this in the environment before
invoking bulkbuild, and I set it in pbulk.conf so that it gets set for
the unprivileged pbulk user.  I set DEVELOPER_DIR before bootstrapping
the separate pbulk pkgsrc prefix, and I build the 2015Q2 bootstrap
tarball inside the chroot.




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	16 Jul 2015 00:59:40 -0000
@@ -74,6 +74,17 @@
 .  endif
+# On OS X Yosemite (10.10.4 / Darwin 14.4.0) with Command Line Tools
+# (OS X 10.10) for Xcode 6.4, building version 6.0.0a for x86_64
+# 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" && \
+     (!empty(OS_VERSION:M1[4-9].*) || !empty(OS_VERSION:M[2-9][0-9].*))
+CONFIGURE_ARGS+=	--disable-assembly
 	cd ${WRKSRC} && type autoconf && autoconf

Home | Main Index | Thread Index | Old Index