使用CMake和Python库链接问题

时间:2016-04-05 18:54:24

标签: python cmake paraview

使用最新的Superbuild从我的VM(主机windows7 guest Ubuntu 14.04.4 LTS)中的源代码构建Paraview

我设法编译程序没有任何问题,但是,在Anconda paraview.simple中导入Python 2.7.11时,我遇到错误undefined symbol: PyUnicodeUCS2*。当我使用Paraview superbuild中编译的pvpython时,也使用Python 2.7.11,我没有任何问题,可以毫无问题地导入paraview.simple。仅查看后者的sys.maxunicode>65535输出False,这意味着我的Anaconda python正在使用UCS4,而已编译的链接python库正在使用UC2。

阅读旧线程和文档,人们编辑了CMAKE选项o指向正确的库但这些变量没有显示在我的CMakeCache.txt中,我在下面包括完整性:

//Enable shared libraries BUILD_SHARED_LIBS:BOOL=OFF

//Build the testing tree. BUILD_TESTING:BOOL=ON

//Enable to package prebuilt mesa binaries BUNDLE_PREBUILT_MESA_BINARIES:BOOL=OFF

//Path to a program. BZRCOMMAND:FILEPATH=BZRCOMMAND-NOTFOUND

//The catalyst edition to build CATALYST_EDITION:STRING=Essentials

//Enable Python support in catalyst CATALYST_PYTHON:BOOL=ON

//Path to a program. CMAKE_AR:FILEPATH=/usr/bin/ar

//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. CMAKE_BUILD_TYPE:STRING=

//Enable/Disable color output during build. CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++

//Flags used by the compiler during all build types. CMAKE_CXX_FLAGS:STRING=

//Flags used by the compiler during debug builds. CMAKE_CXX_FLAGS_DEBUG:STRING=-g

//Flags used by the compiler during release builds for minimum // size. CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the compiler during release builds. CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the compiler during release builds with debug info. CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//C compiler CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc

//Flags used by the compiler during all build types. CMAKE_C_FLAGS:STRING=

//Flags used by the compiler during debug builds. CMAKE_C_FLAGS_DEBUG:STRING=-g

//Flags used by the compiler during release builds for minimum // size. CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the compiler during release builds. CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the compiler during release builds with debug info. CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//Flags used by the linker. CMAKE_EXE_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds. CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds. CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds. CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds. CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Enable/Disable output of compile commands during generation. CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF

//Fortran compiler CMAKE_Fortran_COMPILER:FILEPATH=NOTFOUND

//Fortran flags CMAKE_Fortran_FLAGS:STRING=

//Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=/home/paraview

//Path to a program. CMAKE_LINKER:FILEPATH=/usr/bin/ld

//Path to a program. CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make

//Flags used by the linker during the creation of modules. CMAKE_MODULE_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds. CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds. CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds. CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds. CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program. CMAKE_NM:FILEPATH=/usr/bin/nm

//Path to a program. CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy

//Path to a program. CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump

//Value Computed by CMake CMAKE_PROJECT_NAME:STATIC=ParaViewSuperBuild

//Path to a program. CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib

//Flags used by the linker during the creation of dll's. CMAKE_SHARED_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds. CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds. CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds. CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds. CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If set, runtime paths are not added when installing shared libraries, // but are added when building. CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

//If set, runtime paths are not added when using shared libraries. CMAKE_SKIP_RPATH:BOOL=NO

//Flags used by the linker during the creation of static libraries. CMAKE_STATIC_LINKER_FLAGS:STRING=

//Flags used by the linker during debug builds. CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during release minsize builds. CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during release builds. CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during Release with Debug Info builds. CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program. CMAKE_STRIP:FILEPATH=/usr/bin/strip

//If this value is on, makefiles will be generated without the // .SILENT directive, and all commands will be echoed to the console // during the make.  This is useful for debugging only. With Visual // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

//Path to the coverage program that CTest uses for performing coverage // inspection COVERAGE_COMMAND:FILEPATH=/usr/bin/gcov

//Extra command line flags to pass to the coverage tool COVERAGE_EXTRA_FLAGS:STRING=-l

//Enable to build Debian packages CPACK_BINARY_DEB:BOOL=OFF

//Enable to build IFW packages CPACK_BINARY_IFW:BOOL=OFF

