Re: Building on Mac OS X Lion fails - stdarg.h cannot include_next itself
Eugene Kirpichov <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CANVKUrUWDkgWFfJw1USVmnBK2h6+cycDu9gX0t90JE-GW6HHuQ@mail.gmail.com> |
Hello Andrea, Thanks a lot, indeed I succeeded with jhbuild build meta-gtk-osx-bootstrap after I added the following to my ~/.jhbuildrc-custom: os.environ["CC"] = "/usr/bin/llvm-gcc-4.2" os.environ["CXX"] = "/usr/bin/llvm-g++-4.2" Somehow I thought that llvm-gcc and llvm-g++ are already the only compilers present on Macs, but apparently that's not the case. I'm now building meta-gtk-osx-core, let's see how it goes. On Tue, Jan 10, 2012 at 2:53 AM, Andrea Canciani <[email protected]> wrote: > On Mon, Jan 9, 2012 at 8:27 PM, Eugene Kirpichov <[email protected]> > wrote: > > Hi, > > > > I'm following the instructions at > http://live.gnome.org/GTK%2B/OSX/Building > > on 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. > > I think you might want to try your test commands using the default > compiler (i.e. g++, aka llvm-g++ aka llvm-g++-4.2). > If they manage to compile your test (and/or libtiff), then you're > probably missing some "true-gcc"-specific headers. > FWIW, I managed to reproduce the issue on my laptop (XCode 4.2.1) > using g++-4.2, but the compilation was fine with llvm-g++: > > $ /usr/bin/g++-4.2 conftest.cxx -isysroot /Developer/SDKs/MacOSX10.6.sdk/ > In file included from conftest.cxx:1: > /Developer/SDKs/MacOSX10.6.sdk//usr/include/stdarg.h:4:25: error: > stdarg.h: No such file or directory > $ /usr/bin/g++ conftest.cxx -isysroot /Developer/SDKs/MacOSX10.6.sdk/ > $ > > It's possible that those headers were available in older XCode versions. > "On 10.7 (Lion), use XCode 4.1, which is a free download from the App > Store." > This might mean that XCode 4.2.x has not been tested and/or that this > is not a known issue. > > You might want to report this problem (and any progress you managed to > do, example: maybe it just works with llvm-g++) to a GTK+ development > mailing list. > > AFAICT the solutions might be to: > - avoid -isysroot if "true gcc" is to be used > - use llvm-gcc > > Andrea > > > > > > == 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@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@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/ > > > > -- > > cairo mailing list > > [email protected] > > http://lists.cairographics.org/mailman/listinfo/cairo > -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo