public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: libgccjit 5.2 on Mac OSX Yosemite
@ 2015-01-01  0:00 Dibyendu Majumdar
  2015-01-01  0:00 ` Dibyendu Majumdar
  0 siblings, 1 reply; 5+ messages in thread
From: Dibyendu Majumdar @ 2015-01-01  0:00 UTC (permalink / raw)
  To: David Malcolm; +Cc: jit

Hi Dave,
You may want to submit the patch also to the homebrew folks once I have
confirmed it works as without this the official 5.2 distro isn't going
to work on Mac OSX.

Regards

From: David Malcolm
Sent: ‎11/‎08/‎2015 17:21
To: Dibyendu Majumdar
Cc: jit@gcc.gnu.org
Subject: Re: libgccjit 5.2 on Mac OSX Yosemite
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-14 20:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-01  0:00 libgccjit 5.2 on Mac OSX Yosemite Dibyendu Majumdar
2015-01-01  0:00 ` Dibyendu Majumdar
2015-01-01  0:00   ` David Malcolm
2015-01-01  0:00     ` Dibyendu Majumdar
2015-01-01  0:00   ` [PATCH, committed] jit: on OS X, add -Wl,-undefined,dynamic_lookup to driver invocation David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).