//Enable to build NSIS packages CPACK_BINARY_NSIS:BOOL=OFF

//Enable to build RPM packages CPACK_BINARY_RPM:BOOL=OFF

//Enable to build STGZ packages CPACK_BINARY_STGZ:BOOL=ON

//Enable to build TBZ2 packages CPACK_BINARY_TBZ2:BOOL=OFF

//Enable to build TGZ packages CPACK_BINARY_TGZ:BOOL=ON

//Enable to build TXZ packages CPACK_BINARY_TXZ:BOOL=OFF

//Enable to build TZ packages CPACK_BINARY_TZ:BOOL=ON

//Enable to build TBZ2 source packages CPACK_SOURCE_TBZ2:BOOL=ON

//Enable to build TGZ source packages CPACK_SOURCE_TGZ:BOOL=ON

//Enable to build TXZ source packages CPACK_SOURCE_TXZ:BOOL=ON

//Enable to build TZ source packages CPACK_SOURCE_TZ:BOOL=ON

//Enable to build ZIP source packages CPACK_SOURCE_ZIP:BOOL=OFF

//Cross compilation stage: either HOST(ie no crosscompile)|TOOLS|CROSS CROSS_BUILD_STAGE:STRING=HOST

//How many times to retry timed-out CTest submissions. CTEST_SUBMIT_RETRY_COUNT:STRING=3

//How long to wait between timed-out CTest submissions. CTEST_SUBMIT_RETRY_DELAY:STRING=5

//Path to a program. CVSCOMMAND:FILEPATH=CVSCOMMAND-NOTFOUND

//Options passed to the cvs update command. CVS_UPDATE_OPTIONS:STRING=-d -A -P

//Maximum time allowed before CTest will kill the test. DART_TESTING_TIMEOUT:STRING=1500

//Request to build project adios ENABLE_adios:BOOL=OFF

//Request to build project boost ENABLE_boost:BOOL=OFF

//Request to build project catalyst ENABLE_catalyst:BOOL=OFF

//Request to build project cgns ENABLE_cgns:BOOL=OFF

//Request to build project egl ENABLE_egl:BOOL=OFF

//Request to build project ffmpeg ENABLE_ffmpeg:BOOL=OFF

//Request to build project fontconfig ENABLE_fontconfig:BOOL=OFF

//Request to build project freetype ENABLE_freetype:BOOL=OFF

//Request to build project hdf5 ENABLE_hdf5:BOOL=OFF

//Request to build project ispc ENABLE_ispc:BOOL=OFF

//Request to build project libxml2 ENABLE_libxml2:BOOL=OFF

//Request to build project manta ENABLE_manta:BOOL=OFF

//Request to build project matplotlib ENABLE_matplotlib:BOOL=OFF

//Request to build project mesa ENABLE_mesa:BOOL=OFF

//Request to build project mpi ENABLE_mpi:BOOL=OFF

//Request to build project mxml ENABLE_mxml:BOOL=OFF

//Request to build project netcdf ENABLE_netcdf:BOOL=OFF

//Request to build project numpy ENABLE_numpy:BOOL=OFF

//Request to build project osmesa ENABLE_osmesa:BOOL=OFF

//Request to build project ospray ENABLE_ospray:BOOL=OFF

//Request to build project paraview ENABLE_paraview:BOOL=ON

//Request to build project paraviewsdk ENABLE_paraviewsdk:BOOL=OFF

//Request to build project portfwd ENABLE_portfwd:BOOL=OFF

//Request to build project pvospray ENABLE_pvospray:BOOL=OFF

//Request to build project python ENABLE_python:BOOL=ON

//Request to build Qt4. Enable this to build the user interface // with Qt4. ENABLE_qt4:BOOL=OFF

//Request to build Qt5. Enable this to build the user interface // with Qt5. ENABLE_qt5:BOOL=OFF

//Request to build project silo ENABLE_silo:BOOL=OFF

//Request to build project szip ENABLE_szip:BOOL=OFF

//Request to build project tbb ENABLE_tbb:BOOL=OFF

//Request to build project visitbridge ENABLE_visitbridge:BOOL=OFF

//Request to build project vortexfinder2 ENABLE_vortexfinder2:BOOL=OFF

//Request to build project vrpn ENABLE_vrpn:BOOL=OFF

//Request to build project xdmf3 ENABLE_xdmf3:BOOL=OFF

