libgccjit 5.2 on Mac OSX Yosemite

David Malcolm dmalcolm@redhat.com
Thu Jan 1 00:00:00 GMT 2015


On Mon, 2015-08-10 at 23:52 +0100, Dibyendu Majumdar wrote:

[CCing the list]

> On 10 August 2015 at 22:35, David Malcolm <dmalcolm@redhat.com> wrote:
> > Please can you try enabling logging using:
> > https://gcc.gnu.org/onlinedocs/jit/topics/contexts.html#gcc_jit_context_set_logfile
> >
> > to capture the driver invocation line (have a look for invoke_driver in
> > the log).
> >
> > You'll also need to set the bool option
> > GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES to stop it deleting everything.
> >
> 
> JIT:      entering: void
> gcc::jit::playback::context::invoke_driver(const char*, const char*,
> const char*, timevar_id_t, bool, bool)
> 
> JIT:       argv[0]: x86_64-apple-darwin14.4.0-gcc-5.2.0
> 
> JIT:       argv[1]: -shared
> 
> JIT:       argv[2]:
> /var/folders/lm/ygx0frjs7h30b03r14k7jfhh0000gn/T//libgccjit-BmebwW/fake.s
> 
> JIT:       argv[3]: -o
> 
> JIT:       argv[4]:
> /var/folders/lm/ygx0frjs7h30b03r14k7jfhh0000gn/T//libgccjit-BmebwW/fake.so
> 
> JIT:       argv[5]: -fno-use-linker-plugin
> 
> JIT:       argv[6]: (null)
> 
> Undefined symbols for architecture x86_64:
> 
>   "_luaD_poscall", referenced from:
> 
>       _ravif1 in ccouygd9.o
> 
>   "_luaF_close", referenced from:
> 
>       _ravif1 in ccouygd9.o
> 
> ld: symbol(s) not found for architecture x86_64
> 
> 
> 
> > With that, you can try to re-run the driver invocation directly from the
> > command-line, to see if you can reproduce the problem there, and if the
> > extra option above
> >   -Wl,-undefined,dynamic_lookup
> > fixes it.
> >
> 
> Appears to fix the error.
> 
> x86_64-apple-darwin14.4.0-gcc-5.2.0 -shared
> /var/folders/lm/ygx0frjs7h30b03r14k7jfhh0000gn/T//libgccjit-BmebwW/fake.s
> -o /var/folders/lm/ygx0frjs7h30b03r14k7jfhh0000gn/T//libgccjit-BmebwW/fake.so
> -fno-use-linker-plugin -Wl,-undefined,dynamic_lookup
> 
> ls -l /var/folders/lm/ygx0frjs7h30b03r14k7jfhh0000gn/T//libgccjit-BmebwW/fake.so
> 
> -rwxr-xr-x  1 dibyendumajumdar  staff  8504 10 Aug 23:51
> /var/folders/lm/ygx0frjs7h30b03r14k7jfhh0000gn/T//libgccjit-BmebwW/fake.so

Thanks.

Here's a patch which adds that argument to the driver invocation (it's
against trunk, but it ought to apply to gcc-5 also).

Does it fix things?


Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-jit-on-OS-X-add-Wl-undefined-dynamic_lookup-to-drive.patch
Type: text/x-patch
Size: 1212 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/jit/attachments/20150101/79494d17/attachment.bin>


More information about the Jit mailing list