Issue Compiling OCIO Under OSX and vcpkg.


Simon Smith
 

Hi,

I’m attempting to use vcpkg as our dependency system for compiling various libraries for our application (OpenColorIO, OpenEXR, OpenImageIO) and everything works on all platforms except trying to compile OpenColorIO under OSX (always the platform that causes me the most bother!). It’s a pretty new system to me so I don’t claim to know it all inside out and may have just made a rookie error somewhere!

OK, so i’ve got Catalina (10.15.6) set up with XCode 11 (11.7) and have set up vcpkg as per the instructions.
As a prerequisite for compiling OpenColorIO I had to install brew to get xquartz installed (brew cask install quartz).

Once done, I run vcpkg install opencolorio which grabs v1.1.1 and various other dependencies it needs along the way (like yaml) but then fails to compile the OCIO library after successfully doing all the pre-requisites with the following error:


[49/63] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DOpenColorIO_STATIC -DUSE_SSE -I/Users/lightmap/Documents/vcpkg/buildtrees/opencolorio/src/7e704498fe-32e68b4241.clean/export -Iexport -I/Users/lightmap/Documents/vcpkg/buildtrees/opencolorio/src/7e704498fe-32e68b4241.clean/ext/oiio/src/include -I/Users/lightmap/Documents/vcpkg/installed/x64-osx/share/yaml-cpp/../../include -Iext/dist/include -isystem /Users/lightmap/Documents/vcpkg/installed/x64-osx/include -fPIC -msse2 -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk   -DTIXML_USE_STL   -fPIC -fvisibility=hidden -Werror -MD -MT src/core/CMakeFiles/OpenColorIO_STATIC.dir/OCIOYaml.cpp.o -MF src/core/CMakeFiles/OpenColorIO_STATIC.dir/OCIOYaml.cpp.o.d -o src/core/CMakeFiles/OpenColorIO_STATIC.dir/OCIOYaml.cpp.o -c /Users/lightmap/Documents/vcpkg/buildtrees/opencolorio/src/7e704498fe-32e68b4241.clean/src/core/OCIOYaml.cpp
FAILED: src/core/CMakeFiles/OpenColorIO_STATIC.dir/OCIOYaml.cpp.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DOpenColorIO_STATIC -DUSE_SSE -I/Users/lightmap/Documents/vcpkg/buildtrees/opencolorio/src/7e704498fe-32e68b4241.clean/export -Iexport -I/Users/lightmap/Documents/vcpkg/buildtrees/opencolorio/src/7e704498fe-32e68b4241.clean/ext/oiio/src/include -I/Users/lightmap/Documents/vcpkg/installed/x64-osx/share/yaml-cpp/../../include -Iext/dist/include -isystem /Users/lightmap/Documents/vcpkg/installed/x64-osx/include -fPIC -msse2 -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk   -DTIXML_USE_STL   -fPIC -fvisibility=hidden -Werror -MD -MT src/core/CMakeFiles/OpenColorIO_STATIC.dir/OCIOYaml.cpp.o -MF src/core/CMakeFiles/OpenColorIO_STATIC.dir/OCIOYaml.cpp.o.d -o src/core/CMakeFiles/OpenColorIO_STATIC.dir/OCIOYaml.cpp.o -c /Users/lightmap/Documents/vcpkg/buildtrees/opencolorio/src/7e704498fe-32e68b4241.clean/src/core/OCIOYaml.cpp
In file included from /Users/lightmap/Documents/vcpkg/buildtrees/opencolorio/src/7e704498fe-32e68b4241.clean/src/core/OCIOYaml.cpp:75:
In file included from /Users/lightmap/Documents/vcpkg/installed/x64-osx/share/yaml-cpp/../../include/yaml-cpp/yaml.h:11:
In file included from /Users/lightmap/Documents/vcpkg/installed/x64-osx/share/yaml-cpp/../../include/yaml-cpp/emitter.h:18:
/Users/lightmap/Documents/vcpkg/installed/x64-osx/share/yaml-cpp/../../include/yaml-cpp/binary.h:23:17: error: expected member name or ';' after declaration specifiers
      : m_data{}, m_unownedData(data_), m_unownedSize(size_) {}
                ^
/Users/lightmap/Documents/vcpkg/installed/x64-osx/share/yaml-cpp/../../include/yaml-cpp/binary.h:23:15: error: expected '('
      : m_data{}, m_unownedData(data_), m_unownedSize(size_) {} 


Any suggestions as to how to fix this and get vcpkg to build OCIO please?
As a slight aside, it would be really useful if vcpkg could handle xquartz automatically, but I don’t know if that is actually possible.


Best Regards,
   Simon

---
Simon C Smith
Co-Founder & CTO
www.lightmap.co.uk

Email confidentiality notice:
This message is private and confidential. If you have received this message in error, please notify us and remove it from your system.

Join ocio-dev@lists.aswf.io to automatically receive all group messages.