centos上cmake编译一些

Posted A 阿牛哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos上cmake编译一些相关的知识,希望对你有一定的参考价值。


不想说啥了,就这样吧

centos上编译真的是痛苦~~~


boost, TBB, HDF5, OpenEXR, Alembic,IlmBase, MaterialX, Ptex, OpenSubdiv, Blosc, OpenVDB, JPEG, TIFF, PNG, OpenImageIO, OpenColorIO,


/xmlgrg/517/src 为压缩包的存放路径
mkdir /xmlgrg/517/src -pv# cat /etc/redhat-releaseCentOS Linux release 7.4.1708 (Core)
# cd /xmlgrg/517/src
1、cmake在linux机器上解压该压缩包,

# tar zxvf cmake-3.16.0-Linux-x86_64.tar.gz
# cd cmake-3.16.0-linux-x86_64/ ll总用量 0drwxr-xr-x. 2 root root 76 3月 23 23:54 bindrwxr-xr-x. 3 root root 19 3月 23 23:54 docdrwxr-xr-x. 4 root root 30 3月 23 23:54 mandrwxr-xr-x. 10 root root 131 3月 23 23:54 share

# pwd/xmlgrg/517/src/cmake-3.16.0-Linux-x86_64
创建软链接# sudo ln -s -f /xmlgrg/517/src/cmake-3.16.0-Linux-x86_64/bin/cmake /usr/bin/cmake# sudo vi /etc/profile 文件末尾添加export PATH=$PATH:/xmlgrg/517/src/cmake-3.16.0-Linux-x86_64/bin
# source /etc/profile 使配置生效# cmake --version# cmakecmake cmake-gui



2、gcc 7 yum -y install centos-release-sclyum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutilsscl enable devtoolset-7 bash
需要注意的是scl命令启用只是临时的,退出shell或重启就会恢复原系统gcc版本。如果要长期使用gcc 7.3的话:echo "source /opt/rh/devtoolset-7/enable" >>/etc/profile

###########yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutilsscl enable devtoolset-9 bash##########

[root@localhost src]# gcc -v
[root@localhost src]# g++ -v


##############mpichhttps://www.mpich.org/static/downloads/tar zxvf mpich-3.3.tar.gzcd mpich-3.3./configure --prefix=/xmlgrg/517 --enable-shared CFLAGS=-fPIC --disable-fortranmake -j6make install





3、#########boost
unzip boost-master-1.64.0.zip
yum -y install python-devel (pyconfig.h 为了这个文件)
yum -y install bzip2-devel zlib-devel zlib bzip2

yum install libicu libicu-devel openssl openssl-devel -y
注意路径,这几个文件没有,需要手动创建mkdir /xmlgrg/517/src/boost-master/libs/beast/includemkdir /xmlgrg/517/src/boost-master/libs/callable_traits/includemkdir /xmlgrg/517/src/boost-master/libs/mp11/includemkdir /xmlgrg/517/src/boost-master/libs/poly_collection/includemkdir /xmlgrg/517/src/boost-master/libs/stacktrace/include
cd boost-master/

General CMake and CXX settings
# cat CMakeLists.txt ###add_compile_options(-fPIC) 添加这个,为了openvdb可以编译成功
cmake_minimum_required(VERSION 3.5)project(boost)
macro(find_package NAME) if(NOT "${NAME}" MATCHES "^boost_.*$" AND NOT "${NAME}" STREQUAL BCM) _find_package(${ARGV}) else() set(${ARGV0}_FOUND ON CACHE BOOL "") endif()endmacro()
include(bcm/share/bcm/cmake/BCMConfig.cmake)
set(EXCLUDE_LIBS)add_compile_options(-fPIC)

#mkdir buildcd build
sudo cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6




# cat /etc/ld.so.conf 这个还是要设置的,血坑呀,include 这个目录的锅include ld.so.conf.d/*.confinclude /xmlgrg/517
# sudo ldconfig

设置库共享libexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/xmlgrg/517/lib/export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/xmlgrg/517/lib64/

include头文件路径export C_INCLUDE_PATH=$C_INCLUDE_PATH:/xmlgrg/517/includeexport CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/xmlgrg/517/include
查看添加结果:
对于Cecho | gcc -v -x c -E -
对于C++echo | g++ -v -x c++ -E - 或者 echo | gcc -v -x c++ -E -
#################(修改可以直接命令行输入(一次性),可以在/etc/profile中完成(对所有用户生效),也可以在用户home目录下的.bashrc或.bash_profile中添加(针对某个用户生效),修改完后重新登录即生效。)设置gcc默认的inlcude路径(在终端或在/etc/profile输入):C_INCLUDE_PATH=$C_INCLUDE_PATH:/new/include/direxport C_INCLUDE_PATH
设置g++默认的include路径(在终端或在/etc/profile输入):CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/new/include/direxport CPLUS_INCLUDE_PATH

###在/etc/profile文件中添加库共享路径执行sudo gedit /etc/profile,然后在其中加入一行
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 使该配置文件生效
source /etc/profile######

######oneTBB
# cd oneTBB-2020_U3 tar zxvf oneTBB-2020_U3.tar.gz