//Path to a program. GITCOMMAND:FILEPATH=/usr/bin/git

//Git command line client GIT_EXECUTABLE:FILEPATH=/usr/bin/git

//Path to a program. HGCOMMAND:FILEPATH=HGCOMMAND-NOTFOUND

//Command to build the project MAKECOMMAND:STRING=/home/roger/cmake-3.5.1-Linux-x86_64/bin/cmake
--build . --config "${CTEST_CONFIGURATION_TYPE}" -- -i

//Path to the memory checking command, used for memory error detection. MEMORYCHECK_COMMAND:FILEPATH=MEMORYCHECK_COMMAND-NOTFOUND

//File that contains suppressions for the memory checker MEMORYCHECK_SUPPRESSIONS_FILE:FILEPATH=

//Target ISA for OSPray (SSE, AVX, AVX2 or ALL). OSPRAY_BUILD_ISA:STRING=AVX

//Path to a program. P4COMMAND:FILEPATH=P4COMMAND-NOTFOUND

//String to use as a suffix for generated packages PACKAGE_SUFFIX:STRING=<default>

//Paraview's build mode PARAVIEW_BUILD_TYPE:STRING=

//Freeze Python packages/modules into the application. PARAVIEW_FREEZE_PYTHON:BOOL=OFF

//GIT_REPOSITORY for project 'paraview' PARAVIEW_GIT_REPOSITORY:STRING=https://gitlab.kitware.com/paraview/paraview.git

//GIT_TAG for project 'paraview' PARAVIEW_GIT_TAG:STRING=master

//Rendering backend to use for ParaView PARAVIEW_RENDERING_BACKEND:STRING=OpenGL

//Specify the version number for the package being generated e.g. //
5.0.1 PARAVIEW_VERSION:STRING=5.0.1

//Pass LD_LIBRARY_PATH to build scripts. PASS_LD_LIBRARY_PATH_FOR_BUILDS:BOOL=ON

//Provide the list of Projects that ParaView should additionally // depends on PV_EXTERNAL_PROJECTS:STRING=

//Extra arguments to be passed to ParaView when configuring. PV_EXTRA_CMAKE_ARGS:STRING=

//Number of make jobs to use for compiling ParaView itself PV_MAKE_NCPUS:STRING=5

//Path to a program. PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2

//Path to a file. PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7

//Path to a library. PYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython2.7.so

//Path to a library. PYTHON_LIBRARY_DEBUG:FILEPATH=PYTHON_LIBRARY_DEBUG-NOTFOUND

//Value Computed by CMake ParaViewSuperBuild_BINARY_DIR:STATIC=/home/roger/paraview

//Value Computed by CMake ParaViewSuperBuild_SOURCE_DIR:STATIC=/home/roger/ParaViewSuperbuild

//If enabled then the repository is fetched from git ParaView_FROM_GIT:BOOL=ON

//Which browser to use during testing, either chrome or firefox REMOTE_PVWEB_TEST_BROWSER:STRING=firefox

//A list of urls against which to run a simple Web Visualizer test. REMOTE_PVWEB_VISUALIZER_URLS:STRING=http://pvw-test.kitware.com/sbtest;http://pvw.kitware.com/sbtest;http://paraviewweb.kitware.com/sbtest

//Path to scp command, used by CTest for submitting results to // a Dart server SCPCOMMAND:FILEPATH=/usr/bin/scp

//Name of the computer/site where compile is being run SITE:STRING=roger-VirtualBox

//Path to the SLURM sbatch executable SLURM_SBATCH_COMMAND:FILEPATH=SLURM_SBATCH_COMMAND-NOTFOUND

//Path to the SLURM srun executable SLURM_SRUN_COMMAND:FILEPATH=SLURM_SRUN_COMMAND-NOTFOUND

//Suppress output for bzip2 SUPPRESS_bzip2_OUTPUT:BOOL=OFF

//Suppress output for paraview SUPPRESS_paraview_OUTPUT:BOOL=OFF

//Suppress output for png SUPPRESS_png_OUTPUT:BOOL=OFF

//Suppress output for python SUPPRESS_python_OUTPUT:BOOL=OFF

//Suppress output for zlib SUPPRESS_zlib_OUTPUT:BOOL=OFF

//Path to a program. SVNCOMMAND:FILEPATH=SVNCOMMAND-NOTFOUND

