使用 cmake 编译周期时出现问题:找不到 OpenImageIO(缺少:OPENIMAGEIO_LIBRARY OP



我想在我的 Ubuntu 18.04 上构建并运行 Cycle 渲染引擎。我确保安装了 Cycle 存储库页面 (https://developer.blender.org/diffusion/C/( 上提到的所有关键依赖项。

问题是当我运行 cmake 时,我得到以下输出:

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告诉我它找不到OpenImageIO(缺少:OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR(

我可能应该说我最近刚刚从 Windows 10 切换到 Ubuntu,我仍然对 cmake 和 make 很不熟悉,老实说,我不知道在这种特殊情况下发生了什么......我浏览了互联网和StackOverflow,但那里提出的解决方案对我不起作用。 我想我需要以某种方式告诉 cmake 在哪里可以找到丢失的文件夹(我知道它们已安装(,但我不知道该怎么做。

如果你知道这个问题,你能指出我正确的方向吗?我将非常感谢我能从你那里得到的任何建议。

提前感谢!

编辑: 到目前为止,我所做的是通过以下命令安装 OpenImageIO:

sudo apt-get update 
sudo apt-get install openimageio-tools

这似乎不起作用,因为 cmake 仍然找不到文件夹。 在此之后,我将文件从OpenImageIO存储库(https://github.com/OpenImageIO/oiio(克隆到

sebastian@sebastian-N551JX:~/Program Files/oiio$

然后,根据安装指南(https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md(我执行了以下命令

mkdir build
cd build
cmake ..

当我这样做时,出现了一些新问题。这是一个截图:

Field3D library not found 
--     Try setting Field3D_ROOT ? 
-- GIF library not found 
--     Try setting GIF_ROOT ? 
-- Libheif library not found 
--     Try setting Libheif_ROOT ? 

当我尝试"制作"时,出现以下错误:

[ 75%] Linking CXX shared library libOpenImageIO.so
c++: error: Files/oiio/src/build-scripts/hidesymbols.map: No such file or directory

我现在会努力克服这些问题,如果有人有想法,请随时告诉我。 提前感谢!

>sudo apt install libopenimageio-dev
(在 Ubuntu 20.04 LTS 上(

最新更新