gtk2 compile on multilib

Ken Moffat zarniwhoop at ntlworld.com
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 \
> PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
> ./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/im-xim.so:
> /usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so: wrong ELF class: ELFCLASS32
> /usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so does not export GTK+ IM
> module API: /usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so: 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
/etc/gtk-2.0/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  im-xim.la
/usr/lib64/gtk-2.0/2.10.0/immodules/im-xim.la
libtool: install: warning: relinking `im-xim.la'
(cd /usr/src/gtk+-2.12.1/modules/input; /bin/sh ../../libtool
--mode=relink gcc -m64 -O2 -Wall -mminimal-toc -o im-xim.la -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/libgdk_pixbuf-2.0.la
../../gdk/libgdk-x11-2.0.la ../../gtk/libgtk-x11-2.0.la -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-pixbuf/.libs
-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,im-xim.so -o .libs/im-xim.so

 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 libgtk-x11-2.0.la
../gdk-pixbuf/libgdk_pixbuf-2.0.la ../gdk/libgdk-x11-2.0.la 
gcc -m64 -O2 -Wall -mminimal-toc -o .libs/gtk-query-immodules-2.0
queryimmodules.o  ./.libs/libgtk-x11-2.0.so -L/usr/lib64
/usr/src/gtk+-2.12.1/gdk/.libs/libgdk-x11-2.0.so
/usr/lib64/libatk-1.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so
../gdk/.libs/libgdk-x11-2.0.so /usr/lib64/libpangocairo-1.0.so
/usr/lib64/libpangoft2-1.0.so /usr/lib64/libpango-1.0.so
/usr/lib64/libcairo.so /usr/lib64/libpng12.so
/usr/lib64/libxcb-render-util.so /usr/lib64/libxcb-render.so
/usr/lib64/libfontconfig.so /usr/lib64/libfreetype.so -lz
/usr/lib64/libexpat.so /usr/lib64/libXinerama.so
/usr/lib64/libXrandr.so /usr/lib64/libXcursor.so
/usr/lib64/libXrender.so /usr/lib64/libXcomposite.so
/usr/lib64/libXext.so /usr/lib64/libXdamage.so
/usr/lib64/libXfixes.so /usr/lib64/libX11.so
/usr/lib64/libxcb-xlib.so /usr/lib64/libxcb.so /usr/lib64/libXau.so
/usr/lib64/libXdmcp.so
/usr/src/gtk+-2.12.1/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so
/usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libgobject-2.0.so
/usr/lib64/libglib-2.0.so -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 gnome.org, gtk.org
seems to be a little out of date).

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce



More information about the blfs-support mailing list