//When enabled, tests a live instance of ParaViewWeb. TEST_REMOTE_PARAVIEW_WEB:BOOL=OFF

//Trust SVN certificates automatically TRUST_SVN_CERTIFICATES_AUTOMATICALLY:BOOL=ON

//Enable the non-free parts of the superbuild USE_NONFREE_COMPONENTS:BOOL=OFF

//Use system bzip2 USE_SYSTEM_bzip2:BOOL=OFF

USE_SYSTEM_egl:BOOL=TRUE

//Use system png USE_SYSTEM_png:BOOL=OFF

//Use system python USE_SYSTEM_python:BOOL=OFF

//Use system zlib USE_SYSTEM_zlib:BOOL=OFF

//GIT_REPOSITORY for project 'vortexfinder2' VORTEXFINDER2_GIT_REPOSITORY:STRING=https://github.com/tjcorona/vortexfinder2.git

//GIT_TAG for project 'vortexfinder2' VORTEXFINDER2_GIT_TAG:STRING=master

//Location where source tar-balls are (to be) downloaded. download_location:PATH=/home/roger/paraview/downloads

//Extra arguments to be passed to Qt when configuring. qt_EXTRA_CONFIGURATION_OPTIONS:STRING=

//Work around a build issue in Qt. Use this if you see linker errors // with QtHelp and QCLucene. qt_WORK_AROUND_BROKEN_ASSISTANT_BUILD:BOOL=OFF


