OSX 10.9 static build fails compiling ociocheck


andersl...@...
 

Hello, I'm trying to build 1.0.9 on OSX 10.9, but the build is failing compiling ociocheck:

Linking CXX executable ociocheck
cd /Users/anders/code/OpenColorIO/build/src/apps/ociocheck && /usr/local/Cellar/cmake/2.8.12.1/bin/cmake -E cmake_link_script CMakeFiles/ociocheck.dir/link.txt --verbose=1
/usr/bin/c++    -msse2 -O2 -g -DNDEBUG -arch x86_64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/ociocheck.dir/main.cpp.o CMakeFiles/ociocheck.dir/__/share/argparse.cpp.o CMakeFiles/ociocheck.dir/__/share/pystring.cpp.o CMakeFiles/ociocheck.dir/__/share/strutil.cpp.o  -o ociocheck  -lOpenColorIO 
ld: library not found for -lOpenColorIO
clang: error: linker command failed with exit code 1 (use -v to see invocation)


To do the static build I'm just setting OCIO_BUILD_SHARED to OFF and OCIO_BUILD_STATIC to ON. libOpenColorIO.a is present in build/src/core, but isn't getting found, which is strange as I thought CMake was supposed to handle all that stuff.

I'm also a little bit worried by this message:

Linking CXX static library libtinyxml.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libtinyxml.a(tinystr.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libtinyxml.a(tinystr.cpp.o) has no symbols
[100%] Built target tinyxml


If I manually add libOpenColorIO.a's path to the environment using link_directories() then it gets found, but then I get a stream of missing symbols:

Undefined symbols for architecture x86_64:
  "TiXmlElement::SetAttribute(char const*, char const*)", referenced from:
      OpenColorIO::v1::CDLTransform::getXML() const in libOpenColorIO.a(CDLTransform.cpp.o)
  "TiXmlElement::TiXmlElement(char const*)", referenced from:
      OpenColorIO::v1::CDLTransform::getXML() const in libOpenColorIO.a(CDLTransform.cpp.o)
  "TiXmlDocument::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)", referenced from:
      OpenColorIO::v1::LoadCDL(OpenColorIO::v1::CDLTransform*, char const*) in libOpenColorIO.a(CDLTransform.cpp.o)
      OpenColorIO::v1::CDLTransform::CreateFromFile(char const*, char const*) in libOpenColorIO.a(CDLTransform.cpp.o)
  "TiXmlDocument::TiXmlDocument()", referenced from:
      OpenColorIO::v1::LoadCDL(OpenColorIO::v1::CDLTransform*, char const*) in libOpenColorIO.a(CDLTransform.cpp.o)
      OpenColorIO::v1::CDLTransform::CreateFromFile(char const*, char const*) in libOpenColorIO.a(CDLTransform.cpp.o)
      OpenColorIO::v1::CDLTransform::getXML() const in libOpenColorIO.a(CDLTransform.cpp.o)
      OpenColorIO::v1::(anonymous namespace)::LocalFileFormat::Read(std::istream&) const in libOpenColorIO.a(FileFormatCCC.cpp.o)
      OpenColorIO::v1::(anonymous namespace)::LocalFileFormat::Read(std::istream&) const in libOpenColorIO.a(FileFormatIridasLook.cpp.o)
  "YAML::Node::Node()", referenced from:
      OpenColorIO::v1::OCIOYaml::open(std::istream&, std::tr1::shared_ptr<OpenColorIO::v1::Config>&, char const*) const in libOpenColorIO.a(OCIOYaml.cpp.o)
  "YAML::Node::~Node()", referenced from:
      OpenColorIO::v1::OCIOYaml::open(std::istream&, std::tr1::shared_ptr<OpenColorIO::v1::Config>&, char const*) const in libOpenColorIO.a(OCIOYaml.cpp.o)

(this carries on for what must be every single symbol in the library)

Any ideas?

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