Installing OSL

[1] Install Open Image IO

[2] Set the environment variable OPENIMAGEIOHOME to the place where you installed Open Image IO

In my case:


[3] Install boost with version greater or equal 1.42

You can download the source code from boost site and execute:

./ --prefix=~/workspace/dev/lib/boost
./bjam install

Then, you have to tell cmake were to find YOUR boost version. I did this editing the osl/src/cmake/externalpackages.cmake on OSL source folder:

set (BOOST_ROOT “~/workspace/dev/lib/boost/”)

It’s also necessary to create symbolic links to some boost compiled libraries, because cmake will look for them:

In my case I did on “/workspace/dev/lib/boost/lib” the following for each of the previous libraries:


[4] There is also a modification you need to make on osl/source/CMakeLists.txt that is to remove the -Werror flag from compilation because there are several warnings on the code that will make the build fail. It’s basically necessary to remove the -Werror from the following lines:

set ( CMAKE_C_FLAGS “${CMAKE_CXX_FLAGS} -Wall -Werror”)
set ( CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -Wall -Werror” )

[5] Add a search path for LLVM

In my system LLVM is intalled on usr/lib/llvm/ so I had to add it to the osl/src/cmake/externalpackages.cmake

find_library ( LLVM_LIBRARY
NAMES LLVM-2.7 LLVM-2.8svn LLVM-2.8 LLVM-2.9svn
PATHS /usr/local/lib /opt/local/lib /usr/lib/llvm/lib )
find_path ( LLVM_INCLUDES llvm/LLVMContext.h
PATHS /usr/local/include /opt/local/include /usr/include)


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s