Re: mkmf problems on Mac OS X Leopard
by Laurent Sansonetti other posts by this author
Oct 29 2007 2:15PM messages near this date
mkmf problems on Mac OS X Leopard
|
Re: mkmf problems on Mac OS X Leopard
On Oct 29, 2007 4:10 PM, Wincent Colaiuta <win@[...].com> wrote:
> Here's an excerpt from a simple extconf.rb:
>
> have_header('antlr3.h')
> have_library('antlr3c', 'antlr3ParserNew')
>
> The "have_library" line worked fine on the previous version of Mac OS
> X (Tiger), but under Leopard it can't find the library. Output is:
>
> checking for antlr3ParserNew() in -lantlr3c... no
>
> The library is definitely present at "/usr/local/lib/libantlr3c.a" and
> inspection using the "nm" tool reveals that the "antlr3ParserNew"
> symbol is definitely present in the library.
>
Maybe this is because Leopard's Ruby builds its extensions universal
(for both i386 and ppc architectures), and that
"/usr/local/lib/libantlr3c.a" isn't universal.
You can verify this using:
$ file /usr/local/lib/libantlr3c.a
If the library is only compiled for your arch, the solution is to
appropriately set the ARCHFLAGS environment variable.
The following page has some information regarding ARCHFLAGS:
http://trac.macosforge.org/projects/ruby/wiki/WhatsNewInLeopard#Ruby
Laurent
Thread:
Wincent Colaiuta
Laurent Sansonetti
Wincent Colaiuta
Tim Hunter
Wincent Colaiuta
Wincent Colaiuta
Has
|