2009-08-04

Slitaz - make gconfig




slitaz-2.0
# pkg-config-0.21.tazpkg
# gtk+-dev-2.14.7.tazpkg
# glib-dev-2.18.3.tazpkg
# libglade-dev-2.6.2.tazpkg
# libxml2-dev-2.7.2.tazpkg

root@slitaz:~# pkg-config --libs gtk+-2.0
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
root@slitaz:~# pkg-config --libs glib-2.0
-lglib-2.0
root@slitaz:~# pkg-config --libs libglade-2.0
-lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0

root@slitaz:~# cd /usr/src/linux
root@slitaz:/usr/src/linux-2.6.25.5-slitaz# make gconfig
HOSTCC scripts/kconfig/gconf.o
In file included from /usr/include/gtk-2.0/gtk/gtk.h:224,
from scripts/kconfig/gconf.c:17:
/usr/include/gtk-2.0/gtk/gtkitemfactory.h:47: warning: function declaration isnât a prototype
scripts/kconfig/images.c:6: warning: â defined but not used
scripts/kconfig/images.c:36: warning: â defined but not used
scripts/kconfig/images.c:66: warning: â defined but not used
scripts/kconfig/images.c:175: warning: â defined but not used
scripts/kconfig/images.c:192: warning: â defined but not used
scripts/kconfig/images.c:209: warning: â defined but not used
scripts/kconfig/images.c:226: warning: â defined but not used
scripts/kconfig/images.c:243: warning: â defined but not used
scripts/kconfig/images.c:277: warning: â defined but not used
scripts/kconfig/images.c:294: warning: â defined but not used
scripts/kconfig/gconf.c:959: warning: â defined but not used
HOSTLD scripts/kconfig/gconf
scripts/kconfig/gconf arch/x86/Kconfig
....

Reprinted
http://r40eubuntu.blogspot.com/2008/08/gtk2.html

pkg-config and PKG_CONFIG_PATH
作GTK+2.0 練習時,follow instruction 安裝了 libgtk+2.0-dev

之後 run

$pkg-config --libs gtk+-2.0

卻出現 message 說找不到:

Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found

所以 找一下 gtk+-2.0.pc:

$sudo find /usr | grep gtk+-2.0.pc

找到在 /usr/lib/pkgconfig。
所以加入..

$export PKG_CONFIG_PATH=/usr/lib/pkgconfig

重新login 後再run pkg-config --libs gtk+-2.0,變成出現:

Perhaps you should add the directory containing `pthread-stubs.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pthread-stubs', required by 'XCB', not found

所以....又要再找 pthread-stubs.pc 了...結果在 /usr/share/pkgconfig,所以 改成:

export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig

重新login 後,就OK了...

$ pkg-config --libs gtk+-2.0
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm
-lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0

這樣順便解決了一個問題... kernel build - make gconfig 結果一直說我沒有install gtk+-2.0,但是我明明有install。

http://wiki.linux.org.hk/w/Compile_Linux_kernel