I am trying to build Slicer (developper mode) on Mac osX running Sierra (version 10.12). I’ve downloaded the latest sources (April 17 2018) with git and I am currently getting this error message below when building with cmake (3.11.1). I am using CMAKE_BUILD_TYPE set to Release, CMAKE_OSX_DEPLOYMENT_TARGET set to 10.12 (tried 10.9 but got the same error), and Xcode version 8.3.3.
The build fails on “VTKITKVectorReader” target with the following error :
‘vtkDiscreteFlyingEdges3D.h’ file not found
Is there any compatibility problem with the latest sources (in particular VTK, I use VTK7) and Sierra? Did anyone have successfully built the latest Slicer on Sierra?
I have qt 4.7.4 and I download the sources from git repository (command : git clone https://github.com/Slicer/Slicer.git, version 4.9)
Actually, the problem mentioned in my previous post is solved, I guess it came from git/https protocol I used. But I have another building issue, I get different errors referring to "use of undeclared identifier " from DCMTK, it seems that the building of this version of Slicer requires C++11 ?
I’ve seen some discussion of the undeclared identifier problem, but I thought that had been fixed with a DCMTK update.
If you don’t have a reason to use Qt4, I would suggest starting with Qt5, because that is the most maintained/tested now, and will build everything with C++11. I am successfully building on macOS 10.12 against Qt 5.10.1 from http://download.qt.io/official_releases/qt/5.10/5.10.1/
If you do need Qt4 then somebody can try to debug, but otherwise please try Qt5 using these instructions. eg on my computer:
cd /opt/bld/r/r5nj
ccmake -DQt5_DIR=/opt/sw/Qt_ol/5.10.1/clang_64/lib/cmake/Qt5 ~/git/s5
note that the base path for your build should be a relatively short path, in order to avoid errors described here. I would suggest staying under about 20 characters or so.
Thanks for your reply.
I followed your suggestions, since I don’t specifically need Qt4, I tried building Slicer using Qt5, I got a new error during the SVN checkout of EMSegment :
svn: E000060: Operation timed out
I have svn version 1.9.4, I can’t find where the error comes from ?
I saw that issue yesterday, and turned off building EMSegment off with -DSlicer_BUILD_EMSegment:BOOL=OFF (or setting it in the CMake GUI, under Advanced options). I normally do turn it off because I don’t need it, but forgot for that build.
There may be an intermittent network issue with the SVN server, however I just now tried it again (svn co http://svn.slicer.org/Slicer3/branches/Slicer4-EMSegment) and it worked.
Recently, I builded Slicer on Window 10 with qt 4.8.7 and got following error.
Slicer\Libs\vtkSegmentationCore\vtkBinaryLabelmapToClosedSurfaceConversionRule.cxx(28): fatal error C1083: Cannot open include file: ‘vtkDiscreteFlyingEdges3D.h’: No such file or directory [F:\S4R\Slicer-build\Libs\vtkSegmentationCore\vtkSegmentationCore.vcxproj] It seems that it is related to vtk version. Can anybody give any advice. Thanks!
I have updated code in the trunk to allow building with both Qt5/VTK9 and Qt4/VTK7. Note that VTK7/Qt4 support will be dropped latest after the next stable build (Slicer-4.10) will be released, probably in a couple of weeks.
Thanks for you information. I have a question about Qt5: whether it should be build with openssl? Since 3D slicer is updated frequently, the module developed using c++ under the older version can not work in the new version. Is there any way to let the module work in the new version easily? I’m not good at this. Forgive me , if the question is too simple!
You should be able to still build Slicer with VTK7/Qt4 (I’ve made breaking changes conditional, based on the VTK version), so in the short term you can still build using Qt4.
Qt5 build: SSL is not required, but if you don’t use a Qt that has been built with OpenSSL then downloads through https protocol will fail (sample data, extension manager, etc. uses https for most downloads).