//MODIFIED property for variable: BUILD_SHARED_LIBS BUILD_SHARED_LIBS-MODIFIED:INTERNAL=ON //ADVANCED property for variable: BUNDLE_PREBUILT_MESA_BINARIES BUNDLE_PREBUILT_MESA_BINARIES-ADVANCED:INTERNAL=1 //ADVANCED property for variable: BZRCOMMAND BZRCOMMAND-ADVANCED:INTERNAL=1 //STRINGS property for variable: CATALYST_EDITION CATALYST_EDITION-STRINGS:INTERNAL=Essentials;Extras;Rendering-Base //ADVANCED property for variable: CMAKE_AR CMAKE_AR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_BUILD_TYPE CMAKE_BUILD_TYPE-ADVANCED:INTERNAL=1 //This is the directory where this CMakeCache.txt was created CMAKE_CACHEFILE_DIR:INTERNAL=/home/roger/paraview //Major version of cmake used to create the current loaded cache CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 //Minor version of cmake used to create the current loaded cache CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 //Patch version of cmake used to create the current loaded cache CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 //Path to CMake executable. CMAKE_COMMAND:INTERNAL=/home/roger/cmake-3.5.1-Linux-x86_64/bin/cmake //Path to cpack program executable. CMAKE_CPACK_COMMAND:INTERNAL=/home/roger/cmake-3.5.1-Linux-x86_64/bin/cpack //ADVANCED property for variable: CMAKE_CTEST_COMMAND CMAKE_CTEST_COMMAND-ADVANCED:INTERNAL=1 //Path to ctest program executable. CMAKE_CTEST_COMMAND:INTERNAL=/home/roger/cmake-3.5.1-Linux-x86_64/bin/ctest //ADVANCED property for variable: CMAKE_CXX_COMPILER CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_COMPILER CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Path to cache edit program executable. CMAKE_EDIT_COMMAND:INTERNAL=/home/roger/cmake-3.5.1-Linux-x86_64/bin/ccmake //Executable file format CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 //Name of external makefile project generator. CMAKE_EXTRA_GENERATOR:INTERNAL= //ADVANCED property for variable: CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_Fortran_FLAGS CMAKE_Fortran_FLAGS-ADVANCED:INTERNAL=1 //Name of generator. CMAKE_GENERATOR:INTERNAL=Unix Makefiles //Name of generator platform. CMAKE_GENERATOR_PLATFORM:INTERNAL= //Name of generator toolset. CMAKE_GENERATOR_TOOLSET:INTERNAL= //Source directory with the top level CMakeLists.txt file for this // project CMAKE_HOME_DIRECTORY:INTERNAL=/home/roger/ParaViewSuperbuild //MODIFIED property for variable: CMAKE_INSTALL_PREFIX CMAKE_INSTALL_PREFIX-MODIFIED:INTERNAL=ON //Install .so files without execute permission. CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 //ADVANCED property for variable: CMAKE_LINKER CMAKE_LINKER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MAKE_PROGRAM CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_NM CMAKE_NM-ADVANCED:INTERNAL=1 //number of local generators CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 //ADVANCED property for variable: CMAKE_OBJCOPY CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_OBJDUMP CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_RANLIB CMAKE_RANLIB-ADVANCED:INTERNAL=1 //Path to CMake installation. CMAKE_ROOT:INTERNAL=/home/roger/cmake-3.5.1-Linux-x86_64/share/cmake-3.5 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_RPATH CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STRIP CMAKE_STRIP-ADVANCED:INTERNAL=1 //uname command CMAKE_UNAME:INTERNAL=/bin/uname //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: COVERAGE_COMMAND COVERAGE_COMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: COVERAGE_EXTRA_FLAGS COVERAGE_EXTRA_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_DEB CPACK_BINARY_DEB-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_IFW CPACK_BINARY_IFW-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_NSIS CPACK_BINARY_NSIS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_RPM CPACK_BINARY_RPM-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_STGZ CPACK_BINARY_STGZ-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_TBZ2 CPACK_BINARY_TBZ2-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_TGZ CPACK_BINARY_TGZ-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_TXZ CPACK_BINARY_TXZ-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_BINARY_TZ CPACK_BINARY_TZ-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_TBZ2 CPACK_SOURCE_TBZ2-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_TGZ CPACK_SOURCE_TGZ-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_TXZ CPACK_SOURCE_TXZ-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_TZ CPACK_SOURCE_TZ-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CPACK_SOURCE_ZIP CPACK_SOURCE_ZIP-ADVANCED:INTERNAL=1 //STRINGS property for variable: CROSS_BUILD_STAGE CROSS_BUILD_STAGE-STRINGS:INTERNAL=HOST;TOOLS;CROSS //ADVANCED property for variable: CTEST_SUBMIT_RETRY_COUNT CTEST_SUBMIT_RETRY_COUNT-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CTEST_SUBMIT_RETRY_DELAY CTEST_SUBMIT_RETRY_DELAY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CVSCOMMAND CVSCOMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CVS_UPDATE_OPTIONS CVS_UPDATE_OPTIONS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: DART_TESTING_TIMEOUT DART_TESTING_TIMEOUT-ADVANCED:INTERNAL=1 //Request to build project bzip2 ENABLE_bzip2:INTERNAL=OFF //MODIFIED property for variable: ENABLE_paraview ENABLE_paraview-MODIFIED:INTERNAL=ON //Request to build project png ENABLE_png:INTERNAL=OFF //MODIFIED property for variable: ENABLE_python ENABLE_python-MODIFIED:INTERNAL=ON //Request to build project zlib ENABLE_zlib:INTERNAL=OFF //Details about finding PythonInterp FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[/usr/bin/python2][v2.7.6(2.6)] //Details about finding PythonLibs FIND_PACKAGE_MESSAGE_DETAILS_PythonLibs:INTERNAL=[/usr/lib/x86_64-linux-gnu/libpython2.7.so][/usr/include/python2.7][v2.7.6(2.6)] //ADVANCED property for variable: GITCOMMAND GITCOMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: GIT_EXECUTABLE GIT_EXECUTABLE-ADVANCED:INTERNAL=1 //Result of TRY_COMPILE HAVE_VOID_PTR_SIZE:INTERNAL=TRUE //ADVANCED property for variable: HGCOMMAND HGCOMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: MAKECOMMAND MAKECOMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: MEMORYCHECK_COMMAND MEMORYCHECK_COMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: MEMORYCHECK_SUPPRESSIONS_FILE MEMORYCHECK_SUPPRESSIONS_FILE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: OSPRAY_BUILD_ISA OSPRAY_BUILD_ISA-ADVANCED:INTERNAL=1 //STRINGS property for variable: OSPRAY_BUILD_ISA OSPRAY_BUILD_ISA-STRINGS:INTERNAL=SSE;AVX;AVX2;ALL //ADVANCED property for variable: P4COMMAND P4COMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PACKAGE_SUFFIX PACKAGE_SUFFIX-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PARAVIEW_BUILD_TYPE PARAVIEW_BUILD_TYPE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PARAVIEW_FREEZE_PYTHON PARAVIEW_FREEZE_PYTHON-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PARAVIEW_GIT_REPOSITORY PARAVIEW_GIT_REPOSITORY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PARAVIEW_GIT_TAG PARAVIEW_GIT_TAG-ADVANCED:INTERNAL=1 //STRINGS property for variable: PARAVIEW_RENDERING_BACKEND PARAVIEW_RENDERING_BACKEND-STRINGS:INTERNAL=OpenGL;OpenGL2 //ADVANCED property for variable: PARAVIEW_VERSION PARAVIEW_VERSION-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PASS_LD_LIBRARY_PATH_FOR_BUILDS PASS_LD_LIBRARY_PATH_FOR_BUILDS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PV_EXTERNAL_PROJECTS PV_EXTERNAL_PROJECTS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PV_EXTRA_CMAKE_ARGS PV_EXTRA_CMAKE_ARGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PV_MAKE_NCPUS PV_MAKE_NCPUS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PYTHON_EXECUTABLE PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PYTHON_INCLUDE_DIR PYTHON_INCLUDE_DIR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PYTHON_LIBRARY PYTHON_LIBRARY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: PYTHON_LIBRARY_DEBUG PYTHON_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: REMOTE_PVWEB_TEST_BROWSER REMOTE_PVWEB_TEST_BROWSER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: REMOTE_PVWEB_VISUALIZER_URLS REMOTE_PVWEB_VISUALIZER_URLS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SCPCOMMAND SCPCOMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SITE SITE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SLURM_SBATCH_COMMAND SLURM_SBATCH_COMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SLURM_SRUN_COMMAND SLURM_SRUN_COMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SUPPRESS_bzip2_OUTPUT SUPPRESS_bzip2_OUTPUT-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SUPPRESS_paraview_OUTPUT SUPPRESS_paraview_OUTPUT-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SUPPRESS_png_OUTPUT SUPPRESS_png_OUTPUT-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SUPPRESS_python_OUTPUT SUPPRESS_python_OUTPUT-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SUPPRESS_zlib_OUTPUT SUPPRESS_zlib_OUTPUT-ADVANCED:INTERNAL=1 //ADVANCED property for variable: SVNCOMMAND SVNCOMMAND-ADVANCED:INTERNAL=1 //ADVANCED property for variable: TEST_REMOTE_PARAVIEW_WEB TEST_REMOTE_PARAVIEW_WEB-ADVANCED:INTERNAL=1 //ADVANCED property for variable: TRUST_SVN_CERTIFICATES_AUTOMATICALLY TRUST_SVN_CERTIFICATES_AUTOMATICALLY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: USE_NONFREE_COMPONENTS USE_NONFREE_COMPONENTS-ADVANCED:INTERNAL=1 //Use system adios USE_SYSTEM_adios:INTERNAL=OFF //Use system boost