make -j6

cd buildchmod +x *.shsh generate_tbbvars.shsh tbbvars.sh
cd linux_intel64_gcc_cc7.3.1_libc2.17_kernel3.10.0_release/


cp *.so /xmlgrg/517/libcp *.so.2 /xmlgrg/517/lib/sbin/ldconfig


cd /xmlgrg/517/src/oneTBB-2020_U3/include/ 这一步注意目录哦~

cp -r * /xmlgrg/517/include
# find / -name libtbb.sofind: ‘/proc/5763’: 没有那个文件或目录/xmlgrg/517/src/oneTBB-2020_U3/build/linux_intel64_gcc_cc7.3.1_libc2.17_kernel3.10.0_release/libtbb.so/xmlgrg/517/lib/libtbb.so

# ld -ltbb --verbose 需要做一个软链接

ln -s -f /xmlgrg/517/lib/libtbb.so /usr/lib64/libtbb.soln -s -f /xmlgrg/517/lib/libtbb.so /usr/local/lib64/libtbb.so


ln -s -f /xmlgrg/517/lib/libtbb.so.2 /usr/lib64/libtbb.so.2ln -s -f /xmlgrg/517/lib/libtbb.so.2 /usr/local/lib64/libtbb.so.2

验证# cd /xmlgrg/517/src/oneTBB-2020_U3/examples/pipeline/square# make 会报错,奇怪了,( cp -r * /usr/local/include/ 需要include内的文本)g++ -O2 -DNDEBUG -o square square.cpp gen_input.cpp -ltbb -lrt./square 0 input.txt output.txtserial run time = 0.209541parallel run time = 0.0371328elapsed time : 0.388133 seconds



######hdf5 其实官网有编译好的
tar zxvf CMake-hdf5-1.12.0.tar.gz
cd /xmlgrg/517/src/CMake-hdf5-1.12.0/hdf5-1.12.0
mkdir 617cd 617

cmake .. -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DHDF5_BUILD_TOOLS=OFF -DHDF5_BUILD_EXAMPLES=OFF
cmake --build . --config Release --target install -- -j6
##########hdf5 使用这个编译,有可能会避开下边的一些报错
cmake .. -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DHDF5_BUILD_TOOLS=OFF -DHDF5_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DDEFAULT_API_VERSION:STRING=v110
cmake --build . --config Release --target install -- -j6

############



###IlmBase

使用这个2.4的版本吧
wget https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.4.0.tar.gz
tar zxvf openexr-2.4.0.tar.gz
mkdir /xmlgrg/517/src/openexr-2.4.0/IlmBase/617cd /xmlgrg/517/src/openexr-2.4.0/IlmBase/617cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6

添加一些so链接,后边有一个包需要这个so文件
find / -name libIex.sofind / -name libImath.sofind / -name libIlmThread.so
# ld -lIex --verbose
==================================================
attempt to open /usr/x86_64-redhat-linux/lib64/libIex.so failedattempt to open /usr/x86_64-redhat-linux/lib64/libIex.a failedattempt to open /usr/local/lib64/libIex.so failedattempt to open /usr/local/lib64/libIex.a failedattempt to open /lib64/libIex.so failedattempt to open /lib64/libIex.a failedattempt to open /usr/lib64/libIex.so failedattempt to open /usr/lib64/libIex.a failedattempt to open /usr/x86_64-redhat-linux/lib/libIex.so failedattempt to open /usr/x86_64-redhat-linux/lib/libIex.a failedattempt to open /usr/lib64/libIex.so failedattempt to open /usr/lib64/libIex.a failedattempt to open /usr/local/lib/libIex.so failedattempt to open /usr/local/lib/libIex.a failedattempt to open /lib/libIex.so failedattempt to open /lib/libIex.a failedattempt to open /usr/lib/libIex.so failedattempt to open /usr/lib/libIex.a failed



设置so文件的软连接
ln -s -f /xmlgrg/517/lib64/libIex.so /usr/lib64/libIex.soln -s -f /xmlgrg/517/lib64/libIex.so /usr/local/lib64/libIex.so

ln -s -f /xmlgrg/517/lib64/libImath.so /usr/lib64/libImath.soln -s -f /xmlgrg/517/lib64/libImath.so /usr/local/lib64/libImath.so

ln -s -f /xmlgrg/517/lib64/libIlmThread.so /usr/lib64/libIlmThread.soln -s -f /xmlgrg/517/lib64/libIlmThread.so /usr/local/lib64/libIlmThread.so
ldconfig
# ld -lIex --verbose



试图打开 //usr/x86_64-redhat-linux/lib64/libIex.so 失败80/78试图打开 //usr/x86_64-redhat-linux/lib64/libIex.a 失败试图打开 //usr/lib64/libIex.so 成功-lIex (//usr/lib64/libIex.so)libstdc++.so.6 needed by //usr/lib64/libIex.sofound libstdc++.so.6 at //usr/lib64/libstdc++.so.6libm.so.6 needed by //usr/lib64/libIex.sofound libm.so.6 at //usr/lib64/libm.so.6libgcc_s.so.1 needed by //usr/lib64/libIex.sofound libgcc_s.so.1 at //usr/lib64/libgcc_s.so.1libc.so.6 needed by //usr/lib64/libIex.sofound libc.so.6 at //usr/lib64/libc.so.6ld-linux-x86-64.so.2 needed by //usr/lib64/libstdc++.so.6found ld-linux-x86-64.so.2 at //usr/lib64/ld-linux-x86-64.so.2ld: 警告: 无法找到项目符号 _start; 无法设置起始地址


