Re: [gtk-list] again with GTK static linking
- From: Owen Taylor <otaylor redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] again with GTK static linking
- Date: 07 Jan 2000 11:26:57 -0500
"Rostedt, Steven" <steven.rostedt@lmco.com> writes:
> So I am trying to build with the GTK libraries statically
> linked in. This is being built on a Solaris machine for
> other Solaris machines (obviously). I'm currently using
> glib-1.2.6 and gtk+-1.2.6
>
> Here's my problem.
>
> I compile with:
>
> gcc -o mytool mytool.o -L/opt/local/lib -L/usr/openwin/lib \
> -Wl,-Bstatic -lgtk -lgdk -lglib -lgmodule -Wl,-Bdynamic \
> -lXext -lX11 -lm
>
> And I receive the following errors:
>
> Undefined first referenced
> symbol in file
> dlclose /opt/local/lib/libgmodule.a(gmodule.o)
> (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
> dlsym /opt/local/lib/libgmodule.a(gmodule.o)
> (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
> dlopen /opt/local/lib/libgmodule.a(gmodule.o)
> (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
> dlerror /opt/local/lib/libgmodule.a(gmodule.o)
> (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
> ld: fatal: Symbol referencing errors. No output written to mytool
Your problem is that Solaris doesn't allow dynamic loading from
a statically linkend executable.
> Has anyone gotten around this?
> Do i have to recompile the glib to handle this.
Yes, you will need to do so. I think you should be able to do:
G_MODULE_IMPL=0 ./configure
to configure glib and it will properly disable dynamic loading.
> I hate to disable shared libs since I have several other tools
> that I use on this machine all using GTK. But I need it
> statically linked to place it on the other machines
> without going to 15 different sys admins and asking
> them to install GTK (I'd love them to do so but this is
> a small tool that the admins don't care about).
>
> Second Note:
> Has anyone ever gotten GTK compiled on AIX 4.1 ?
Well, somebody posted a report of successful compilation on
4.3, at http://bugs.gnome.org/db/49/4976.html, though note
that the configure flags for glib there are bogus - they
are either not necessary or harmful and a straight 'configure'
should work as well.
(except maybe for the --disable-shared flag .. though he doesn't
mention using --disable-shared for GTK+, so I think that
might be bogus as well.)
The interesting part there may be the part about commenting
out HAVE_GETPWUID_R.
People certainly have gotten GTK+ working on AIX, though there
have been persistant problems with libtool.
Joel Becker <jlbec@innerx.net> is sort of an expert on this.
I would suggest that somebody needs to make up a web page
or FAQ entry on using GTK+ with AIX, since it is a frequent
question, and rather too complicated for us non-AIX folks
to keep track of.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]