gtk2 compile on multilib

Ken Moffat zarniwhoop at
Wed Jan 2 07:48:02 PST 2008

On Tue, Jan 01, 2008 at 06:46:12PM -0600, Arnie Stender wrote:
> Happy New Year All!
>     Nothing new here except the year. I'm confused again. :-( I'm trying
> to compile gtk2 using the CBLFS book on my multilib CLFS system. 32 bit
> compiled and installed and 64 bit compiled without error. When I ran the
> install for 64 bit I got the following errors. I'll include the
> configure command I used below as well. Everything I look at says it
> knows it is working on 64 bit with a libdir of /usr/lib64. So why is it
> trying to relink .so files in /usr/lib? Does anyone know what is
> happening here and what I need to change to get the 64 bit installed? I
> didn't find anything relevant with GOOGLE. As always thanks for any help
> you can throw my way.
> configure command for 64 bit configure and make:
> CC="gcc ${BUILD64}" USE_ARCH=64 \
> ./configure --prefix=/usr --libdir=/usr/lib64 \
>     --sysconfdir=/etc &&
> make
> This ran without errors.
> make install command for 64 bit:
> make install &&
[ snip here, since it doesn't complete this ]
> Last output from "make install" BTW, I have looked at the
> gtk-query-immodules-2.0 script that was run and I can't find any
> reference to /usr/lib. :
> make[4]: Entering directory
> `/usr/src/blfspackages/xfce4/gtk+-2.12.3/modules/input'
> /bin/sh ../../mkinstalldirs /etc/gtk-2.0-64
> ../../gtk/gtk-query-immodules-2.0 > /etc/gtk-2.0-64/gtk.immodules
> Cannot load module /usr/lib/gtk-2.0/2.10.0/immodules/
> /usr/lib/gtk-2.0/2.10.0/immodules/ wrong ELF class: ELFCLASS32
> /usr/lib/gtk-2.0/2.10.0/immodules/ does not export GTK+ IM
> module API: /usr/lib/gtk-2.0/2.10.0/immodules/ wrong ELF
> class: ELFCLASS32

 I've looked at my most recent multilib builds, but unsurprisingly
you are on a newer version of gtk than I have used.  My ppc64 build
used 2.12.1, I would have thought it would be similar, but I can't
see any real correspondence with your output.  FWIW, mine said:

make[1]: Entering directory `/usr/src/gtk+-2.12.1/modules'
Making install in input
make[2]: Entering directory `/usr/src/gtk+-2.12.1/modules/input'
make[3]: Entering directory `/usr/src/gtk+-2.12.1/modules/input'
make[3]: Nothing to be done for `install-exec-am'.
/bin/sh ../../mkinstalldirs /etc/gtk-2.0
 /bin/install -c -m 644 im-multipress.conf
/bin/sh ../../mkinstalldirs /usr/lib64/gtk-2.0/2.10.0/immodules
mkdir -p -- /usr/lib64/gtk-2.0/2.10.0/immodules
 /bin/sh ../../libtool --mode=install /bin/install -c
libtool: install: warning: relinking `'
(cd /usr/src/gtk+-2.12.1/modules/input; /bin/sh ../../libtool
--mode=relink gcc -m64 -O2 -Wall -mminimal-toc -o -rpath
/usr/lib64/gtk-2.0/2.10.0/immodules -rpath
/usr/lib64/gtk-2.0/2.10.0/immodules -avoid-version -module
gtkimcontextxim.lo imxim.lo ../../gdk-pixbuf/
../../gdk/ ../../gtk/ -L/usr/lib64
-lpangocairo-1.0 -lpango-1.0 -lX11 -lXcomposite -lXdamage -lXfixes
-latk-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lcairo -lm )  
gcc -m64 -shared  .libs/gtkimcontextxim.o .libs/imxim.o
-L/usr/src/gtk+-2.12.1/gdk/.libs -L/usr/lib64 -lgdk_pixbuf-2.0
-lgdk-x11-2.0 -lgtk-x11-2.0 -lpangocairo-1.0 -lpango-1.0 -lX11
-lXcomposite -lXdamage -lXfixes -latk-1.0 -lgobject-2.0
-lgmodule-2.0 -ldl -lglib-2.0 -lcairo -lm  -m64 -mminimal-toc
-Wl,-soname -Wl, -o .libs/

 The first difference is that your 'make' reports '[4]' when it
enters the directory - possibly, you script a bit more deeply than I
do, or perhaps you are on SMP.  It doesn't seem important, just
different from my results.

 Slightly more interesting was your ../../mkinstalldirs
/etc/gtk-2.0-64 - not wrong (I'm sure I used to do something
similar, nowadays I seem to be using /etc/32 for the relevant gtk
and pango files), but it doesn't seem to match the configure command
you say you used, and it doesn't seem to fit with what my earlier
version of the package was doing here.

 The error messages apparently come from the not yet installed
version of gtk-query-immodules-2.0.  This uses libtool, so it is
prone to trying to link against .la files.  I would expect it to
have failed during the original 'make' if it decided to do this.
In my build, the messages from this were:

queryimmodules.c:119: warning: dereferencing type-punned pointer
will break strict-aliasing rules
/bin/sh ../libtool --mode=link gcc -m64  -O2 -Wall -mminimal-toc
-o gtk-query-immodules-2.0  queryimmodules.o
../gdk-pixbuf/ ../gdk/ 
gcc -m64 -O2 -Wall -mminimal-toc -o .libs/gtk-query-immodules-2.0
queryimmodules.o  ./.libs/ -L/usr/lib64
/usr/lib64/ ../gdk-pixbuf/.libs/
../gdk/.libs/ /usr/lib64/
/usr/lib64/ /usr/lib64/
/usr/lib64/ /usr/lib64/
/usr/lib64/ /usr/lib64/
/usr/lib64/ /usr/lib64/ -lz
/usr/lib64/ /usr/lib64/
/usr/lib64/ /usr/lib64/
/usr/lib64/ /usr/lib64/
/usr/lib64/ /usr/lib64/
/usr/lib64/ /usr/lib64/
/usr/lib64/ /usr/lib64/ /usr/lib64/
/usr/lib64/ -ldl /usr/lib64/
/usr/lib64/ -lm 
creating gtk-query-immodules-2.0
make[4]: Leaving directory `/usr/src/gtk+-2.12.1/gtk'

 Please compare whatever you logged from your build, to either
confirm that it was ok at this point, or else to try to identify why
the link failure didn't halt the build.

 If it did compile successfully before the install, have you messed
with your LDFLAGS when you ran the install ?

 As a long shot, did you cut and paste the messages, and miss
a line or two showing a different command which was responsible for
the errors ?

 I'm afraid that what you are reporting does not make a lot of sense
to me at the moment.  I'm not as hungover as I was yesterday, so I
think something in your environment or script(s) is doing things
slightly differently from what you are telling us ;)

 Of course, it's also possible that 2.12.3 has something silly in
it, but looking at the changes for 2.12.{2,3} they are 99% in the .c
files so I don't think it is likely to be responsible. (BTW, anybody
looking for gtk+ probably needs to be looking on,
seems to be a little out of date).

das eine Mal als Tragödie, das andere Mal als Farce

More information about the blfs-support mailing list