1 个答案:

答案 0 :(得分:1)

问题背景:

首先出现的问题是在尝试使用Paraview的Linux预编译二进制文件并将paraview.simple导入Anaconda的Liunux Python之后。提供的二进制文件似乎是使用UCS2对Python的支持编译的,但是,(由@Dologan提供noted)Anaconda的Python for Linux是在UCS4支持下构建的。因此,导入paraview.simple时,可能会出现错误undefined symbol: PyUnicodeUCS2*

<强>解决方案

使用UCS4构建Paraview支持Python似乎是解决此问题的最合理方法。但是,为了保证构建的Python库支持UCS4,您需要在遵循superbuild指令时使用系统的Python,并确保您的系统的Python确实支持UCS4。您可以在控制台中按如下方式确认:

$ python
>>> import sys
>>> sys.maxunicode>65535
TRUE

如果您看到FALSE,则需要更新系统的Python或构建支持UCS4的Python并匹配您需要在Anaconda环境中使用的Python版本。在ubuntu中,您可以通过apt-get install python-dev获得支持UCS4的Python2.7。确认sys.maxunicode>65535之后,您可以按照Superbuild的说明进行操作,这些说明非常简单。我建议在配置构建时暂时删除unix系统中LD_LIBRARY_PATH的任何定义,以便cmake选择正确的目录。此外,每次切换或修改新功能时,请使用ccmake gui并点击c。例如,我从ENABLE_python开始,然后c。然后再次USE_SYSTEM_python:BOOL=ONc以确保将Python相关路径设置为我想要编译的路径。对于ubuntu,这些路径是

PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2
PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7
PYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython2.7.so

最后,我能够在Anaconda中导入构建的paraview.simple模块而无需进一步的问题。