GTK does not build on Ubuntu
| Project: | GNU Smalltalk |
| Component: | Bindings: Gtk |
| Category: | bug |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
The problem seems to be an odd placement of glibconfig.h header:
A make in packages/gtk results in:
/bin/sed -e "1s,@AWK\@,/usr/bin/gawk," < mk_enums.awk > mk_enums
chmod +x mk_enums
/bin/sed -e "1s,@AWK\@,/usr/bin/gawk," < cpp.awk > cpp
chmod +x cpp
gawk \
-vPKG_CONFIG='/usr/bin/pkg-config' \
-v_prefixes='g atk pango' \
-v_libs="gobject-2.0 gdk-2.0 gdk-pixbuf-2.0 pango gtk+-2.0 atk" \
-v_files="glib-object.h gdk/gdk.h gdk-pixbuf/gdk-pixbuf.h gtk/gtk.h atk/atk.h pango/pango.h ./placer.h" -f./mkorder.awk \
| while read i; do \
case "$i" in \
error:*) \
echo "$i" >&2; exit 1;; \
*/gobject/*) \
echo "$i" ;; \
*/glib/*) \
case " glib/goption.h glib/gdate.h " in \
*" glib/`basename $i` "*) echo "$i" ;; \
*) ;; \
esac ;; \
*) \
echo "$i" ;; \
esac; \
done > ordererror: cannot find glibconfig.h
make: *** [order] Error 1
Checking where this header is shows:
tkack@tkackxp3:~/Sources/Smalltalk/GNU/VM/smalltalk/packages/gtk$ pkg-config --cflags glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
For some odd reason is the glibconfig.h header in /usr/lib/glib-2.0/include.
Workaround:
sudo ln -s /usr/lib/glib-2.0/include/glibconfig.h /usr/include/glib-2.0/
I have not pinned down the problem in mkorder.awk yet.
Updates
Same here:
$ pkg-config --cflags glib-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include $ ls -l /usr/lib64/glib-2.0/include total 8 -rw-r--r-- 1 root root 6568 2009-06-27 08:12 glibconfig.h
but that gives a hint maybe...
I must be getting old
diff --git a/packages/gtk/mkorder.awk b/packages/gtk/mkorder.awk
index fd65832..402318c 100644
--- a/packages/gtk/mkorder.awk
+++ b/packages/gtk/mkorder.awk
@@ -45,7 +45,7 @@ BEGIN {
function process_lib(lib, prog, i) {
prog = PKG_CONFIG " --cflags " lib
while (prog | getline)
- for (i = 1; i < NF; i++)
+ for (i = 1; i <= NF; i++)
if ($i ~ /^-I/)
paths[++n_paths] = substr($i, 3)
close(prog)| Status: | active | » fixed |
