On Oct 29, 10:13 pm, "Laurent Sansonetti" <laurent.sansone... / gmail.com> wrote: > > 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 Many thanks, Laurent; that was it. Running mkmf as follows allows it to find the function: ARCHFLAGS="-arch i386" ruby extconf.rb Good to know that this workaround works. As a longer term solution I'll try building a universal binary version of the ANTLR runtime. Cheers, Wincent