###OpenEXR
tar zxvf openexr-2.4.0.tar.gzmkdir /xmlgrg/517/src/openexr-2.4.0/OpenEXR/617cd /xmlgrg/517/src/openexr-2.4.0/OpenEXR/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6







###alembic-1.8.2
tar zxvf alembic-1.8.2.tar.gz
mkdir /xmlgrg/517/src/alembic-1.8.2/617cd /xmlgrg/517/src/alembic-1.8.2/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DUSE_BINARIES=OFF -DUSE_TESTS=OFF -DUSE_HDF5=ON -DHDF5_ROOT="/xmlgrg/517" -DCMAKE_CXX_FLAGS="-D H5_BUILT_AS_DYNAMIC_LIB" -DILMBASE_ROOT="/xmlgrg/517" ..

#####Could not find Imath looking for IlmBase instead.######
cmake --build . --config Release --target install -- -j6






####doxygen
https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_9_0.tar.gz
https://sourceforge.net/projects/doxygen/files/

tar -zxvf doxygen-Release_1_9_0.tar.gz
mkdir /xmlgrg/517/src/doxygen-Release_1_9_0/617 cd /xmlgrg/517/src/doxygen-Release_1_9_0/617 yum -y install flex bison
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6




##MaterialX-1.38.0


https://github.com/materialx/MaterialX/archive/refs/tags/v1.38.0.tar.gz
# tar zxvf MaterialX-1.38.0.tar.gzmkdir /xmlgrg/517/src/MaterialX-1.38.0/617
cd /xmlgrg/517/src/MaterialX-1.38.0/617
yum install -y libXt-devel mesa-libGL-devel mesa-libGLU-devel freeglut-devel ############Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6




###ptex-2.4.0
https://github.com/wdas/ptex/releases


tar zxvf ptex-2.4.0.tar.gz
mkdir /xmlgrg/517/src/ptex-2.4.0/617cd /xmlgrg/517/src/ptex-2.4.0/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6
####warning: Tag 'COLS_IN_ALPHA_INDEX' at line 632 of file 'Doxyfile' has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"#####




####GLFWhttps://github.com/glfw/glfw/releases
tar zxvf glfw-3.3.4.tar.gz
mkdir /xmlgrg/517/src/glfw-3.3.4/617cd /xmlgrg/517/src/glfw-3.3.4/617
yum -y install libXinerama* libXcursor* libXi* libXinerama* libXrandr*
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..cmake --build . --config Release --target install -- -j6


###OpenSubdiv-3_4_3https://github.com/PixarAnimationStudios/OpenSubdiv/tags
unzip v3_4_3.zip
mkdir /xmlgrg/517/src/OpenSubdiv-3_4_3/617cd /xmlgrg/517/src/OpenSubdiv-3_4_3/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DNO_EXAMPLES=ON -DNO_TUTORIALS=ON -DNO_REGRESSION=ON -DNO_DOC=ON -DNO_OMP=ON -DNO_CUDA=ON -DNO_OPENCL=ON -DNO_DX=ON -DNO_TESTS=ON -DNO_GLEW=ON -DNO_GLFW=ON -DNO_TBB=ON ..
cmake --build . --config Release --target install -- -j6




###openGL 可以编译安装?https://www.nvidia.com/en-us/drivers/unix/
#yum -y install mesa* freeglut* *GLEW* yum安装openGL








###c-blosc-1.17.0https://github.com/Blosc/c-blosc/releases
unzip v1.17.0.zip
mkdir /xmlgrg/517/src/c-blosc-1.17.0/617
cd /xmlgrg/517/src/c-blosc-1.17.0/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6





###tiff-4.2.0
http://download.osgeo.org/libtiff/
tar zxvf tiff-4.2.0.tar.gz
mkdir /xmlgrg/517/src/tiff-4.2.0/617 cd /xmlgrg/517/src/tiff-4.2.0/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..#########-- Could NOT find LibLZMA (missing: LIBLZMA_LIBRARY LIBLZMA_INCLUDE_DIR LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET)
cmake --build . --config Release --target install -- -j6




####libpng-1.6.37https://github.com/glennrp/libpng/tags

tar zxvf libpng-1.6.37.tar.gz
mkdir /xmlgrg/517/src/libpng-1.6.37/617cd /xmlgrg/517/src/libpng-1.6.37/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6





#####expathttps://github.com/libexpat/libexpat/releases
tar zxvf expat-2.4.0.tar.gz
mkdir /xmlgrg/517/src/expat-2.4.0/617cd /xmlgrg/517/src/expat-2.4.0/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6

yum -y install git






#pybind11https://github.com/pybind/pybind11/releases
tar zxvf pybind11-2.6.2.tar.gz
mkdir /xmlgrg/517/src/pybind11-2.6.2/617cd /xmlgrg/517/src/pybind11-2.6.2/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DDOWNLOAD_CATCH=ON ..
#################提示信息-- Catch not detected. Interpreter tests will be skipped. Install Catch headers manually or use `cmake -DDOWNLOAD_CATCH=ON` to fetch them automatically.################
cmake --build . --config Release --target install -- -j6


####OpenColorIO-1.1.1
https://github.com/AcademySoftwareFoundation/OpenColorIO/releases #################OpenColorIO最新版2.X 需要oiio的支持呢

tar zxvf OpenColorIO-1.1.1.tar.gz

mkdir /xmlgrg/517/src/OpenColorIO-1.1.1/617cd /xmlgrg/517/src/OpenColorIO-1.1.1/617

yum -y install patch

cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DOCIO_BUILD_TRUELIGHT=OFF -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF -DOCIO_BUILD_JNIGLUE=OFF -DOCIO_STATIC_JNIGLUE=OFF -DCMAKE_CXX_FLAGS=-w ..

cmake --build . --config Release --target install -- -j6






######openvdbtar zxvf openvdb-7.2.3.tar.gz
mkdir /xmlgrg/517/src/openvdb-7.2.3/617cd /xmlgrg/517/src/openvdb-7.2.3/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517/" -DCMAKE_BUILD_TYPE=Release -DOPENVDB_BUILD_PYTHON_MODULE=OFF -DOPENVDB_BUILD_BINARIES=OFF -DOPENVDB_BUILD_UNITTESTS=OFF -DBLOSC_ROOT="/xmlgrg/517" -DBOOST_ROOT="/xmlgrg/517/" -DBOOST_LIBRARYDIR="/xmlgrg/517/lib64" -DTBB_ROOT="/xmlgrg/517" -DTbb_INCLUDE_DIR="/xmlgrg/517/" -DILMBASE_ROOT="/xmlgrg/517" ..

cmake --build . --config Release --target install -- -j6


###以下是为了编译oiio做的准备 ##### 先安装z3Could NOT find Z3
wget https://github.com/Z3Prover/z3/archive/refs/tags/z3-4.8.6.tar.gz
tar zxvf z3-z3-4.8.6.tar.gzmkdir /xmlgrg/517/src/z3-z3-4.8.6/617cd /xmlgrg/517/src/z3-z3-4.8.6/617
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6




############clang-format https://github.com/llvm/llvm-project/releases/tag/https://apt.llvm.org/

https://blog.csdn.net/sixdaycoder/article/details/84632129
将llvm移到文件夹中,将clang移到llvm/tool文件夹下。

tar -Jxvf llvm-11.0.0.src.tar.xztar -Jxvf clang-11.0.0.src.tar.xz
# mv clang-11.0.0.src clang llvm文件的同级目录下,修改clang的文件名称
# cp -R /xmlgrg/517/src/clang /xmlgrg/517/src/llvm-11.0.0.src/tools/ #复制clang到llvm的tools目录下# ll | grep clangdrwxr-xr-x. 15 root root 4096 6月 21 15:02 clang

mkdir /xmlgrg/517/src/llvm-11.0.0.src/617cd /xmlgrg/517/src/llvm-11.0.0.src/617

yum install libxml2 libxml2-devel -y
yum -y install gperf
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release --enable-optimized -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_ASSERTIONS=On ..
cmake --build . --config Release --target install -- -j6



# /xmlgrg/517/bin/clang --versionclang version 11.0.0Target: x86_64-unknown-linux-gnuThread model: posixInstalledDir: /xmlgrg/517/bin

sudo ln -s -f /xmlgrg/517/bin/clang /usr/bin/clang



###########JPEGTurbo_ROOT
wget https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.0.4.tar.gz

# tar -zxvf 2.0.4.tar.gz
mkdir /xmlgrg/517/src/libjpeg-turbo-2.0.4/617cd /xmlgrg/517/src/libjpeg-turbo-2.0.4/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..
cmake --build . --config Release --target install -- -j6


############# freetype#https://github.com/google/brotli
tar zxvf brotli-1.0.9.tar.gz
mkdir /xmlgrg/517/src/brotli-1.0.9/617 cd /xmlgrg/517/src/brotli-1.0.9/617 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/xmlgrg/517/ .. cmake --build . --config Release --target install -- -j6

wget https://udomain.dl.sourceforge.net/project/freetype/freetype2/2.10.4/freetype-2.10.4.tar.gz

tar zxvf freetype-2.10.4.tar.gz
####-DBUILD_SHARED_LIBS=true 开启动态链接库信息
yum -y install harfbuzz-devel harfbuzz
mkdir /xmlgrg/517/src/freetype-2.10.4/617cd /xmlgrg/517/src/freetype-2.10.4/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=true -DCMAKE_C_FLAGS=-fPIC ..
cmake --build . --config Release --target install -- -j6

##################/usr/bin/ld: /xmlgrg/517/lib64/libfreetype.a(ftbase.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC##################

