Thanks for replying.
I’m using the CMake GUI (3.11.0) to generate an Xcode project file. Qt5_DIR is set to ~/Qt/5.9/Src/qtbase/lib/cmake/Qt5. Most of the Slicer package has compiled successfully, and been able to find Qt libraries, but CTK fails.
Thanks for replying.
How did you build/acquire Qt5? Does the following directory exist:
If the folder above does exist, my only other suggestion would be to try building with the makefile or ninja generator target instead of XCode project.
Unfortunately I can’t do a clean test myself right now, so hopefully someone else will chime in if they’ve done a successful clean build on mac recently. However, the mac build was ok on the dashboard last night, and I’m fairly sure that is a full clean build.
Thanks. The directory exists and Qt5NetworkConfig.cmake is in it, but for some reason CTK, and only CTK, isn’t finding it. I’ll investigate other build options.
Has anyone else encountered this, or have a suggestion?
I’m also confused as to why the CTK project is built in Debug while the main Slicer project is being built in Release.
Looking at the dashboard, the Mac builds were done with Qt 5.10. I’m compiling 5.10.1 now, and I’ll see if that changes the outcome of my Slicer build.
It’s been my experience as well that cmake settings do not always propagate into sub-project. You might want to check and reset manually for sub-projects if that is important for you.
My Qt5.10 builds are fine on mac and I never had problems with Qt 5.9 in the past. I always use Makefiles and not Xcode projects so you might give that a try.
Thanks. I’m now trying building using Makefiles with Qt 5.10.1. For some reason, it’s now failing at the tcl compilation step. The output from that step is below. It appears to be failing to find a file, but I can see the file in the directory. Also it is not recognizing the --with-tk option flag.
[ 45%] Generate version-incrTcl.txt and license-incrTcl.txt [ 45%] Performing configure step for 'incrTcl' -- incrTcl: Removing 'configure' log files -- incrTcl: incrTcl_WORKING_DIR: /Users/michaelschumaker/Packages/Slicer-SuperBuild/tcl/incrTcl -- incrTcl: sh;configure;--with-tcl=/Users/michaelschumaker/Packages/Slicer-SuperBuild/tcl-build/lib;--with-tk=/Users/michaelschumaker/Packages/Slicer-SuperBuild/tcl-build/lib;--prefix=/Users/michaelschumaker/Packages/Slicer-SuperBuild/tcl-build -- incrTcl: Errors detected - See below. checking for correct TEA configuration... ok (TEA 3.9) configure: configuring itcl 4.0.1 checking whether ln -s works... yes checking for Tcl configuration... found /Users/michaelschumaker/Packages/Slicer-SuperBuild/tcl-build/lib/tclConfig.sh checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc accepts -g... yes checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc option to accept ISO C89... none needed checking for existence of /Users/michaelschumaker/Packages/Slicer-SuperBuild/tcl-build/lib/tclConfig.sh... loading checking platform... unix configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /Users/michaelschumaker/Packages/Slicer-SuperBuild/tcl-build checking for gcc... (cached) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc checking whether we are using the GNU C compiler... (cached) yes checking whether /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc accepts -g... (cached) yes checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc option to accept ISO C89... (cached) none needed checking how to run the C preprocessor... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -E checking whether make sets $(MAKE)... yes checking for ranlib... ranlib checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking if the compiler understands -pipe... yes checking whether byte ordering is bigendian... no checking for sin... yes checking for main in -lieee... no checking for main in -linet... no checking net/errno.h usability... no checking net/errno.h presence... no checking for net/errno.h... no checking for connect... yes checking for gethostbyname... yes checking dirent.h... yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking values.h usability... no checking values.h presence... no checking for values.h... no checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking sys/wait.h usability... yes checking sys/wait.h presence... yes checking for sys/wait.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes configure: WARNING: unrecognized options: --with-tk configure: error: could not find source file 'itcl2TclOO.c' CMake Error at /Users/michaelschumaker/Packages/Slicer/CMake/ExternalProjectForNonCMakeProject.cmake:104 (message): incrTcl: configure step failed with exit code '1'. Outputs also captured in /Users/michaelschumaker/Packages/Slicer-SuperBuild/incrTcl_configure_step_output.txt and /Users/michaelschumaker/Packages/Slicer-SuperBuild/incrTcl_configure_step_error.txt. Setting env. variable EP_EXECUTE_DISABLE_CAPTURE_OUTPUTS to 1 allows to disable file capture. Call Stack (most recent call first): /Users/michaelschumaker/Packages/Slicer-SuperBuild/incrTcl_configure_step.cmake:3 (ExternalProject_Execute) make: *** [incrTcl-prefix/src/incrTcl-stamp/incrTcl-configure] Error 1 make: *** [CMakeFiles/incrTcl.dir/all] Error 2 make: *** [all] Error 2
You should disable TCL in Cmake options.
Excellent, thank you. Skipping it makes life easier. The build is moving on to the next thing.
Using Makefiles I still had the same problem with CTK - the value of Qt5Network_DIR is not propagated down to CTK and its sub-projects. I was able to go down to the PythonQt sub-project and add the Qt5Network_DIR value to the cache for it. However, even though I set the value in the CMake GUI for source: ~/Slicer-SuperBuild/CTK and Build destination: ~/Slicer-SuperBuild/CTK-build, it still returns with the message that it Qt5Network was not found. Is there something else I should be doing with the configuration?
Thanks for any assistance.
[ 83%] Performing configure step for 'CTK' loading initial cache file /Users/michaelschumaker/Packages/Slicer-SuperBuild/CTK-build/CTK-prefix/tmp/CTK-cache-Release.cmake CMake Error at /Users/michaelschumaker/Qt/5.10.1/Src/qtxmlpatterns/lib/cmake/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake:83 (find_package): Could not find a package configuration file provided by "Qt5Network" (requested version 5.10.1) with any of the following names: Qt5NetworkConfig.cmake qt5network-config.cmake Add the installation prefix of "Qt5Network" to CMAKE_PREFIX_PATH or set "Qt5Network_DIR" to a directory containing one of the above files. If "Qt5Network" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): /Users/michaelschumaker/Qt/5.10.1/Src/qtbase/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package) CMake/ctkMacroSetupQt.cmake:50 (find_package) CMakeLists.txt:421 (ctkMacroSetupQt) -- Configuring incomplete, errors occurred! See also "/Users/michaelschumaker/Packages/Slicer-SuperBuild/CTK-build/CTK-build/CMakeFiles/CMakeOutput.log". make: *** [CTK-prefix/src/CTK-stamp/CTK-configure] Error 1 make: *** [CMakeFiles/CTK.dir/all] Error 2 make: *** [all] Error 2
Got it at last. I manually added the line:
set(Qt5Network_DIR "/Users/michaelschumaker/Qt/5.10.1/Src/qtbase/lib/cmake/Qt5Network" CACHE PATH "Initial cache" FORCE)
to the file ~/Slicer-SuperBuild/CTK-build/CTK-prefix/tmp/CTK-cache-Release.cmake
Since the set value for Qt5Network_DIR wasn’t propagating down, when the temporary file was made, it didn’t include the set command for Qt5Network_DIR.
Is this really not happening in other Mac builds?
I just did a fresh build on mac 10.13.3 with the cmake command below and it succeeded with no errors. I used the Slicer master as of last night.
cmake \ -DQT_QMAKE_EXECUTABLE:FILEPATH=/Users/pieper/Qt/5.10.0/clang_64/bin/qmake \ -DCMAKE_PREFIX_PATH:PATH=/Users/pieper/Qt/5.10.0/clang_64/ \ -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \ -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \ -DSlicer_USE_SimpleITK:BOOL=OFF \ -DSlicer_USE_QtTesting:BOOL=OFF \ -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF \ -DSlicer_VTK_VERSION_MAJOR:STRING=9 \ -DSlicer_VTK_RENDERING_BACKEND:STRING=OpenGL2 \ -DSlicer_BUILD_DataStore:BOOL=OFF \ ../Slicer make -j20
Thank you for testing that.
I finally figured out what I was doing that was strange, and I completed a fresh build with no errors. I had both pre-built and compiled-from-source versions of Qt 5.10, in directories Qt/5.10.1/clang_64 and Qt/5.10.1/Src, respectively. In my CMake configuration, I ended up with a mix of references to the Qt directories, and so in a few cases, when a Qt library needed to reference another one, it couldn’t find it in the place it was expecting it. This mainly happened with the QtWeb-related libraries. When I made sure that the CMake cache consistently referenced the pre-built Qt in clang_64, everything worked out fine.
Thanks again everyone for your assistance.
Makes sense - glad it’s working for you now.
It’s compiling… but not quite working. I get the same errors described in:
What I understand from this is that the initial pathname has to be short. How short does it need to be? I was compiling from /Users/michaelschumaker/Packages.
Yes, that issue is a pain. I did my build in /tmp/q5 and didn’t get the path length errors.
Thanks. Maybe I’ll try from /usr/local.
I suggest to avoid /usr/local as it is a system path
Ok. That makes sense. Thanks.