Slackware-12.2, на ней стоят системные:
glib-1.2.10,
glib2-2.16.6,
gtk+-1.2.10,
gtk+2-2.12.12.
Собираю из исходников Glib-2.24.2 и gtk+2.20.1. Just for compiz.
Glib собирается безпроблем с любыми префиксами. Gtk только c prefix=/usr, но это какбэ нехорошо.
Собираю с prefix=/opt/glib2 для glib и с prefix=/opt/gtk+2 для gtk. glib собрался, но вот c gtk+ проблемы;
Код: Выделить всё
libtool: link: gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -O2 -march=i486 -mtune=i686 -Wall -o .libs/gtk-query-immodules-2.0 queryimmodules.o -pthread ./.libs/libgtk-x11-2.0.so -L/opt/glib2/lib -L/usr/local/lib /tmp/slackbuild/gtk+-2.20.1/gdk/.libs/libgdk-x11-2.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so ../gdk/.libs/libgdk-x11-2.0.so /usr/lib/libXinerama.so /usr/lib/libXcursor.so /tmp/slackbuild/gtk+-2.20.1/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so /usr/lib/libpangocairo-1.0.so /usr/lib/libXcomposite.so /usr/lib/libXext.so /usr/lib/libXdamage.so /usr/lib/libXfixes.so /usr/local/lib/libatk-1.0.so /usr/lib/libcairo.so -lpng12 /usr/lib/libXrender.so /usr/lib/libX11.so /usr/lib/libxcb-xlib.so /usr/lib/libxcb.so /usr/lib/libXau.so /usr/lib/libXdmcp.so /usr/lib/libpixman-1.so /opt/glib2/lib/libgio-2.0.so -lresolv /usr/lib/libpangoft2-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so /usr/lib/libglib-2.0.so /usr/lib/libfontconfig.so /usr/lib/libfreetype.so -lz /usr/lib/libexpat.so /opt/glib2/lib/libgobject-2.0.so /opt/glib2/lib/libgmodule-2.0.so -ldl /opt/glib2/lib/libgthread-2.0.so -lpthread -lrt /opt/glib2/lib/libglib-2.0.so -lm -pthread
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_ptr_array_new_with_free_func'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_error_new_valist'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_signal_chain_from_overridden_handler'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_realloc_n'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_poll'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_array_unref'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_hostname_is_non_ascii'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_ptr_array_set_free_func'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_signal_override_class_handler'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_malloc0_n'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_hostname_to_ascii'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_dpgettext2'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_mkstemp_full'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_array_get_type'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_byte_array_unref'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_mapped_file_unref'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_set_error_literal'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_byte_array_get_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_array_get_element_size'
/tmp/slackbuild/gtk+-2.20.1/gdk/.libs/libgdk-x11-2.0.so: undefined reference to `g_dngettext'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_malloc_n'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_signal_new_class_handler'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_dgettext'
/opt/glib2/lib/libgio-2.0.so: undefined reference to `g_main_context_get_thread_default'
collect2: ld returned 1 exit status
make[4]: *** [gtk-query-immodules-2.0] Error 1
make[4]: Leaving directory `/tmp/slackbuild/gtk+-2.20.1/gtk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/slackbuild/gtk+-2.20.1/gtk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/slackbuild/gtk+-2.20.1/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/slackbuild/gtk+-2.20.1'
make: *** [all] Error 2
Ясно что барахлит линковщик и излишняя кривизна рук, но что-то я уже отчаялся решить проблему.
Это часть слакбилда для gtk.
Код: Выделить всё
PKG_CONFIG_PATH="/opt/gtk+2/lib/pkgconfig:/opt/glib2/lib/pkgconfig:/usr/local/lib/pkgconfig"
CPPFLAGS="-I/opt/gtk+2/include -I/opt/glib2/include -I/usr/local/include"
LDFLAGS="-L/opt/gtk+2/lib -L/usr/local/lib -L/opt/glib2/lib"
CFLAGS="$SLKCFLAGS"
export PKG_CONFIG_PATH
LD_LIBRARY_PATH="/opt/gtk+2/lib:/opt/glib2/lib:/usr/local/lib"
PATH="/opt/gtk+2/bin:/opt/glib2/bin:/usr/local/bin:$PATH"
export LD_LIBRARY_PATH PATH
./configure --prefix=/opt/gtk+2
это для glib.
Код: Выделить всё
LD_LIBRARY_PATH="/opt/glib2/lib"
PATH="/opt/glib2/bin:$PATH"
export LD_LIBRARY_PATH PATH
CPPFLAGS="-I/opt/glib2/include"
LDFLAGS="-L/opt/glib2/lib"
PKG_CONFIG_PATH="/opt/glib2/lib/pkgconfig"
export CPPFLAGS LDFLAGS PKG_CONFIG_PATH
chown -R root:root .
find . -perm 664 -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/opt/glib2 \
--sysconfdir=/etc \
--mandir=/usr/man \
--build=$ARCH-slackware-linux
/etc/ld.so.conf
Код: Выделить всё
usr/i486-slackware-linux/lib
/usr/lib/seamonkey
/opt/glib2/lib
/usr/local/lib
/opt/gtk+2/lib
/etc/X11/lib
Кто сталкивался с этим и не забил, поставив prefix=/usr