报错了不过服务器上已经有安装了# rpm -qa | grep freetype
freetype-2.8-14.el7_9.1.x86_64freetype-devel-2.8-14.el7_9.1.x86_64




# OpenJpeg
# yum -y install lcms2* lcms2
wget https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.3.1.tar.gz
tar zxvf openjpeg-2.3.1.tar.gz
mkdir /xmlgrg/517/src/openjpeg-2.3.1/617cd /xmlgrg/517/src/openjpeg-2.3.1/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_INCLUDE_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6



######libiconv
http://www.gnu.org/software/libiconv/#TOCdownloading tar zxvf libiconv-1.16.tar.gz
cd libiconv-1.16/./configure --prefix=/xmlgrg/517 make -j6make install


########libsndfiletar zxvf libsndfile-1.0.30.tar.gzmkdir /xmlgrg/517/src/libsndfile-1.0.30/617cd /xmlgrg/517/src/libsndfile-1.0.30/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=true -DCMAKE_C_FLAGS=-fPIC ..
cmake --build . --config Release --target install -- -j6


############dcmtk-DCMTKhttps://github.com/DCMTK/dcmtk/blob/master/INSTALL
wget https://github.com/DCMTK/dcmtk/archive/refs/tags/DCMTK-3.6.5.tar.gz
# tar zxvf dcmtk-DCMTK-3.6.5.tar.gz
mkdir /xmlgrg/517/src/dcmtk-DCMTK-3.6.5/617
cd /xmlgrg/517/src/dcmtk-DCMTK-3.6.5/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DOPENJPEG_INCLUDE_DIR="/xmlgrg/517" -DDCMTK_WITH_WRAP:BOOL=FALSE -DBUILD_SHARED_LIBS=ON ..
cmake --build . --config Release --target install -- -j6


#####FFmpeg

https://github.com/FFmpeg
tar zxvf ffmpeg-4.2.2.tar.gz
# yum install -y epel-release# yum -y install yasm (nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.)
# cd ffmpeg-4.2.2
./configure --prefix=/xmlgrg/517/ --enable-shared --extra-cflags=-fPIC
# --extra-cflags=-fPIC 为了解决报错(/usr/bin/ld: /xmlgrg/517/lib/libavcodec.a(allcodecs.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC)
make -j6
make install

# /xmlgrg/517/bin/ffmpeg -versionffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developersbuilt with gcc 7 (GCC)configuration: --prefix=/xmlgrg/517/ --enable-shared --extra-cflags=-fPIClibavutil 56. 31.100 / 56. 31.100libavcodec 58. 54.100 / 58. 54.100libavformat 58. 29.100 / 58. 29.100libavdevice 58. 8.100 / 58. 8.100libavfilter 7. 57.100 / 7. 57.100libswscale 5. 5.100 / 5. 5.100libswresample 3. 5.100 / 3. 5.100


##########OpenBLAS
https://github.com/xianyi/OpenBLAS
tar zxvf OpenBLAS-0.3.13.tar.gz
mkdir /xmlgrg/517/src/OpenBLAS-0.3.13/617cd /xmlgrg/517/src/OpenBLAS-0.3.13/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..
cmake --build . --config Release --target install -- -j6



###opencv

https://github.com/opencv/opencv/tagshttps://github.com/opencv/opencv_3rdparty/tree/ippicv/master_20191018/ippicv

tar zxvf opencv-3.4.12.tar.gz
mkdir /xmlgrg/517/src/opencv-3.4.12/617cd /xmlgrg/517/src/opencv-3.4.12/617
cat /xmlgrg/517/src/opencv-3.4.12/3rdparty/ippicv/ippicv.cmake# 注销原来的连接,把需要的文件放在目录下/xmlgrg/517/src/opencv-3.4.12/3rdparty/ippicv/ 目录下 ippicv_2020_lnx_intel64_20191018_general.tgz# 注意tgz的文件名

#"https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/""file:/xmlgrg/517/src/opencv-3.4.12/3rdparty/ippicv/"


cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DWITH_TBB=1 -DWITH_PNG=1 -DWITH_TIFF=1 -DWITH_JPEG=1 -DWITH_JASPER=1 -DBUILD_SHARED_LIBS=1 -DOpenBLAS_ROOT="/xmlgrg/517" -DBLAS_LIBRARIES="/xmlgrg/517/lib64/" ..
cmake --build . --config Release --target install -- -j6

 


###Field3Dhttps://github.com/imageworks/Field3D/issues/99 报错
https://www.hdfgroup.org/2020/03/release-of-hdf5-1-12-0-newsletter-172 解决方法之一
https://www.hdfgroup.org/2020/03/release-of-hdf5-1-12-0-newsletter-172

wget https://github.com/imageworks/Field3D/archive/refs/tags/v1.7.3.tar.gz tar zxvf Field3D-1.7.3.tar.gz
mkdir /xmlgrg/517/src/Field3D-1.7.3/617cd /xmlgrg/517/src/Field3D-1.7.3/617

# cat /xmlgrg/517/src/Field3D-1.7.3/CMakeLists.txt
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
add_compile_options(-DH5_USE_110_API=1) #添加这一行,解决和hdf5的报错



cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DBUILD_SHARED_LIBS=ON ..
cmake --build . --config Release --target install -- -j6










####libheif
wget https://github.com.cnpmjs.org/strukturag/libheif/archive/refs/tags/v1.10.0.tar.gz

# yum -y install libheif-devel libjpeg-devel libpng-devel 先不安装
##CMakeLists.txt 解压后含有这文本的就可以使用cmake编译安装
tar zxvf libheif-1.10.0.tar.gz
mkdir /xmlgrg/517/src/libheif-1.10.0/617cd /xmlgrg/517/src/libheif-1.10.0/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_INCLUDE_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6

还有好好几个是not found的、我没处理






###automake 1.15
wget https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
tar -xzvf automake-1.15.tar.gz
yum -y install autoconf
cd automake-1.15./configure --prefix=/xmlgrg/517


解决方法:修改Makefile源代码: Makefile[...省略]
3684 doc/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm3685 $(update_mans) aclocal-$(APIVERSION)3686 doc/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm3687 $(update_mans) automake-$(APIVERSION) --no-discard-stderr #添加这个--no-discard-stderr
[...省略]



make -j6sudo make install

ln -s /xmlgrg/517/bin/aclocal-1.15 /usr/bin/aclocal-1.15
ln -s /xmlgrg/517/bin/automake-1.15 /usr/bin/automake-1.15






#########LibRaw

https://www.libraw.org/download
yum -y install libjpeg-devel zlib-devel openjpeg-devel libjasper-devel # 这个可以先不用安装的
yum -y install libtool (libtool,这个会自动安装gcc4.8)




yum -y install libtool yum -y install libjasper libjasper-devel
tar zxvf LibRaw-0.20.2.tar.gzcd /xmlgrg/517/src/LibRaw-0.20.2
autoreconf --install ##重新生成configure文件
./configure --prefix=/xmlgrg/517/ --enable-jpeg --enable-lcms --enable-shared CFLAGS=-fPICmake -j6make install
############################## cd . && /bin/sh /xmlgrg/517/src/LibRaw-0.20.2/missing automake-1.15 --foreignconfigure.ac:16: error: possibly undefined macro: AC_SUBST If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation.configure.ac:41: error: possibly undefined macro: AC_MSG_WARN##############################

#########Webp https://github.com/webmproject/libwebp
wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.0.tar.gz
tar zxvf libwebp-1.2.0.tar.gz mkdir /xmlgrg/517/src/libwebp-1.2.0/617cd /xmlgrg/517/src/libwebp-1.2.0/617
yum -y install giflib giflib-devel SDL-devel


cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS=-fPIC -DCMAKE_INCLUDE_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6







############Libsquish https://sourceforge.net/projects/libsquish/files/
wget https://nchc.dl.sourceforge.net/project/libsquish/libsquish-1.15.tgz

mkdir libsquish
tar zxvf libsquish-1.15.tgz -C libsquish/
cd libsquish/llmkdir /xmlgrg/517/src/libsquish/617cd /xmlgrg/517/src/libsquish/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6



nuke和qt5 公司的机器上应该有安装,我这是在自己的的虚拟机上安装的
###nuke# ll | grep *Nuke*-rw-r--r--. 1 root root 3531474965 6月 18 16:17 Nuke-13.0v2-linux-x86-64-installer.run


chmod +x Nuke-13.0v2-linux-x86-64-installer.run
./Nuke-13.0v2-linux-x86-64-installer.run
/xmlgrg/517/src/Nuke13.0v2 这个是安装的目录






USD-21.05 需要qt5.15的版本 下载qt-everywhere-src-5.15.2.tar.xz
https://download.qt.io/archive/qt/5.15/5.15.2/single/

所以使用源码安装一下,试试看
# yum -y install nss libxcb libxcb-devel libX11-devel mesa-libGLU-devel mesa-libGLU libXrender-devel libXi-devel libxkbcommon-devel libxkbcommon-x11-devel dbus-devel dbus
# yum -y install xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel mesa-libGL-devel

tar -Jxvf qt-everywhere-src-5.15.2.tar.xz
# cd qt-everywhere-src-5.15.2/


#这个是误操作,不用操作#################################################################################################################################这里有一个问题,就是,qt5源码的作者是在win下编写的代码,需要修改configure、qtbase/configure####### 报错信息# ./configure bash: ./configure: /bin/sh^M: 坏的解释器: 没有那个文件或目录#######

# cat -A configure可以看到代码结尾全是^M$符号# cat -A qtbase/configure
注意configure第一行也需要修改#!/bin/sh
第一方法:sed -i 's/\r$//' configuresed -i 's/\r$//' qtbase/configure
第二方法:在执行脚本时,弹出错误提示:/bin/sh^M:损坏的解释器: 没有那个文件或目录这是由于脚本文件在保存时使用了DOS文件格式造成的,可以用vim打开文件,然后执行下列操作::set ff=unix:wq

