与python3.6.so链接时生成Paraview错误

时间:2018-06-21 12:09:41

标签: c++ linux python-3.x cmake paraview

尊敬的stackoverflow用户

尝试使用python支持编译paraview 5.5时遇到了一些问题。 我的构建命令如下:

cmake \
-D CMAKE_INSTALL_PREFIX:PATH=/home/pablo/BuildParaview2/paraview \
-D BUILD_SHARED_LIBS:BOOL=OFF \
-D BUILD_TESTING:BOOL=ON \
-D PARAVIEW_USE_MPI:BOOL=ON \
-D CMAKE_BUILD_TYPE:STRING=Debug \
-D PARAVIEW_BUILD_QT_GUI:BOOL=ON \
-D CMAKE_CXX_FLAGS:STRING="-O0 -Wall -std=c++11 -pedantic -Wno-long-long -Wno-deprecated-declarations -lz" \
-D PARAVIEW_ENABLE_CATALYST:BOOL=ON \
-D CMAKE_PREFIX_PATH:PATH="/usr/local/Qt-5.7.1/lib/cmake/" \
-D Qt5_DIR:PATH="/usr/local/Qt-5.7.1/bin/" \
-D PARAVIEW_ENABLE_FFMPEG:BOOL=ON \
-D FFMPEG_LIBAVCODEC_INCLUDE_DIRS:PATH="/home/pablo/ffmpeg_build/include/libavcodec/" \
-D FFMPEG_LIBAVCODEC_LIBRARIES:PATH="/home/pablo/ffmpeg_build/lib/libavcodec.a" \
-D FFMPEG_LIBAVDEVICE_INCLUDE_DIR:PATH="/home/pablo/ffmpeg_build/include/libavdevice/" \
-D FFMPEG_LIBAVDEVICE_LIBRARIES:PATH="/home/pablo/ffmpeg_build/lib/libavdevice.a" \
-D FFMPEG_LIBAVFORMAT_INCLUDE_DIR:PATH="/home/pablo/ffmpeg_build/include/libavformat/" \
-D FFMPEG_LIBAVFORMAT_LIBRARIES:PATH="/home/pablo/ffmpeg_build/lib/libavformat.a/" \
-D FFMPEG_LIBAVUTIL_INCLUDE_DIRS:PATH="/home/pablo/ffmpeg_build/include/libavutil/" \
-D FFMPEG_LIBAVUTIL_LIBRARIES:PATH="/home/pablo/ffmpeg_build/lib/libavutil.a/" \
-D FFMPEG_LIBSWSCALE_INCLUDE_DIRS:PATH="/home/pablo/ffmpeg_build/include/libswscale/" \
-D FFMPEG_LIBSWSCALE_LIBRARIES:PATH="/home/pablo/ffmpeg_build/lib/libswscale.a/" \
-D FFMPEG_ROOT:PATH="/home/pablo/ffmpeg_build" \
-D PARAVIEW_ENABLE_PYTHON:BOOL=ON \
-D USE_SYSTEM_python:BOOL=ON \
-D PYTHON_LIBRARY:PATH="/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so" \
-D PYTHON_INCLUDE_DIR:PATH="/usr/include/python3.6" \
-D PYTHON_EXECUTABLE:PATH="/usr/bin/python3.6" \
../ParaView-v5.5.0 
make
make install

过去,我能够在没有python支持的情况下进行编译。这次我只添加python和ffmpeg。我曾尝试使用python 2.7.12或3.6.5,但始终收到以下错误: 第一个python版本附带了ubuntu 16.04原始存储库,在第二个版本中,我不得不添加一个“ snake”存储库... 请帮助我找出如何修复此部分。

谢谢!

[ 95%] Built target mpi4py.MPI
[ 95%] Built target mpi4py.dl
[ 95%] Built target pmpi-mpe
[ 95%] Built target pmpi-vt
[ 95%] Built target pmpi-vt-mpi
[ 95%] Built target pmpi-vt-hyb
[ 95%] Built target vtkLegacyColorMapXMLToJSON
[ 95%] Linking CXX executable ../../../../bin/pqPipelineApp
/usr/bin/ld: /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so: undefined reference to symbol 'inflateInit2_'    
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libz.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status Qt/Components/Testing/Cxx/CMakeFiles/pqPipelineApp.dir/build.make:597: recipe for target 'bin/pqPipelineApp' failed
make[2]: *** [bin/pqPipelineApp] Error 1
CMakeFiles/Makefile2:26099: recipe for target 'Qt/Components/Testing/Cxx/CMakeFiles/pqPipelineApp.dir/all' failed
make[1]: *** [Qt/Components/Testing/Cxx/CMakeFiles/pqPipelineApp.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

0 个答案:

没有答案