≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1503

Bug #1503: Incorrect arch flag passed in when building on 64-bit platform

Kind bug
Product wikitext
When Created 2010-03-21T13:10:05Z, updated 2010-03-30T13:15:05Z
Status closed
Reporter Greg Hurrell
Tags no tags

Description

Not really sure how to make this do the right thing, but on a 64-bit iMac I'm seeing lines like this:

cc -arch i386 ...

When I understand the appropriate arch would be:

cc -arch x86_64 ...

As a result, when trying to actually use the built extension on a 64-bit platform we get:

wikitext.bundle: dlopen(wikitext.bundle, 9): no suitable image found.  Did find: (LoadError)
wikitext.bundle: mach-o, but wrong architecture - wikitext.bundle

My initial attempt at building with explicit environment override didn't have any impact on the -arch setting:

ARCHFLAGS="-arch x86_64" rake make

Passing this in directly to ruby rather than rake, however, works:

ARCHFLAGS="-arch x86_64" ruby extconf.rb

Comments

  1. Greg Hurrell 2010-03-21T13:15:27Z

    Bah, just tried again, and now I am correctly getting a "fat" 32/64-bit extension.

    Will have to mark this as closed.

  2. Greg Hurrell 2010-03-21T13:15:33Z

    Status changed:

    • From: new
    • To: closed
  3. Greg Hurrell 2010-03-21T13:37:24Z

    Ok, just to provide the complete picture. The wrong ARCHFLAGS were due to an evil override in the Rakefile itself. This has now been fixed and I'll be publishing a new release soon.

Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets