-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
open-scene-graph build failure on 10.11: c++11-narrowing error #46372
Description
open-scene-graph is failing to build for me on OS X 10.11.1 with Xcode 7.0 or 7.1.
This is for a plain HOMEBREW_MAKE_JOBS=1 brew install -v --build-from-source open-scene-graph, with no other options specified.
Build logs: https://gist.github.com/d52bf7d0cd9fa560fff6
[ 14%] Building CXX object src/osgDB/CMakeFiles/osgDB.dir/FileUtils.cpp.o
cd /tmp/open-scene-graph20151125-85762-o4wepw/OpenSceneGraph-3.4.0/build/src/osgDB && /usr/local/Library/ENV/4.3/clang++ -DDARWIN_IMAGEIO -DOSGDB_LIBRARY -DOSG_DEFAULT_LIBRARY_PATH=\"/usr/local/Cellar/open-scene-graph/3.4.0/lib/osgPlugins-3.4.0\" -DOSG_PLUGIN_EXTENSION=.so -DUSE_ZLIB -DosgDB_EXPORTS -I/tmp/open-scene-graph20151125-85762-o4wepw/OpenSceneGraph-3.4.0/include -F/Applications/Xcode-7.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks -I/tmp/open-scene-graph20151125-85762-o4wepw/OpenSceneGraph-3.4.0/build/include -std=c++11 -stdlib=libc++ -Wno-conversion -arch x86_64 -isysroot /Applications/Xcode-7.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fPIC -x objective-c++ -o CMakeFiles/osgDB.dir/FileUtils.cpp.o -c /tmp/open-scene-graph20151125-85762-o4wepw/OpenSceneGraph-3.4.0/src/osgDB/FileUtils.cpp
In file included from /tmp/open-scene-graph20151125-85762-o4wepw/OpenSceneGraph-3.4.0/src/osgDB/FileUtils.cpp:888:
In file included from /Applications/Xcode-7.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:80:
In file included from /Applications/Xcode-7.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
In file included from /Applications/Xcode-7.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:74:
In file included from /Applications/Xcode-7.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework/Headers/SecStaticCode.h:41:
/Applications/Xcode-7.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework/Headers/CSCommon.h:200:32: error: enumerator value evaluates to -2147483648, which cannot be narrowed to type 'uint32_t' (aka 'unsigned int') [-Wc++11-narrowing]
kSecCSConsiderExpiration = 1 << 31, /* consider expired certificates invalid */
^
1 error generated.
make[2]: *** [src/osgDB/CMakeFiles/osgDB.dir/FileUtils.cpp.o] Error 1
make[1]: *** [src/osgDB/CMakeFiles/osgDB.dir/all] Error 2
make: *** [all] Error 2
There are existing open issues for open-scene-graph – #44524 (OS version detection issue), #43536 (collada-dom dependency problem), #46356 (iconv link error) – but they look like they have different causes, so I'm opening a new one.
The weird thing is that this code looks like it's coming from one of Xcode's system-supplied headers, not open-scene-graph. Maybe that header is not clean with respect to the effective warning flags that open-scene-graph is compiling it with.
-Wc++11-narrowing is the warning group that's being triggered here. I don't know what in the formula or brew's superenv definition is enabling it and causing it to be an error.