On Sun, Nov 07, 1999 at 02:44:47AM -0500, Valdis.Kletnieks@xxxxxx wrote:
> On Sat, 06 Nov 1999 23:29:16 EST, Craig Rodrigues said:
> > This hypothesis turned out to be correct.
> > For some reason, when libgtk is built under AIX, it does not
> > link libgdk. So, when gdk_check_init() is called from within
> > libgtk, the program will segfault, because the reference to
> > the function cannot be resolved. It looks like the flags to
> > link libgdk to libgtk are missing from the Makefile.
>
> Actually, that's not why you're segfaulting.. ;)
Well, I found the way to solve my problem was, in the
Makefile in the gtk subdirectory, line 280:
$(LINK) -rpath $(libdir) $(libgtk_la_LDFLAGS) $(libgtk_la_OBJECTS) $(libgtk_la_LIBADD) $(LIBS)
This line was not including libgdk in the link.
When I explicitly added -lgdk to this line, everything worked after that.
I did not need to use -brtl anywhere.
Further digging, I found on line 35 of Makefile.am:
# $(top_builddir)/gdk/libgdk.la
If this line was uncommented, then probably gdk would have been
added to the link flags and I would not have wasted hours. :)
The way that I found this out was, I went in libtool, and
removed the -berok flag. -berok will build a binary even if symbols
are not resolved at link time, so this was hiding the error.
>
>
> Also, make sure bos.rte.bind_commands is at level 4.3.2.4 or later, so you pick up this important fix:
Yes, I installed this. This wasn't fixing my problem though...I found
that linking libgtk with libgdk solved it. I did not have to use
-brtl.
> The other major fuckage of this is that when you link against the
^^^^^^^
Ah, there's the word I was looking for. :)
>
> Also, while you're using a can opener on libtool, make sure it uses
> /bin/ld directly to build things, and not $CC - this saves linking a
> copy of crt0.o into the shared lib, causing duplicate symbol messages.
> I *think* recent libtools have this fixed, but it's 2AM.. ;)
I just checked out the latest libtool from the libtool CVS, and it does
not do this. I think this is a very good idea. Do you have
a patch for this?
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@xxxxxxxxxxxx