mxdon@mxdon-la:~/hvml/PurC$ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPORT=Linux -B build && cmake --build build && sudo cmake --install build CMake Error at CMakeLists.txt:11 (cmake_minimum_required): CMake 3.15 or higher is required. You are running version 3.13.4
-- Configuring incomplete, errors occurred! See also "/home/mxdon/hvml/PurC/build/CMakeFiles/CMakeOutput.log". See also "/home/mxdon/hvml/PurC/build/CMakeFiles/CMakeError.log".
mxdon@mxdon-la:~/hvml/cmake-3.15.3$ ./bootstrap --prefix=/home/mxdon/hvml/cmake-3.15.3/build/ --------------------------------------------- CMake 3.15.3, Copyright 2000-2019 Kitware, Inc. and Contributors Found GNU toolchain C compiler on this system is: gcc C++ compiler on this system is: g++ Makefile processor on this system is: make g++ has setenv g++ has unsetenv g++ does not have environ in stdlib.h g++ has stl wstring g++ has <ext/stdio_filebuf.h> --------------------------------------------- g++ -I/home/mxdon/hvml/cmake-3.15.3/Bootstrap.cmk -I/home/mxdon/hvml/cmake-3.15.3/Source -I/home/mxdon/hvml/cmake-3.15.3/Source/LexerParser -I/home/mxdon/hvml/cmake-3.15.3/Utilities -c /home/mxdon/hvml/cmake-3.15.3/Source/cmAddCustomCommandCommand.cxx -o cmAddCustomCommandCommand.o In file included from /home/mxdon/hvml/cmake-3.15.3/Utilities/cm_kwiml.h:12, from /home/mxdon/hvml/cmake-3.15.3/Source/cmAlgorithms.h:10, from /home/mxdon/hvml/cmake-3.15.3/Source/cmGlobalGenerator.h:16, from /home/mxdon/hvml/cmake-3.15.3/Source/cmAddCustomCommandCommand.cxx:11: /home/mxdon/hvml/cmake-3.15.3/Utilities/KWIML/include/kwiml/abi.h:476:3: error: #error "Byte order of target CPU unknown." # error "Byte order of target CPU unknown." ^~~~~ make: *** [Makefile:4:cmAddCustomCommandCommand.o] 错误 1 --------------------------------------------- Error when bootstrapping CMake: Problem while running make --------------------------------------------- Log of errors: /home/mxdon/hvml/cmake-3.15.3/Bootstrap.cmk/cmake_bootstrap.log ---------------------------------------------
/* Unknown CPU */ #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) -# error "Byte order of target CPU unknown." +//# error "Byte order of target CPU unknown." +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE #endif
将cmake-3.15.3添加至环境变量中, 然后就可以编译PurC了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
root@mxdon-la:/home/mxdon/hvml/PurC# export PATH=/home/mxdon/hvml/cmake-3.15.3/build/bin/:$PATH root@mxdon-la:/home/mxdon/hvml/PurC# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPORT=Linux -B build && cmake --build build && sudo /home/mxdon/hvml/cmake-3.15.3/build/bin/cmake --install build -- The CMake build type is: RelWithDebInfo -- Enabling ccache: Couldn't find ccache program. Not enabling it. -- Performing Test C_COMPILER_SUPPORTS_-fmax-errors=10 -- Performing Test C_COMPILER_SUPPORTS_-fmax-errors=10 - Success -- Performing Test CXX_COMPILER_SUPPORTS_-fmax-errors=10 -- Performing Test CXX_COMPILER_SUPPORTS_-fmax-errors=10 - Success ...... -- Installing: /usr/local/include/purc/purc.h -- Installing: /usr/local/lib/purc-0.8/libpurc-dvobj-FS.so -- Set runtime path of "/usr/local/lib/purc-0.8/libpurc-dvobj-FS.so" to "" -- Installing: /usr/local/lib/purc-0.8/libpurc-dvobj-MATH.so -- Set runtime path of "/usr/local/lib/purc-0.8/libpurc-dvobj-MATH.so" to "" -- Installing: /usr/local/bin/purc -- Set runtime path of "/usr/local/bin/purc" to ""
之后需要将PurC用到的链接库增加至系统链接路径, 修改/etc/ld.so.conf:
1 2 3 4 5
mxdon@mxdon-la:~/hvml$ cat /etc/ld.so.conf include /etc/ld.so.conf.d/*.conf /usr/local/lib/