[cairo] Building on Mac OS X Lion fails - stdarg.h cannot include_next itself

Eugene Kirpichov ekirpichov at gmail.com
Mon Jan 9 11:27:02 PST 2012


Hi,

I'm following the instructions at
http://live.gnome.org/GTK%2B/OSX/Buildingon a Mac OS X Lion 10.7.2,
gcc 4.2.

After customizing my ~/.jhbuildrc-custom with the following

# setup_sdk(target=_target, sdk_version="native",
architectures=[_default_arch])
...
moduleset = "
http://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"
setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386"])

So - after that, I got jhbuild bootstrap to succeed, but jhbuild build
meta-gtk-osx-bootstrap fails with the following transcript [1] (just the
end of it).

I was able to reproduce the same thing with a program that just says
"#include <stdarg.h>" (and nothing more) - two invocations of g++, one
successful [2] and one unsuccessful [3], included.

Looks like the issue is that there's no usr/lib/gcc/... folder with a
platform-specific stdarg.h under the -isysroot set by configure.

How can I fix this error? I'm assuming that either jhbuild shouldn't have
set -isysroot to the value it has set it to, or perhaps this is an actual
incompatibility with gcc 4.2, but looks like with my level of knowledge
about this build system and general peculiarities of building on Mac (which
I've got only recently), asking for help from the community is the best
thing I can do.

== TRANSCRIPT 1 ==

*** Building libtiff *** [12/15]
make
Making all in port
make[1]: Nothing to be done for `all'.
Making all in libtiff
make  all-am
/bin/sh ../libtool  --tag=CXX   --mode=compile /usr/bin/g++-4.2
-DHAVE_CONFIG_H -I.   -I/Users/jkff/gtk/inst/include
-I/Developer/SDKs/MacOSX10.6.sdk/usr/include -I/Users/jkff/gtk/inst/include
-I/Developer/SDKs/MacOSX10.6.sdk/usr/include  -arch i386
-I/Developer/SDKs/MacOSX10.6.sdk/usr/include -arch i386
-I/Developer/SDKs/MacOSX10.6.sdk/usr/include -isysroot
/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -isysroot
/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -MT tif_stream.lo
-MD -MP -MF .deps/tif_stream.Tpo -c -o tif_stream.lo tif_stream.cxx
libtool: compile:  /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I.
-I/Users/jkff/gtk/inst/include -I/Developer/SDKs/MacOSX10.6.sdk/usr/include
-I/Users/jkff/gtk/inst/include -I/Developer/SDKs/MacOSX10.6.sdk/usr/include
-arch i386 -I/Developer/SDKs/MacOSX10.6.sdk/usr/include -arch i386
-I/Developer/SDKs/MacOSX10.6.sdk/usr/include -isysroot
/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -isysroot
/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -MT tif_stream.lo
-MD -MP -MF .deps/tif_stream.Tpo -c tif_stream.cxx  -fno-common -DPIC -o
.libs/tif_stream.o
In file included from tiffio.h:247,
                 from tiffiop.h:70,
                 from tif_stream.cxx:30:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h:
No such file or directory
In file included from
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/iosfwd:45,
                 from
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/ios:43,
                 from
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/ostream:45,
                 from
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/iostream:45,
                 from tif_stream.cxx:31:

== TRANSCRIPT 2 ==
jkff at jkff-laptop ~ $ /usr/bin/g++-4.2 tmp.cxx -o tmp.o -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/gcc/gcc-5666.3~278/src/configure
--disable-checking --enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin11 --program-prefix=i686-apple-darwin11-
--host=x86_64-apple-darwin11 --target=i686-apple-darwin11
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
 /usr/libexec/gcc/i686-apple-darwin11/4.2.1/cc1plus -quiet -v -imultilib
x86_64 -D__DYNAMIC__ tmp.cxx -fPIC -quiet -dumpbase tmp.cxx
-mmacosx-version-min=10.6 -m64 -mtune=core2 -auxbase tmp -version
-D__private_extern__=extern -o
/var/folders/jt/r80dbv9d45187qzh0yg853r80000gn/T//ccVJEdap.s
ignoring nonexistent directory
"/usr/include/c++/4.2.1/i686-apple-darwin11/x86_64"
ignoring nonexistent directory
"/usr/lib/gcc/i686-apple-darwin11/4.2.1/../../../../i686-apple-darwin11/include"
#include "..." search starts here:
#include <...> search starts here:
 /Users/jkff/gtk/inst/include
 /usr/include/c++/4.2.1
 /usr/include/c++/4.2.1/backward
 /usr/local/include
 /usr/lib/gcc/i686-apple-darwin11/4.2.1/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
GNU C++ version 4.2.1 (Apple Inc. build 5666) (dot 3) (i686-apple-darwin11)
compiled by GNU C version 4.2.1 (Apple Inc. build 5666) (dot 3).
GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=65536
Compiler executable checksum: 1c5d175013b2657e11ab1c9aa1767c94
 /usr/libexec/gcc/i686-apple-darwin11/4.2.1/as -arch x86_64
-force_cpusubtype_ALL -o
/var/folders/jt/r80dbv9d45187qzh0yg853r80000gn/T//ccgQqR0Y.o
/var/folders/jt/r80dbv9d45187qzh0yg853r80000gn/T//ccVJEdap.s
(etc.)

== TRANSCRIPT 3 ==
jkff at jkff-laptop ~ $ /usr/bin/g++-4.2 -isysroot
/Developer/SDKs/MACOSX10.6.sdk tmp.cxx -o tmp.o -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/gcc/gcc-5666.3~278/src/configure
--disable-checking --enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin11 --program-prefix=i686-apple-darwin11-
--host=x86_64-apple-darwin11 --target=i686-apple-darwin11
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
 /usr/libexec/gcc/i686-apple-darwin11/4.2.1/cc1plus -quiet -v -imultilib
x86_64 -D__DYNAMIC__ -isysroot /Developer/SDKs/MACOSX10.6.sdk tmp.cxx -fPIC
-quiet -dumpbase tmp.cxx -mmacosx-version-min=10.6 -m64 -mtune=core2
-auxbase tmp -version -D__private_extern__=extern -o
/var/folders/jt/r80dbv9d45187qzh0yg853r80000gn/T//cckFctdM.s
ignoring nonexistent directory
"/Developer/SDKs/MACOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin11/4.2.1/include"
ignoring nonexistent directory
"/Developer/SDKs/MACOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin11/4.2.1/../../../../i686-apple-darwin11/include"
#include "..." search starts here:
#include <...> search starts here:
 /Users/jkff/gtk/inst/include
 /Developer/SDKs/MACOSX10.6.sdk/usr/include/c++/4.2.1
 /Developer/SDKs/MACOSX10.6.sdk/usr/include/c++/4.2.1/i686-apple-darwin11/x86_64
 /Developer/SDKs/MACOSX10.6.sdk/usr/include/c++/4.2.1/backward
 /Developer/SDKs/MACOSX10.6.sdk/usr/local/include
 /Developer/SDKs/MACOSX10.6.sdk/usr/include
 /Developer/SDKs/MACOSX10.6.sdk/System/Library/Frameworks (framework
directory)
 /Developer/SDKs/MACOSX10.6.sdk/Library/Frameworks (framework directory)
End of search list.
GNU C++ version 4.2.1 (Apple Inc. build 5666) (dot 3) (i686-apple-darwin11)
compiled by GNU C version 4.2.1 (Apple Inc. build 5666) (dot 3).
GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=65536
Compiler executable checksum: 1c5d175013b2657e11ab1c9aa1767c94
In file included from tmp.cxx:1:
/Developer/SDKs/MACOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h:
No such file or directory


-- 
Eugene Kirpichov
Principal Engineer, Mirantis Inc. http://www.mirantis.com/
Editor, http://fprog.ru/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20120109/2cfc7593/attachment.html>


More information about the cairo mailing list