compiling for 32bit on a 64bit machine

Ben Martin monkeyiq at users.sourceforge.net
Thu Dec 27 18:25:48 PST 2012


On Thu, 2012-12-27 at 19:35 -0600, Ryan Schmidt wrote:
> On Dec 27, 2012, at 19:03, Ben Martin <monkeyiq at users.sourceforge.net>
> wrote:
> 
> >  I have a macport of fontforge from git which I can build and run
> just
> > fine on a Mountain Lion machine. I'm trying to broaden the
> compatibility
> > list for the generated pkg to allow a wider range of users to
> install
> > the generated binary.
> > 
> >  First up I added:
> > macosx_deployment_target  10.6
> > 
> >  Then I discovered somebody getting an "Illegal instruction" error
> and
> > this would seem to be that they are running on a Mac-Book-Pro
> > root:xnu-1504.15.3~1/RELEASE_I386 i386.
> > 
> >  So then I tried adding to my macports.conf file:
> > build_arch   i386
> 
> I'd recommend keeping build_arch at x86_64, and setting
> universal_archs to i386 x86_64 (should already be set that way) and
> then building ports with the +universal variant.

yep, universal_archs was already set that way. I hadn't changed things,
but for the benefit of later readers I thought I'd ack the setting.
> 
> However, setting build_arch i386 should have worked and you should not
> have encountered an error

Mixed news I guess, setting +universal and rebuilding everything
generated the same compiler crash.
> 
> > ld: warning: ignoring file .libs/splinerefigure.o, file was built
> for
> > unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x
> 3
> > 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture
> being
> > linked (i386): .libs/splinerefigure.o
> 
> This kind of thing has appeared often; you can search the issue
> tracker. I don't remember what the ultimate solution turned out to be,
> or if there even was one.

I found a few threads like it, but still haven't found the evasive
solution. For me it appears that some of the code was being made with
64bit and linked to 32bit. Forcing to 32bit then caused the compiler to
crash.

Maybe I can bisect the file that crashes the compiler to see what it
doesn't like.




More information about the macports-users mailing list