GNOME Bugzilla – Bug 511643
Build fix: only pass compiler flags (-I) to compiler, not to linker
Last modified: 2014-08-02 13:05:45 UTC
Lots of -I flags are passed to the linker as well as to the compiler. They're not intended for the linker, and a huge list of useless flags adds confusion when debugging the linking step of the package build. The problem is a mis-handling of the variables containing the results of the PKG_CHECK_MODULES macro calls in configure.ac. PKG_CHECK_MODULES(FOO) gives a variable named FOO_CFLAGS, but that is a set of flags for the compiler only. However, in Makefile.am, the *_CFLAGS variables are passed to "all calls to gcc, both compile and link". So the present (gnome-python-2.20.1) Makefile.am practice of placing FOO_CFLAGS into some_lib_CFLAGS is not correct: FOO_CFLAGS should be placed in some_lib_CPPFLAGS.
Created attachment 103601 [details] [review] Pass pkgconfig CFLAGS via Makefile CPPFLAGS
I don't think it makes much sense, conceptually, to pass C flags to a xxx_CPPFLAGS variable. C preprocessor flags and C compiler flags are different things. Anyway, gnome-python is gradually migrating to the WAF build system, so this problem should not occur in the future (or if it does be sure to open a bug report). I'll commit this if I ever find time to make a new stable 2.20 release; which will probably never happen... :P
I think this is actually a design-flaw in pkg-config. It does not separate: - CPPFLAGS and CFLAGS (both in --cflags) - LDFLAGS and LIBADD/LDADD (both in --libs) Filed as https://bugs.freedesktop.org/show_bug.cgi?id=19306
The last gnome-python code changes took place in April 2011: https://git.gnome.org/browse/archive/gnome-python/log/ This project is not under active development anymore. This project got recently archived in GNOME Git. It is currently unlikely that there will be any further active development. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this bug report in the future if anyone takes the responsibility for active development again. If you are interested in maintainership, inform https://mail.gnome.org/mailman/listinfo/desktop-devel-list gnome-python wrapped GNOME 2's core libraries which are all deprecated and not under development anymore. For Python in GNOME 3, see https://wiki.gnome.org/Projects/PyGObject and its gobject-introspection approach.