[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2021-09-16 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

Eric Gallager  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 CC||egallager at gcc dot gnu.org
 Status|ASSIGNED|RESOLVED

--- Comment #23 from Eric Gallager  ---
(In reply to Eric Gallager from comment #22)
> (In reply to Eric Gallager from comment #20)
> > (In reply to m...@gcc.gnu.org from comment #19)
> > > I'm fine with Backporting for affected branches.
> > 
> > So... that's still 6 and 7 at this point?
> 
> Er well just 7 now, since 6 is closed

7 is closed now, too, so I think that's all affected branches closed, meaning
this ought to be fixed on all open branches... closing as FIXED.

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2019-11-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.4 |---

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2018-12-20 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

Eric Gallager  changed:

   What|Removed |Added

   Target Milestone|--- |7.4

--- Comment #22 from Eric Gallager  ---
(In reply to Eric Gallager from comment #20)
> (In reply to m...@gcc.gnu.org from comment #19)
> > I'm fine with Backporting for affected branches.
> 
> So... that's still 6 and 7 at this point?

Er well just 7 now, since 6 is closed

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2018-09-21 Thread mrs at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #21 from mrs at gcc dot gnu.org  ---
I'm fine with Backporting for affected branches.

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2018-09-08 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #20 from Eric Gallager  ---
(In reply to m...@gcc.gnu.org from comment #19)
> I'm fine with Backporting for affected branches.

So... that's still 6 and 7 at this point?

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2018-03-09 Thread mrs at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #19 from mrs at gcc dot gnu.org  ---
I'm fine with Backporting for affected branches.

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2018-03-09 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #18 from Francois-Xavier Coudert  ---
Thanks David. Do you think this could be backported to the active branches?

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2018-03-09 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #17 from David Malcolm  ---
This ought to be fixed in trunk (for gcc 8) by r258388.

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2018-03-09 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #16 from David Malcolm  ---
Author: dmalcolm
Date: Fri Mar  9 15:24:44 2018
New Revision: 258388

URL: https://gcc.gnu.org/viewcvs?rev=258388=gcc=rev
Log:
jit: use 'configure' to replace hard-coded linker options (PR jit/64089 and PR
jit/84288)

gcc/ChangeLog:
PR jit/64089
PR jit/84288
* Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
* configure: Regenerate.
* configure.ac ("linker --version-script option"): New.
("linker soname option"): New.

gcc/jit/ChangeLog:
PR jit/64089
PR jit/84288
* Make-lang.in (COMMA): New.
(LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
(LIBGCCJIT_SONAME_OPTION): New.
(jit): Move --version-script and -soname linker options to the
above.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in
trunk/gcc/configure
trunk/gcc/configure.ac
trunk/gcc/jit/ChangeLog
trunk/gcc/jit/Make-lang.in

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2018-02-13 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #15 from David Malcolm  ---
Candidate patch for the linker issue:
  https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00776.html

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2017-11-01 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

Eric Gallager  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||egallager at gcc dot gnu.org

--- Comment #14 from Eric Gallager  ---
Changing status to ASSIGNED since there's an assignee

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2017-03-15 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #13 from Francois-Xavier Coudert  ---
Can we apply this patch to trunk before 7.1 is released? It would allow to
build and run jit on Darwin:

diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
index 44d0750..4df2a9c 100644
--- a/gcc/jit/Make-lang.in
+++ b/gcc/jit/Make-lang.in
@@ -85,8 +85,7 @@ $(LIBGCCJIT_FILENAME): $(jit_OBJS) \
 $(jit_OBJS) libbackend.a libcommon-target.a libcommon.a \
 $(CPPLIB) $(LIBDECNUMBER) $(LIBS) $(BACKENDLIBS) \
 $(EXTRA_GCC_OBJS) \
--Wl,--version-script=$(srcdir)/jit/libgccjit.map \
--Wl,-soname,$(LIBGCCJIT_SONAME)
+-Wl,-install_name,$(LIBGCCJIT_SONAME)

 $(LIBGCCJIT_SONAME_SYMLINK): $(LIBGCCJIT_FILENAME)
ln -sf $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SONAME_SYMLINK)

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2017-01-27 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

Francois-Xavier Coudert  changed:

   What|Removed |Added

 Target|x86_64-apple-darwin14   |x86_64-apple-darwin16
 Status|UNCONFIRMED |NEW
   Keywords||build
   Last reconfirmed||2017-01-27
 CC||fxcoudert at gcc dot gnu.org
   Host|x86_64-apple-darwin14   |x86_64-apple-darwin16
 Ever confirmed|0   |1
  Build|x86_64-apple-darwin14   |x86_64-apple-darwin16

--- Comment #12 from Francois-Xavier Coudert  ---
Still present on all darwin versions, still broken on trunk, GCC 6 and GCC 5
branches.

[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2015-09-03 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #9 from Eric Gallager  ---
(In reply to Eric Gallager from comment #8)
> So anyways... for some reason I also had to add
> "-Wl,-undefined,dynamic_lookup" due to the "environ" symbol being missing,
> which makes no sense to me, because it should be there... But that got it to
> build for me though.
> 

Actually disregard that part; turns out that that was bug 63758...


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2015-09-03 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #10 from David Malcolm  ---
FWIW, homebrew has a formula for building libgccjit on OS X:
 https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gcc.rb

Currently it applies this patch:

diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
index 44d0750..4df2a9c 100644
--- a/gcc/jit/Make-lang.in
+++ b/gcc/jit/Make-lang.in
@@ -85,8 +85,7 @@ $(LIBGCCJIT_FILENAME): $(jit_OBJS) \
 $(jit_OBJS) libbackend.a libcommon-target.a libcommon.a \
 $(CPPLIB) $(LIBDECNUMBER) $(LIBS) $(BACKENDLIBS) \
 $(EXTRA_GCC_OBJS) \
--Wl,--version-script=$(srcdir)/jit/libgccjit.map \
--Wl,-soname,$(LIBGCCJIT_SONAME)
+-Wl,-install_name,$(LIBGCCJIT_SONAME)

 $(LIBGCCJIT_SONAME_SYMLINK): $(LIBGCCJIT_FILENAME)
ln -sf $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SONAME_SYMLINK)

along with this patch:
  https://gcc.gnu.org/ml/jit/2015-q3/msg00148.html
which is in:
  trunk as r226882.
  gcc-5-branch as r226883.


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2015-09-03 Thread mrs at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

mrs at gcc dot gnu.org  changed:

   What|Removed |Added

 CC||mrs at gcc dot gnu.org

--- Comment #11 from mrs at gcc dot gnu.org  ---
I'd endorse that step forward.  The export list I think is also doable in some
fashion, but we can leave that for another day.


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2015-06-10 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

Eric Gallager egall at gwmail dot gwu.edu changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #8 from Eric Gallager egall at gwmail dot gwu.edu ---
(In reply to Jack Howarth from comment #3)
 Note that on darwin libgcc handles its symbol map using...
 
  -Wl,-exported_symbols_list,$(SHLIB_MAP) 
 
 on SHLIB_LINK.

So I tried this, replacing $(SHLIB_MAP) with $(srcdir)/jit/libgccjit.map (since
SHLIB_MAP seemed to not be defined), and it gave me the following warning:

ld: warning: missing line-end at end of file ../../gcc/jit/libgccjit.map

...followed by a bunch of undefined symbol errors (which were the real
problem). So instead I had to just remove the mapfile line entirely, as in the
patch in the blog post linked to from here:

(In reply to David Malcolm from comment #7)
 (In reply to howarth from comment #6)
  I don't believe this can be an issue on darwin as we always default to
  producing PIC oode.
 Ah, ok.
 
 Thanks for filing this bug.
 
 I'm wondering what other problems libgccjit has on darwin.  If you hack in
 the required options into jit/Makefile.in, to what extent do make and
 make check-jit work?
 
 I notice this blog post from a couple of months ago:
   http://adek.io/2014/10/04/gcc-jit-on-osx/
 which talks about an issue with:
   dyld: Library not loaded: libgccjit.so.0
 
 Perhaps on darwin we need to be setting DYLD_LIBRARY_PATH in the various
 places where we're currently setting LD_LIBRARY_PATH?  (perhaps that should
 be a separate bug, perhaps under a libgccjit on darwin tracker bug?).

So anyways, besides what I wrote above, for some reason I also had to add
-Wl,-undefined,dynamic_lookup due to the environ symbol being missing,
which makes no sense to me, because it should be there... But that got it to
build for me though.

And as for running make check-jit, well, that testsuite didn't even run due
to it failing with:

ERROR: tcl error sourcing
/Users/ericgallager/gcc-git/gcc/testsuite/jit.dg/jit.exp.
ERROR: sh: /Users/ericgallager/gcc-git/libstdc++-v3/scripts/testsuite_flags: No
such file or directory

...which seems wrong to me. Shouldn't the testsuite_flags script be generated
in the builddir instead of in the srcdir? But anyways, that's digressing, and
unrelated to the linkage failure that the ticket was originally about.


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2014-12-05 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #7 from David Malcolm dmalcolm at gcc dot gnu.org ---
(In reply to howarth from comment #6)
 I don't believe this can be an issue on darwin as we always default to
 producing PIC oode.
Ah, ok.

Thanks for filing this bug.

I'm wondering what other problems libgccjit has on darwin.  If you hack in the
required options into jit/Makefile.in, to what extent do make and make
check-jit work?

I notice this blog post from a couple of months ago:
  http://adek.io/2014/10/04/gcc-jit-on-osx/
which talks about an issue with:
  dyld: Library not loaded: libgccjit.so.0

Perhaps on darwin we need to be setting DYLD_LIBRARY_PATH in the various places
where we're currently setting LD_LIBRARY_PATH?  (perhaps that should be a
separate bug, perhaps under a libgccjit on darwin tracker bug?).


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2014-11-26 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #1 from howarth at bromo dot med.uc.edu ---
Failing build configured with...

 ../gcc-5-20141126/configure --prefix=/sw --prefix=/sw/lib/gcc5.0
--mandir=/sw/share/man --infodir=/sw/lib/gcc5.0/info
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java,jit --with-gmp=/sw
--with-libiconv-prefix=/sw --with-isl=/sw --with-mpc=/sw --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--program-suffix=-fsf-5.0


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2014-11-26 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #2 from howarth at bromo dot med.uc.edu ---
I see that the libgcc build handles this issue by passing the --version-script
linker option selectively using config/t-slibgcc-gld.


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2014-11-26 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #3 from howarth at bromo dot med.uc.edu ---
Note that on darwin libgcc handles its symbol map using...

 -Wl,-exported_symbols_list,$(SHLIB_MAP) 

on SHLIB_LINK.


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2014-11-26 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #4 from howarth at bromo dot med.uc.edu ---
We are testing in gcc/configure for...

configure:14564: checking for -exported_symbols_list linker flag
configure:14584: 
/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/./prev-gcc/xgcc
-B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/./prev-gcc/
-B/sw/lib/gcc5.0/x86_64-apple-darwin14.1.0/bin/
-B/sw/lib/gcc5.0/x86_64-apple-darwin14.1.0/bin/
-B/sw/lib/gcc5.0/x86_64-apple-darwin14.1.0/lib/ -isystem
/sw/lib/gcc5.0/x86_64-apple-darwin14.1.0/include -isystem
/sw/lib/gcc5.0/x86_64-apple-darwin14.1.0/sys-include-o conftest -g -O2 
-I/sw/include -static-libstdc++ -static-libgcc -Wl,-no_pie
-Wl,-exported_symbols_list,conftest.sym conftest.c  5
configure:14584: $? = 0
configure:14594: result: yes

Can we leverage this test to append the correct linker flags for
libgccjit.so.0.0.1 on darwin?


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2014-11-26 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #5 from dmalcolm at gcc dot gnu.org ---
(In reply to howarth from comment #1)
 Failing build configured with...
 
  ../gcc-5-20141126/configure --prefix=/sw --prefix=/sw/lib/gcc5.0
 --mandir=/sw/share/man --infodir=/sw/lib/gcc5.0/info
 --enable-languages=c,c++,fortran,lto,objc,obj-c++,java,jit --with-gmp=/sw
 --with-libiconv-prefix=/sw --with-isl=/sw --with-mpc=/sw --with-system-zlib
 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
 --program-suffix=-fsf-5.0

BTW, if configuring with the jit enabled, --enable-host-shared is also required
(or we won't have position-independent code, and the link will fail, or, at
least, it will on Linux; am guessing the same will happen on Darwin).

The configure script should probably enforce that, but it doesn't yet.


[Bug jit/64089] libgccjit.so.0.0.1 linkage failure on darwin

2014-11-26 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089

--- Comment #6 from howarth at bromo dot med.uc.edu ---
(In reply to dmalcolm from comment #5)
 (In reply to howarth from comment #1)
  Failing build configured with...
  
   ../gcc-5-20141126/configure --prefix=/sw --prefix=/sw/lib/gcc5.0
  --mandir=/sw/share/man --infodir=/sw/lib/gcc5.0/info
  --enable-languages=c,c++,fortran,lto,objc,obj-c++,java,jit --with-gmp=/sw
  --with-libiconv-prefix=/sw --with-isl=/sw --with-mpc=/sw --with-system-zlib
  --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
  --program-suffix=-fsf-5.0
 
 BTW, if configuring with the jit enabled, --enable-host-shared is also
 required (or we won't have position-independent code, and the link will
 fail, or, at least, it will on Linux; am guessing the same will happen on
 Darwin).
 
 The configure script should probably enforce that, but it doesn't yet.

I don't believe this can be an issue on darwin as we always default to
producing PIC oode.