GNOME Bugzilla – Bug 678678
Build failure if no `cc` available (only `gcc`)
Last modified: 2015-02-07 16:49:10 UTC
make[2]: Entering directory `/sources/gobject-introspection-1.33.2' GISCAN GLib-2.0.gir Traceback (most recent call last):
+ Trace 230413
sys.exit(scanner_main(sys.argv))
ss = create_source_scanner(options, args)
ss.parse_files(filenames)
self._parse(headers)
stdout=subprocess.PIPE)
errread, errwrite)
raise child_exception
make[2]: *** [GLib-2.0.gir] Error 1 There is `cpp_args = os.environ.get('CC', 'cc').split()` in giscanner/sourcescanner.py, but looks like CC is not set. gobject-introspection-1.33.2
(In reply to comment #0) > There is `cpp_args = os.environ.get('CC', 'cc').split()` in > giscanner/sourcescanner.py, but looks like CC is not set. When the "CC" environment variable is not set, the above indeed ensures g-ir-scanner falls back to the "cc" command. One thing you can do if "cc" is not available on your system is to set the "CC" environment variable to "gcc" instead at configure time, for example run: CC=gcc ./configure --prefix=/path/to/prefix or, if you are building from git: CC=gcc ./autogen.sh --prefix=/path/to/prefix and all should be well. We might want to present a slightly more friendly error message when trying to run an executable that doesn't exist though...
Or maybe somehow set CC from Makefile? Because make uses `gcc` without any env vars. This change fixes the build for me (don't know if it is correct solution): diff --git a/common.mk b/common.mk index 052d5b4..724a4d5 100644 --- a/common.mk +++ b/common.mk @@ -9,6 +9,7 @@ INTROSPECTION_SCANNER = \ env PATH=.libs:$(PATH) \ LPATH=.libs \ + CC=$(CC) \ PYTHONPATH=$(top_builddir):$(top_srcdir) \ UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
Still happens with latest git.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]