5.15之前的版本./configure --prefix=/xmlgrg/517 -Release -opensource -confirm-license -nomake tests -no-openssl -qt-xcb -xcb -xcb-xlib -bundled-xcb-input -skip qtquickcontrols -skip qtquickcontrols2 -skip qtsensors -skip qtdoc -no-compile-examples -nomake tests#################################################################################################################################

https://forum.qt.io/topic/115827/build-on-linux-qt-xcb-option-qt-xcb 参数在5.15版本中已经被删除了,上面是连接
./configure --prefix=/xmlgrg/517 -Release -opensource -confirm-license -nomake tests -no-openssl -skip qtquickcontrols -skip qtquickcontrols2 -skip qtsensors -skip qtdoc -no-compile-examples -nomake tests


./configure --prefix=/xmlgrg/518 -Release -opensource -confirm-license -nomake tests -no-openssl -skip qtquickcontrols -skip qtquickcontrols2 -skip qtsensors -skip qtdoc -no-compile-examples -nomake tests
make -j6make install




####################################这个不执行了 start#######################################qt5的安装,这个比较麻烦,按照官网的说法,一直失败
chmod +x qt-opensource-linux-x64-5.13.2.run ./qt-opensource-linux-x64-5.13.2.run
如果没有账号,可以关闭网卡,在进行安装,就会自动跳过了
输入账号密码除了安卓的选项不要,其它的都勾选上
mkdir /xmlgrg/517/qt5 这个是安装的目录
安装成功后验证yum -y install dbus-devel dbus

ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed.
# cd /xmlgrg/517/qt5/5.13.2/gcc_64/bin# export QT_DEBUG_PLUGINS=1 这个参数是开启qt的debug功能,查看具体的报错信息#./designer
######unset QT_DEBUG_PLUGINSenv
export LLVM_INSTALL_DIR=/xmlgrg/517
yum -y install libxkbcommon-x11 libxkbcommon-x11-devel
sudo yum install nss -y 可能不是必须要安装的

cd /xmlgrg/517/qt5/5.13.2/Src
##############./configure --prefix=/xmlgrg/517 -Release -opensource -confirm-license -nomake tests -no-openssl -no-opengl -qt-xcb -skip qtquickcontrols -skip qtquickcontrols2 -skip qtsensors -skip qtdoc -no-compile-examples -nomake tests##############

./configure --prefix=/xmlgrg/517 -Release -opensource -confirm-license -nomake tests -no-openssl -qt-xcb -skip qtquickcontrols -skip qtquickcontrols2 -skip qtsensors -skip qtdoc -no-compile-examples -nomake tests
make -j6make install

报错,解决方法#######ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed.
# yum -y install libxcb libxcb-devel libX11-devel mesa-libGLU-devel mesa-libGLU libXrender-devel libXi-devel libxkbcommon-devel libxkbcommon-x11-devel


####################################这个不执行了 end####################################



##########pugixml 1.11tar zxvf pugixml-1.11.tar.gzcd pugixml-1.11
mkdir 617cd 617sudo cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6




#################giflib 5.2 升级为5.2https://linuxfromscratch.org/blfs/view/svn/general/giflib.html
tar zxvf giflib-5.2.1.tar.gzcd giflib-5.2.1/

