【发布时间】:2019-11-27 13:45:28
【问题描述】:
我一直在尝试构建 ParaView 以在 MacOS 上测试自定义应用示例 here。
我已按照超级构建 here 的站点说明进行操作。
然后我执行了:
$ mkdir pv
$ cd pv
$ git clone https://gitlab.kitware.com/paraview/paraview-superbuild.git
$ cd paraview-superbuild
$ git fetch origin # ensure you have the latest state from the main repo
$ git submodule update
$ cd ..
$ mkdir paraview_build
$ cd paraview_build
$ cmake ../paraview-superbuild
$ ccmake -DCMAKE_OSX_SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk ../paraview-superbuild
我启用了 CMake 变量:
ENABLE_qt5
ENABLE_python
ENABLE_python2
然后跑:
$ make
我得到的错误:
[ 82%] No patch step for 'qt5'
[ 83%] No update step for 'qt5'
[ 85%] Performing configure step for 'qt5'
+ cd qtbase
+ /Users/username/Desktop/dev/pv/paraview_build/superbuild/qt5/src/qtbase/configure -top-level -opensource -confirm-license -release -prefix /Users/username/Desktop/dev/pv/paraview_build/install -I /Users/username/Desktop/dev/pv/paraview_build/install/include -L /Users/username/Desktop/dev/pv/paraview_build/install/lib -skip qtconnectivity -skip qtgamepad -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -nomake examples -nomake tests -no-dbus -qt-libjpeg -qt-pcre -system-zlib -no-openssl -skip qtsvg -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -qt-libpng
Preparing build tree...
Creating qmake...
/Users/username/Desktop/dev/pv/paraview_build/superbuild/qt5/src/qtbase/qmake/generators/win32/msbuild_objectmodel.cpp:1190:10: warning: comparison of two values with different enumeration types in switch statement ('midlErrorCheckOption' and 'midlStructMemberAlignOption') [-Wenum-compare-switch]
case midlAlignNotSet:
^~~~~~~~~~~~~~~
1 warning generated.
Done.
Info: creating super cache file /Users/username/Desktop/dev/pv/paraview_build/superbuild/qt5/build/.qmake.super
Info: creating stash file /Users/username/Desktop/dev/pv/paraview_build/superbuild/qt5/build/.qmake.stash
This is the Qt Open Source Edition.
You have already accepted the terms of the Open Source license.
Running configuration tests...
Checking for gold linker... no
Checking for valid makespec... ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
Check config.log for details.
CMake Error at /Users/username/Desktop/dev/pv/paraview_build/superbuild/sb-qt5-configure.cmake:47 (message):
Failed with exit code 3
make[2]: *** [superbuild/qt5/stamp/qt5-configure] Error 1
make[1]: *** [superbuild/CMakeFiles/qt5.dir/all] Error 2
config.log 文件:
Command line: -opensource -confirm-license -release -prefix /Users/username/Desktop/dev/pv/paraview_build/install -I /Users/username/Desktop/dev/pv/paraview_build/install/include -L /Users/username/Desktop/dev/pv/paraview_build/install/lib -skip qtconnectivity -skip qtgamepad -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -nomake examples -nomake tests -no-dbus -qt-libjpeg -qt-pcre -system-zlib -no-openssl -skip qtsvg -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -qt-libpng
executing config test verifyspec
+ cd /Users/username/Desktop/dev/pv/paraview_build/superbuild/qt5/build/config.tests/verifyspec && /Users/username/Desktop/dev/pv/paraview_build/superbuild/qt5/build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'QMAKE_LIBDIR += /Users/username/Desktop/dev/pv/paraview_build/install/lib' 'INCLUDEPATH += /Users/username/Desktop/dev/pv/paraview_build/install/include' /Users/username/Desktop/dev/pv/paraview_build/superbuild/qt5/src/qtbase/config.tests/verifyspec
> Project ERROR: QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)
对我应该怎么做有什么想法吗?
【问题讨论】:
-
这些
ENABLE_变量是什么? CMake变量?如果是这样,您确定在更改这些变量后重新运行 CMake? -
它们是我需要的 paraview-superbuild 变量。我重新运行 cmake ../paraview-superbuild 只是为了确保但仍然得到相同的结果。
-
config.log文件包含什么?那里有什么线索吗?您可以将此文件添加到您的问题帖子中吗? -
我添加了
config.log文件。看起来我必须做类似QMAKE_MAC_SDK=macosx10.4的事情,但我不知道在哪里。有什么想法吗?