Hello everyone,
I’ve been trying to compile Blender 2.78 on the Raspberry Pi 3B. Because I wanted to be able to render (the raspberry pi is very usable for a renderfarm) and to open the gui, (an opengl driver has been in development for some time).
I came across various problems that could be solved like: no sse and missing libraries, but now I came to compiling Open shading Language, I’m stuck. It gives an error about some integer that it tries to convert to some weird thing. It was compiling through cmake and with GNU CC 4.9.2 (both C and C++) and i got the following output:
Building OpenShadingLanguage-1.7.3
Ensuring /opt/lib exists and is writable by us
ILMBASE_HOME=/opt/lib/openexr
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.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 build dir = /root/src/blender-deps/OpenShadingLanguage-1.7.3/build
-- CMAKE_CXX_COMPILER is /usr/bin/c++
-- CMAKE_CXX_COMPILER_ID is GNU
-- Setting Namespace to:
-- platform = linux
-- 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
-- Partio not found
-- CMAKE_INSTALL_RPATH = /opt/lib/osl-1.7.3/lib
-- Create oslversion.h from oslversion.h.in
-- Configuring done
CMake Warning (dev) at src/liboslexec/CMakeLists.txt:150 (ADD_DEPENDENCIES):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target
"/root/src/blender-deps/OpenShadingLanguage-1.7.3/src/liboslexec/liboslexec.map"
of target "oslexec" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
ILMBASE_CUSTOM
ILMBASE_CUSTOM_LIBRARIES
-- Build files have been written to: /root/src/blender-deps/OpenShadingLanguage-1.7.3/build
[ 1%] [ 2%] Scanning dependencies of target CopyFiles
[ 9%] /root/src/blender-deps/OpenShadingLanguage-1.7.3/src/liboslcomp/oslgram.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
/root/src/blender-deps/OpenShadingLanguage-1.7.3/src/liboslcomp/oslgram.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
/root/src/blender-deps/OpenShadingLanguage-1.7.3/src/liboslexec/../liboslcomp/oslgram.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
/root/src/blender-deps/OpenShadingLanguage-1.7.3/src/liboslexec/../liboslcomp/oslgram.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
/opt/lib/oiio/lib/libOpenImageIO.so: undefined reference to `OpenImageIO::v1_6::CSHA1::Update(unsigned char const*, unsigned long)'
collect2: error: ld returned 1 exit status
src/oslinfo/CMakeFiles/oslinfo.dir/build.make:103: recipe for target 'src/oslinfo/oslinfo' failed
make[2]: *** [src/oslinfo/oslinfo] Error 1
CMakeFiles/Makefile2:360: recipe for target 'src/oslinfo/CMakeFiles/oslinfo.dir/all' failed
make[1]: *** [src/oslinfo/CMakeFiles/oslinfo.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 75%] Building CXX object src/liboslexec/CMakeFiles/oslexec.dir/__/liboslcomp/ast.cpp.o
In file included from /usr/include/c++/4.9/vector:64:0,
from /opt/lib/boost/include/boost/detail/container_fwd.hpp:93,
from /opt/lib/boost/include/boost/functional/hash/extensions.hpp:22,
from /opt/lib/boost/include/boost/functional/hash/hash.hpp:560,
from /opt/lib/boost/include/boost/functional/hash.hpp:6,
from /opt/lib/boost/include/boost/unordered/unordered_map.hpp:19,
from /opt/lib/boost/include/boost/unordered_map.hpp:17,
from /root/src/blender-deps/OpenShadingLanguage-1.7.3/src/liboslexec/llvm_instance.cpp:31:
/usr/include/c++/4.9/bits/stl_vector.h: In instantiation of 'void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int; _Tp = llvm::Function*; _Alloc = std::allocator<llvm::Function*>]':
/usr/include/c++/4.9/bits/stl_vector.h:413:55: required from 'std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = int; _Tp = llvm::Function*; _Alloc = std::allocator<llvm::Function*>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<llvm::Function*>]'
/root/src/blender-deps/OpenShadingLanguage-1.7.3/src/liboslexec/llvm_instance.cpp:1043:54: required from here
/usr/include/c++/4.9/bits/stl_vector.h:1252:59: error: invalid conversion from 'int' to 'std::vector<llvm::Function*>::value_type {aka llvm::Function*}' [-fpermissive]
_M_fill_initialize(static_cast<size_type>(__n), __value);
^
/usr/include/c++/4.9/bits/stl_vector.h:1298:7: note: initializing argument 2 of 'void std::vector<_Tp, _Alloc>::_M_fill_initialize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = llvm::Function*; _Alloc = std::allocator<llvm::Function*>; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::value_type = llvm::Function*]'
_M_fill_initialize(size_type __n, const value_type& __value)
^
src/liboslexec/CMakeFiles/oslexec.dir/build.make:800: recipe for target 'src/liboslexec/CMakeFiles/oslexec.dir/llvm_instance.cpp.o' failed
make[2]: *** [src/liboslexec/CMakeFiles/oslexec.dir/llvm_instance.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:210: recipe for target 'src/liboslexec/CMakeFiles/oslexec.dir/all' failed
make[1]: *** [src/liboslexec/CMakeFiles/oslexec.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
ERROR! OpenShadingLanguage-1.7.3 failed to compile, exiting
I had to cut some succesfully compiled things away, otherwise it would be too long.
I’m new to C, but it’s hard to believe that there is an error in the code of OpenShadingLanguage.
I tried it with boost 1.60 (self-compiled) and 1.62 (self-compiled), tried compiling LLVM myself and with OSL 1.7.3 and 1.7.4, but none of this gave a different output.
I wish somebody could help me, because I’m completely lost:confused:.
Greetings, Animajosser