[GCC-XML] Compiling gccxml with homebrewed gcc4.9

michkapopoff at gmail.com michkapopoff at gmail.com
Mon Oct 20 11:17:32 EDT 2014


I removed the flag and it is ok. Cmake went to the end of the configuration step, and I was able to compile gccxml.

The tests are all failing, here is the first one (the others are failing with the same error):

1: Test command: /Users/michkapopoff/repo/builds/gccxml/bin/gccxml "-I/Users/michkapopoff/repo/builds/gccxml/GCC_XML/GXFront" "-I/Users/michkapopoff/repo/builds/gccxml/GCC_XML" "-I/Users/michkapopoff/repo/builds/gccxml/GCC_XML/GXFront" "-I/Users/michkapopoff/repo/gccxml/GCC_XML/GXFront" "/Users/michkapopoff/repo/gccxml/GCC_XML/GXFront/gxConfiguration.cxx" "-fxml=gxConfiguration.cxx.gcc.xml"
1: Test timeout computed to be: 1500
1: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/wchar.h:90,
1:                  from /usr/local/Cellar/gcc/4.9.1/lib/gcc/x86_64-apple-darwin13.4.0/4.9.1/include/c++/cwchar:44,
1:                  from /usr/local/Cellar/gcc/4.9.1/lib/gcc/x86_64-apple-darwin13.4.0/4.9.1/include/c++/bits/postypes.h:40,
1:                  from /usr/local/Cellar/gcc/4.9.1/lib/gcc/x86_64-apple-darwin13.4.0/4.9.1/include/c++/iosfwd:40,
1:                  from /Users/michkapopoff/repo/builds/gccxml/GCC_XML/gxsys/ios/iosfwd:23,
1:                  from /Users/michkapopoff/repo/builds/gccxml/GCC_XML/gxsys/SystemTools.hxx:15,
1:                  from /Users/michkapopoff/repo/gccxml/GCC_XML/GXFront/gxSystemTools.h:22,
1:                  from /Users/michkapopoff/repo/gccxml/GCC_XML/GXFront/gxConfiguration.h:20,
1:                  from /Users/michkapopoff/repo/gccxml/GCC_XML/GXFront/gxConfiguration.cxx:17:
1: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdio.h:274: error: wrong number of arguments specified for 'deprecated' attribute
1: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdio.h:389: error: wrong number of arguments specified for 'deprecated' attribute
 1/11 Test  #1: gxConfiguration.cxx ..............***Failed    0.67 sec

I added a -DCMAKE_OSX_SYSROOT=“” flag when running cmake, to make sure it does not try to find the OS X SDK folder, but that did not help (because even if I ask cmake to use gcc49, it will look for the OS X SDK):

ccmake -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/4.9.1/bin/g++-4.9 -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/4.9.1/bin/gcc-4.9 -DCMAKE_OSX_SYSROOT=""

Here are the locations of the stdio.h files:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1/tr1/stdio.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/stdio.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/c++/4.2.1/tr1/stdio.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/stdio.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/stdio.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/tr1/stdio.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdio.h
/usr/local/Cellar/gcc/4.9.1/lib/gcc/x86_64-apple-darwin13.4.0/4.9.1/include/c++/tr1/stdio.h
/usr/local/Cellar/gcc/4.9.1/lib/gcc/x86_64-apple-darwin13.4.0/4.9.1/include/ssp/stdio.h

Michka

On 20 Oct 2014, at 15:20, Brad King <brad.king at kitware.com> wrote:

> On 10/18/2014 04:56 PM, michkapopoff at gmail.com wrote:
>> I think the error is coming from: gcc-4.9: error: unrecognized command
>> line option '-no-cpp-precomp’
> 
> That is in gccxml in GCC/CMakeLists.txt:
> 
> IF(APPLE AND CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang)$")
>   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-cpp-precomp")
> ENDIF()
> 
> It looks like the addition of that flag dates back to 2003 so
> I suspect it is no longer necessary.  Try dropping that block.
> 
> -Brad
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20141020/2af94969/attachment-0002.html>


More information about the gccxml mailing list