Problems with compiler-dependent switches in gthread-2.0.pc file



Hi,

I'm not sure if this is the right list to ask on (if not, please inform me
what the right one is), but just in case it is ...

I'm trying to upgrade to glib 2.2.3/atk 1.2.4/gtk+-2.2.4/gimp-1.3.22
on Solaris 7.  I'm already using pkg-config 0.15.0.

I'm trying to do this with the following snippet of

http://www.Mozilla.ORG/releases/mozilla1.5/installation-ports.html#ports_solari
s

in mind:

"Requires GTK+ and GLib libraries (libraries must be compiled with Sun
 Workshop/Forte.  GTK+/glib compiled with gcc are incompatible with Mozilla
 binaries built with Sun Workshop/Forte; GTK+/glib libraries compiled with Sun
 Workshop/Forte are compatible w/ binaries compiled with both Sun Workshop and
 gcc.  (Mozilla bug 136144, bug 141415, bug 186534 and many others)"

So, when I went to build glib 2.2.3, I specified CC=cc, CXX=CC, and F77=f77
to use the Sun Forte Workshop 6.2 compilers instead of gcc 3.3.1, which is
what I normally use.

The "configure" line I used for glib-2.2.3 was

./configure --enable-threads --with-threads=solaris --enable-static \
--enable-shared --enable-fast-install --with-libiconv=no

It built everything fine and installed fine, but now here's the problem:

My /usr/local/lib/pkgconfig/gthread-2.0.pc now contains

Name: GThread
Description: Thread support for GLib
Requires: glib-2.0
Version: 2.2.3
Libs: -L${libdir} -lgthread-2.0 -mt
Cflags: -mt

Big problem.  "-mt" is a switch that's only applicable to the Sun Forte 6
compiler!  If I then go back and, say, try to build atk 1.2.4 with gcc 3.3.1,
it dies during the compilation when it hits something that causes
"pkg-config --cflags glib-2.0" to be invoked.

I'm looking at workarounds (trying "--with-threads=posix", just for fun)
but in the meantime, isn't putting compiler-specific flags into the *.pc
files a Really Bad Idea?  It basically locks you into using whatever the
compiler was that you used to compile glib/gthread/etc. with ... right???

Anyone?  Anyone?  Bueller?

Thanks in advance,

	- Greg





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]