Issue
I would like to build and run the Cycles Render Engine on my Ubuntu 18.04. I made sure that all the crucial dependencies mentioned on the Cycles repository page (https://developer.blender.org/diffusion/C/) are installed.
The problem is that when I run cmake, I get the following output:
sebastian@sebastian-N551JX:~$ cd Program\ Files/cycles/
sebastian@sebastian-N551JX:~/Program Files/cycles$ cd build
sebastian@sebastian-N551JX:~/Program Files/cycles/build$ cmake ..
CMake Deprecation Warning at CMakeLists.txt:36 (cmake_policy):
The OLD behavior for policy CMP0043 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- 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
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so
-- GLUT_FOUND=TRUE
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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 Warning (dev) at /usr/local/share/cmake-3.15/Modules/FindOpenGL.cmake:275 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
src/cmake/external_libs.cmake:71 (find_package)
src/CMakeLists.txt:18 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found Glew: /usr/lib/x86_64-linux-gnu/libGLEW.so
CMake Error at /usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenImageIO (missing: OPENIMAGEIO_LIBRARY
OPENIMAGEIO_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
src/cmake/Modules/FindOpenImageIO.cmake:61 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/cmake/external_libs.cmake:81 (find_package)
src/CMakeLists.txt:18 (include)
-- Configuring incomplete, errors occurred!
See also "/home/sebastian/Program Files/cycles/build/CMakeFiles/CMakeOutput.log".
See also "/home/sebastian/Program Files/cycles/build/CMakeFiles/CMakeError.log".
cmake is telling me that it couldn't find OpenImageIO (missing: OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR)
I probably should say that I just recently switched from Windows 10 to Ubuntu and I am still quite unfamiliar with cmake and make and honestly, I don't know what's going on in this particular case... I browsed the internet and StackOverflow but the solutions proposed there didn't work for me. I guess I somehow need to tell cmake where to find the missing folders (I know they are installed) but I haven't got any idea how to do so.
If you know the issue, can you point me in the right direction. I would be more than grateful for any piece of advice I can get from you.
Thanks in advance!
Edit: What I did so far was installing OpenImageIO via the following commands:
sudo apt-get update
sudo apt-get install openimageio-tools
This didn't seem to work since cmake still couldn't find the folders. After this, I cloned the files from the OpenImageIO repository (https://github.com/OpenImageIO/oiio) to
sebastian@sebastian-N551JX:~/Program Files/oiio$
Then, according to the installation guide (https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md) I did the following commands
mkdir build
cd build
cmake ..
While I was doing this, some new problems arose. Here's a snipped:
Field3D library not found
-- Try setting Field3D_ROOT ?
-- GIF library not found
-- Try setting GIF_ROOT ?
-- Libheif library not found
-- Try setting Libheif_ROOT ?
And when I tried to "make" I got the following error:
[ 75%] Linking CXX shared library libOpenImageIO.so
c++: error: Files/oiio/src/build-scripts/hidesymbols.map: No such file or directory
I will try to overcome these issues now, if somebody has an idea, please feel free to let me know. Thanks in advance!
Solution
sudo apt install libopenimageio-dev
(on Ubuntu 20.04 LTS)
Answered By - Remy Mellet