Bugs in Windows build process


Nathan Weston <elb...@...>
 

After much struggle, I finally managed to get OCIO built on Windows, but there are several apparent bugs in the build process that require manual intervetion to work around.

I ran CMake from the Visual Studio 2008 command prompt (32-bit), with the following command line:
   cmake -D CMAKE_INSTALL_PREFIX=c:\ocio-em64t -D CMAKE_BUILD_TYPE=Release ^
         -D OCIO_BUILD_STATIC=OFF -D BOOST_ROOT=c:\boost_1_49_0  ^
         -D OCIO_BUILD_APPS=OFF -D OCIO_USE_BOOST_PTR=ON ^
         -D PYTHON_VERSION="2.6.5" -D PYTHON_LIB=C:/Python26/libs  ^
         -D PYTHON_INCLUDE=C:/Python26/include ^
     -D OCIO_LINK_PYGLUE=ON ^
         -G "NMake Makefiles" ..\

Bug #1: I have to specifiy OCIO_BUILD_STATIC here, otherwise it will build the static lib and the import lib at the same location -- the former overwrites the latter, which prevents me from linking with the DLL.

Bug #2: The build fails with "NMAKE : fatal error U1073: don't know how to make 'ext\dist\lib\libyaml-cppmd.lib'"

It turns out that yaml-cpp is built in debug mode, even though this is a release build. So libyaml-cppmdd.lib (note the extra 'd') exists, but the release version of the library (upon which OpenColorIO.dll depends) does not. I worked around this by building yaml-cpp separately and copying the correct lib into the build directory.

Bug #3: building the python bindings fails because PyDoc.h doesn't exist. I worked around this by running createPyDocH.py manually.

I'm afraid CMake is something of a mystery to me so I can't offer much help in the way of fixing these bugs. But if anyone has suggestions or proposed fixes, I'm happy to try them out.

- Nathan

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