ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken. While building ParaView to execute Qt custom apps
ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken. While building ParaView to execute Qt custom apps
我一直在尝试构建 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)
对我应该做什么有什么想法吗?
Qt5 中的 configure
步骤更改为只接受 Mac SDK 的 短格式 名称。要通过构建步骤实现此目的,请在调用 ccmake
时输入短格式名称,方法是更改此:
ccmake -DCMAKE_OSX_SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk ../paraview-superbuild
对此:
ccmake -DCMAKE_OSX_SDK=macosx10.14 ../paraview-superbuild
我一直在尝试构建 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)
对我应该做什么有什么想法吗?
Qt5 中的 configure
步骤更改为只接受 Mac SDK 的 短格式 名称。要通过构建步骤实现此目的,请在调用 ccmake
时输入短格式名称,方法是更改此:
ccmake -DCMAKE_OSX_SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk ../paraview-superbuild
对此:
ccmake -DCMAKE_OSX_SDK=macosx10.14 ../paraview-superbuild