[Bf-cycles] Issues on building cycles standalone with OSL

Sergey Sharybin sergey.vfx at gmail.com
Sat Jun 6 19:10:41 CEST 2015


Hi,

Seems several issues are mixed in here. First one is related on
`install_deps.sh --with-osl` not doing OpenEXR compilation but still tries
to use the latest OpenEXR libraries for OSL. You might try something like
this: `install_deps.sh --with-all --skip-opencollada`. This might install a
bit more packages and compile some extra libs than you need just for Cycles
but it should work.

Second issue is caused by the fact that we don't really support OSL 1.4
anymore. In fact, the only supported versions are either current 1.6
development branch or 1.5 version from our github repository with the
backported closure alignment fixes. This is because all other versions are
not stable for usage in Blender.

Alternatively, you can just compile latest OSL and OIIO manually with
cmake, it's pretty simple actually and guaranteed to work :)

On Sat, Jun 6, 2015 at 6:18 PM, lorenzo angeli <lorenzo.angeli at efestolab.uk>
wrote:

> Hi all,
> I'm trying to get cycles standalone built with OSL, but I'm having some
> problems.
>
> I tried first with blender/build_files/build_environment/install_deps.sh
> --with-osl
> But this resulted in this error :
>
> Building OpenShadingLanguage-1.5.11
> Ensuring /opt/lib exists and is writable by us
> From https://github.com/Nazg-Gul/OpenShadingLanguage
>  * branch            blender-fixes -> FETCH_HEAD
> Already up-to-date.
> HEAD is now at 22ee5ea... Workaround to make OSl compilable with older
> OIIO library
> HEAD is now at 22ee5ea Workaround to make OSl compilable with older OIIO
> library
> -- The C compiler identification is GNU 4.8.2
> -- The CXX compiler identification is GNU 4.8.2
> -- Check for working C compiler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Project source dir =
> /home/efesto/src/blender-deps/OpenShadingLanguage-1.5.11
> -- Project build dir =
> /home/efesto/src/blender-deps/OpenShadingLanguage-1.5.11/build
> -- Using gcc 4.8 as the compiler
> -- CMAKE_CXX_COMPILER is /usr/bin/c++
> -- CMAKE_CXX_COMPILER_ID is GNU
> -- platform = linux64
> -- OPENIMAGEIOHOME = /opt/lib/oiio
> -- #define ILMBASE_VERSION_STRING "2.1.0"
> -- Looking for include file pthread.h
> -- Looking for include file pthread.h - found
> -- Looking for pthread_create
> -- Looking for pthread_create - not found
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE
> CMake Error at
> /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108
> (message):
>   Could NOT find IlmBase (missing: ILMBASE_IEX-2_1_LIBRARIES
>   ILMBASE_IMATH-2_1_LIBRARIES ILMBASE_ILMTHREAD-2_1_LIBRARIES)
> Call Stack (most recent call first):
>   /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315
> (_FPHSA_FAILURE_MESSAGE)
>   src/cmake/modules/FindIlmBase.cmake:214
> (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
>   src/cmake/externalpackages.cmake:37 (find_package)
>   CMakeLists.txt:200 (include)
>
> I then tried to rely on the system libraries (I'm on mint 17).
> (osl version is 1.4.2 )
>
> But it fails during the compilation with :
>
> /home/efesto/SRC/cycles/src/kernel/osl/osl_closures.cpp: In function ‘void
> ccl::register_closure(OSL::ShadingSystem*, const char*, int,
> OSL::ClosureParam*, OSL::PrepareClosureFunc)’:
> /home/efesto/SRC/cycles/src/kernel/osl/osl_closures.cpp:182:58: error:
> invalid conversion from ‘int’ to ‘OSL::CompareClosureFunc {aka bool
> (*)(int, const void*, const void*)}’ [-fpermissive]
>   ss->register_closure(name, id, params, prepare, NULL, 16);
>                                                           ^
> In file included from
> /home/efesto/SRC/cycles/src/kernel/osl/osl_closures.h:40:0,
>                  from
> /home/efesto/SRC/cycles/src/kernel/osl/osl_closures.cpp:36:
> /usr/include/OSL/oslexec.h:290:18: error:   initializing argument 6 of
> ‘virtual void OSL::ShadingSystem::register_closure(const char*, int, const
> OSL::ClosureParam*, OSL::PrepareClosureFunc, OSL::SetupClosureFunc,
> OSL::CompareClosureFunc)’ [-fpermissive]
>      virtual void register_closure(const char *name, int id, const
> ClosureParam *params,
>                   ^
> make[2]: ***
> [src/kernel/osl/CMakeFiles/cycles_kernel_osl.dir/osl_closures.cpp.o] Error 1
> make[1]: *** [src/kernel/osl/CMakeFiles/cycles_kernel_osl.dir/all] Error 2
> make: *** [all] Error 2
>
> Thanks.
>
>
> --
>
> -------------------------------------------------------------------------------------------------------------------
> Efesto Lab LTD, Chancery Station House, 31-33 High Holborn, London WC1V 6AX
>
> -------------------------------------------------------------------------------------------------------------------
> www.efestolab.uk
>
> skype: lorenzo.efestolab
> phone: +44 7961031018
>
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>


-- 
With best regards, Sergey Sharybin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20150606/ed076606/attachment.htm 


More information about the Bf-cycles mailing list