make PREFIX=/usr install &&rm -fv /usr/lib/libgif.a &&find doc \( -name Makefile\* -o -name \*.1 \ -o -name \*.xml \) -exec rm -v {} \; &&install -v -dm755 /usr/share/doc/giflib-5.2.1 &&cp -v -R doc/* /usr/share/doc/giflib-5.2.1



############oiio-Release-2

tar oiio-2.2.10.0.tar.gz mkdir /xmlgrg/517/src/oiio-2.2.10.0/617 cd /xmlgrg/517/src/oiio-2.2.10.0/617
cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DOIIO_BUILD_TOOLS=OFF -DOIIO_BUILD_TESTS=OFF -DUSE_PYTHON=OFF -DSTOP_ON_WARNING=OFF -DOpenVDB_ROOT="/xmlgrg/517" -DLibheif_ROOT="/xmlgrg/517" -DTIFF_ROOT="/xmlgrg/517" -DOpenEXR_ROOT="/xmlgrg/517" -DLibsquish_ROOT="/xmlgrg/517" -DTBB_ROOT="/xmlgrg/517" -DDCMTK_ROOT="/xmlgrg/517" -DField3D_ROOT="/xmlgrg/517" -DPTex_ROOT="/xmlgrg/517" -DFFmpeg_ROOT="/xmlgrg/517" -DOpenCV_ROOT="/xmlgrg/517" -DHDF5_ROOT="/xmlgrg/517" -DOpenColorIO_ROOT="/xmlgrg/517" -DOpenJpeg_ROOT="/xmlgrg/517" -DBoost_NO_BOOST_CMAKE=On -DBoost_NO_SYSTEM_PATHS=True -DQt5_ROOT="/xmlgrg/517" -DNuke_ROOT="/xmlgrg/517/src/Nuke13.0v2" ..

cmake --build . --config Release --target install -- -j6






http://blog.chinaunix.net/uid-20564848-id-73909.html





####graphviz-2.47.2
https://graphviz.org/download/source/源包对于您想要或需要从源代码构建的大多数情况,您应该下载下面链接的源包之一。它们包含所有必需的生成文件。典型的安装过程是:
tar zxvf graphviz-2.47.2.tar.gzcd graphviz-2.47.2/
./configure --prefix=/xmlgrg/517make -j6make install ## 全是报错、可能有一些必备的依赖没安装

- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf'



##########glew unzip glew-2.1.0.zip cd glew-2.1.0make GLEW_DEST="/xmlgrg/517" -j4 install


##########embree 会报错,放弃
tar zxvf embree-3.12.0.tar.gzcd /xmlgrg/517/src/embree-3.12.0/617
sudo cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target install -- -j6


########vulkansdk-linux-x86_64-1.2.176.1.tar.gz





https://github.com/PixarAnimationStudios/USD/blob/release/VERSIONS.md
# tar zxvf USD-21.05.tar.gz

mkdir /xmlgrg/517/src/USD-21.05/617cd /xmlgrg/517/src/USD-21.05/617

需要一些py的模块yum install -y epel-releaseyum install -y python-pip

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple PySide2 网络不稳定的话,下载会报延时,多试几次
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jinja2yum install python-jinja2 -y
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple PyOpenGL

# cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DPXR_ENABLE_PYTHON_SUPPORT=ON -DPYTHON_EXECUTABLE="/usr/bin/python" -DPYTHON_LIBRARY="/usr/lib64/libpython2.7.so" -DPYTHON_INCLUDE_DIR="/usr/include/python2.7" -DBUILD_SHARED_LIBS=ON -DTBB_USE_DEBUG_BUILD=OFF -DPXR_BUILD_DOCUMENTATION=OFF -DPXR_BUILD_TESTS=OFF -DPXR_BUILD_EXAMPLES=ON -DPXR_BUILD_TUTORIALS=ON -DPXR_BUILD_USD_TOOLS=ON -DPXR_BUILD_IMAGING=ON -DPXR_ENABLE_PTEX_SUPPORT=ON -DPXR_ENABLE_OPENVDB_SUPPORT=ON -DPXR_BUILD_EMBREE_PLUGIN=OFF -DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON -DPXR_BUILD_OPENCOLORIO_PLUGIN=ON -DPXR_BUILD_USD_IMAGING=ON -DPXR_BUILD_USDVIEW=ON -DPXR_BUILD_ALEMBIC_PLUGIN=ON -DPXR_ENABLE_HDF5_SUPPORT=ON -DHDF5_ROOT="/xmlgrg/517" -DTBB_ROOT="/xmlgrg/517" -DPXR_BUILD_DRACO_PLUGIN=OFF -DPXR_ENABLE_MATERIALX_SUPPORT=ON -DMATERIALX_ROOT=/xmlgrg/517 -DBoost_NO_BOOST_CMAKE=On -DBoost_NO_SYSTEM_PATHS=True ..

cmake -DCMAKE_INSTALL_PREFIX="/xmlgrg/517" -DCMAKE_PREFIX_PATH="/xmlgrg/517" -DCMAKE_BUILD_TYPE=Release -DPXR_ENABLE_PYTHON_SUPPORT=ON -DPYTHON_EXECUTABLE="/usr/bin/python" -DPYTHON_LIBRARY="/usr/lib64/libpython2.7.so" -DPYTHON_INCLUDE_DIR="/usr/include/python2.7" -DBUILD_SHARED_LIBS=ON -DTBB_USE_DEBUG_BUILD=OFF -DPXR_BUILD_DOCUMENTATION=OFF -DPXR_BUILD_TESTS=OFF -DPXR_BUILD_EXAMPLES=ON -DPXR_BUILD_TUTORIALS=ON -DPXR_BUILD_USD_TOOLS=ON -DPXR_BUILD_IMAGING=ON -DPXR_ENABLE_PTEX_SUPPORT=ON -DPXR_ENABLE_OPENVDB_SUPPORT=ON -DPXR_BUILD_EMBREE_PLUGIN=OFF -DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON -DPXR_BUILD_OPENCOLORIO_PLUGIN=ON -DPXR_BUILD_USD_IMAGING=ON -DPXR_BUILD_USDVIEW=ON -DPXR_BUILD_ALEMBIC_PLUGIN=ON -DPXR_ENABLE_HDF5_SUPPORT=ON -DHDF5_ROOT="/xmlgrg/517" -DTBB_ROOT="/xmlgrg/517" -DPXR_BUILD_DRACO_PLUGIN=OFF -DPXR_BUILD_MATERIALX_PLUGIN=ON -DBoost_NO_BOOST_CMAKE=On -DBoost_NO_SYSTEM_PATHS=True ..


cmake --build . --config Release --target install -- -j6





以上是关于centos上cmake编译一些的主要内容,如果未能解决你的问题,请参考以下文章

Centos 6下使用cmake编译安装MariaDB

CentOS6.7通过cmake编译安装mysql5.5.32

Centos 6.9 编译安装cmake 3.10.2

CentOS 下安装 Cmake 步骤

在CentOS7.4上手动编译安装Mysql-5.7.20

如何在centos7中安装cmake