GNOME Bugzilla – Bug 656048
glib-codegen requires Python >= 2.5
Last modified: 2011-08-06 13:37:45 UTC
configure.ac contains the following test: # Some systems have both statfs and statvfs, pick the most "native" for these AS_IF([test x$ac_cv_func_statfs = xyes && test x$ac_cv_func_statvfs = yes], [ # on solaris and irix, statfs doesn't even have the f_bavail field AS_IF([test $ac_cv_member_struct_statfs_f_bavail = yes], [ac_cv_func_statfs=no], # else, at least on linux, statfs is the actual syscall [ac_cv_func_statvfs=no]) ]) Notice that "test x$ac_cv_func_statvfs = yes" will always test false due to a missing "x"
BTW this causes compilation failure in glocalfile.c FWIW glib/tests/checksum.c didn't compile either due to GCC-only C syntax "case '0' ... '9'" glib/tests/Makefile.am also has "atomic_CFLAGS = -Wstrict-aliasing=2 $(INCLUDES)" which is again GCC-only Zlib based compilation blows up obscurely if you have an old zlib.h (may want a minimum version check for the gz_header struct existance)
AND the logic in the inner IF is inverted and doesn't match the comments # on solaris and irix, statfs doesn't even have the f_bavail field AS_IF([test $ac_cv_member_struct_statfs_f_bavail = yes], [ac_cv_func_statfs=no], # else, at least on linux, statfs is the actual syscall [ac_cv_func_statvfs=no]) If $ac_cv_member_struct_statfs_f_bavail is no, it disables statvfs, which was the working one. Also I think the x = x test armour is missing.
Ow, and configure has chosen python2.4, and then fed it code syntax only supported in python 2.5: PYTHONPATH=../../../gio/gdbus-codegen:../../../gio/gdbus-codegen:$PYTHONPATH /usr/bin/env python2.4 ../../../gio/gdbus-codegen/codegen_main.py \ > --interface-prefix org.gtk.GDBus.Example.ObjectManager. \ > --c-namespace Example \ > --c-generate-object-manager \ > --generate-c-code gdbus-example-objectmanager-generated \ > --generate-docbook gdbus-example-objectmanager-generated \ > gdbus-example-objectmanager.xml \ > Traceback (most recent call last):
+ Trace 228033
import codegen
%(m.name_hyphen, 'TRUE' if unix_fd else 'FALSE'))
When trying to 'make install-codegenPYTHON' in gio/gdbus-codegen it has had configure set: PYTHON = /usr/bin/env python2.4 in the Makefile, but again uses python2.5 syntax in : __init__.pycodegen.py File "/tmp/glib-2.29.14/lib/gdbus-codegen/codegen.py", line 807 %(m.name_hyphen, 'TRUE' if unix_fd else 'FALSE')) ^ SyntaxError: invalid syntax It also uses "PYTHON=$(PYTHON) $(py_compile) ..." which explodes when $(PYTHON) is more than one word.
(In reply to comment #0) > Notice that "test x$ac_cv_func_statvfs = yes" will always test false due to a > missing "x" Good catch, I've pushed a commit which fixes this; thank you!
(In reply to comment #3) > Ow, and configure has chosen python2.4, and then fed it code syntax only > supported in python 2.5: > > PYTHONPATH=../../../gio/gdbus-codegen:../../../gio/gdbus-codegen:$PYTHONPATH > /usr/bin/env python2.4 ../../../gio/gdbus-codegen/codegen_main.py \ > > --interface-prefix org.gtk.GDBus.Example.ObjectManager. \ > > --c-namespace Example \ > > --c-generate-object-manager \ > > --generate-c-code gdbus-example-objectmanager-generated \ > > --generate-docbook gdbus-example-objectmanager-generated \ > > gdbus-example-objectmanager.xml \ > > > Traceback (most recent call last): This is a separate bug, but since we fixed the first one I'll retitle this. We should either hard require 2.5 for support 2.4.
(In reply to comment #6) > We should either hard require 2.5 for support 2.4. I've pushed a commit to require 2.5.