Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with build on Mac OSX #29

Closed
cogitas3d opened this issue Sep 15, 2020 · 7 comments
Closed

Problem with build on Mac OSX #29

cogitas3d opened this issue Sep 15, 2020 · 7 comments
Assignees

Comments

@cogitas3d
Copy link

Hey there!

I vever had problem with compilation of DicomToMesh, but after I upgrade brew on Mac I had a lot...

First, the system doesn't found Qt, so, I solve it with:

cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)

After I had an error on Python 3, so, I solve it with:

brew link python@3.8

I did the cmake again:

-- The C compiler identification is AppleClang 10.0.0.10001044 -- The CXX compiler identification is AppleClang 10.0.0.10001044 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Found OpenGL: /System/Library/Frameworks/OpenGL.framework found components: OpenGL -- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.8/bin/python3.8 (found suitable version "3.8.5", minimum required is "3.8") found components: Interpreter Development.Module Development.Embed -- Found FontConfig: /usr/local/lib/libfontconfig.dylib -- HDF5: Using hdf5 compiler wrapper to determine C configuration -- Found HDF5: /usr/local/lib/libhdf5.dylib;/usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib (found version "1.12.0") found components: C HL -- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.4") -- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11") -- Found PNG: /usr/local/lib/libpng.dylib (found version "1.6.37") -- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable exact version "1.73.0") -- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable exact version "1.73.0") found components: serialization -- Found EXPAT: /usr/lib/libexpat.dylib (found version "2.2.1") -- Found JPEG: /usr/local/lib/libjpeg.dylib (found version "90") -- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.1.0") CMake Deprecation Warning at /usr/local/lib/cmake/vtk-9.0/vtk-use-file-deprecated.cmake:1 (message): The VTK_USE_FILE` is no longer used starting with 8.90.
Call Stack (most recent call first):
lib/CMakeLists.txt:6 (include)

-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable exact version "1.73.0")
-- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable exact version "1.73.0") found components: serialization
CMake Deprecation Warning at /usr/local/lib/cmake/vtk-9.0/vtk-use-file-deprecated.cmake:1 (message):
The VTK_USE_FILE is no longer used starting with 8.90.
Call Stack (most recent call first):
dicom2mesh/CMakeLists.txt:6 (include)

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/cogitas3d/Programs/DicomToMesh/build/UILD_GUI=OFF
MacBook-Pro-de-Cicero:build cogitas3d$ make
make: *** No targets specified and no makefile found. Stop.
MacBook-Pro-de-Cicero:build cogitas3d$ ls
CMakeCache.txt CMakeFiles UILD_GUI=OFF
MacBook-Pro-de-Cicero:build cogitas3d$ ls
CMakeCache.txt CMakeFiles UILD_GUI=OFF
MacBook-Pro-de-Cicero:build cogitas3d$ cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
-- The C compiler identification is AppleClang 10.0.0.10001044
-- The CXX compiler identification is AppleClang 10.0.0.10001044
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework found components: OpenGL
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.8/bin/python3.8 (found suitable version "3.8.5", minimum required is "3.8") found components: Interpreter Development.Module Development.Embed
-- Found FontConfig: /usr/local/lib/libfontconfig.dylib
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /usr/local/lib/libhdf5.dylib;/usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib (found version "1.12.0") found components: C HL
-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.4")
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Found PNG: /usr/local/lib/libpng.dylib (found version "1.6.37")
-- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable exact version "1.73.0")
-- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable exact version "1.73.0") found components: serialization
-- Found EXPAT: /usr/lib/libexpat.dylib (found version "2.2.1")
-- Found JPEG: /usr/local/lib/libjpeg.dylib (found version "90")
-- Found TIFF: /usr/local/lib/libtiff.dylib (found version "4.1.0")
CMake Deprecation Warning at /usr/local/lib/cmake/vtk-9.0/vtk-use-file-deprecated.cmake:1 (message):
The VTK_USE_FILE is no longer used starting with 8.90.
Call Stack (most recent call first):
lib/CMakeLists.txt:6 (include)

-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable exact version "1.73.0")
-- Found Boost: /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake (found suitable exact version "1.73.0") found components: serialization
CMake Deprecation Warning at /usr/local/lib/cmake/vtk-9.0/vtk-use-file-deprecated.cmake:1 (message):
The VTK_USE_FILE is no longer used starting with 8.90.
Call Stack (most recent call first):
dicom2mesh/CMakeLists.txt:6 (include)

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/cogitas3d/Programs/DicomToMesh/build`

But, when I did the make and:

Scanning dependencies of target dicom2meshlib [ 10%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/dicomFactory.cpp.o [ 20%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/dicomRoutines.cpp.o [ 30%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/meshData.cpp.o [ 40%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/meshRoutines.cpp.o [ 50%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/meshVisualizer.cpp.o /Users/cogitas3d/Programs/DicomToMesh/lib/src/meshVisualizer.cpp:70:23: error: no member named 'ConstructInstance' in 'vtkObjectFactory' vtkObjectFactory::ConstructInstance(result->GetClassName()); ~~~~~~~~~~~~~~~~~~^ 1 error generated. make[2]: *** [lib/CMakeFiles/dicom2meshlib.dir/src/meshVisualizer.cpp.o] Error 1 make[1]: *** [lib/CMakeFiles/dicom2meshlib.dir/all] Error 2 make: *** [all] Error 2

Is it possible solve it?

Thank you.

@cogitas3d
Copy link
Author

Is it possible build without the meshvisualizer?

@eidelen
Copy link
Owner

eidelen commented Sep 15, 2020

Hi Cicero,
It comes likely form VTK 9. Some other people had problems too. We have to tackle that at one point... I'm sorry.

@cogitas3d
Copy link
Author

cogitas3d commented Sep 15, 2020

@eidelen Do you think that have another way to solve it in Mac?

@eidelen
Copy link
Owner

eidelen commented Sep 15, 2020

I made a quick fix for VTK 9 (v9.0.1). Please checkout the particular branch:

git pull
git checkout vtk-9-experimental

Then build as usual. The sophisticated vtk-dicom library cannot be used currently. They seem to work on the issue.

@eidelen eidelen self-assigned this Sep 15, 2020
@cogitas3d
Copy link
Author

I made cmake and do not appear the problem with VTK, but, when run make:

MacBook-Pro-de-Cicero:build cogitas3d$ make Scanning dependencies of target dicom2meshlib [ 10%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/dicomFactory.cpp.o [ 20%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/dicomRoutines.cpp.o [ 30%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/meshData.cpp.o [ 40%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/meshRoutines.cpp.o [ 50%] Building CXX object lib/CMakeFiles/dicom2meshlib.dir/src/meshVisualizer.cpp.o /Users/cogitas3d/Programs/DicomToMesh-vtk-9-experimental/lib/src/meshVisualizer.cpp:70:23: error: no member named 'ConstructInstance' in 'vtkObjectFactory' vtkObjectFactory::ConstructInstance(result->GetClassName()); ~~~~~~~~~~~~~~~~~~^ 1 error generated. make[2]: *** [lib/CMakeFiles/dicom2meshlib.dir/src/meshVisualizer.cpp.o] Error 1 make[1]: *** [lib/CMakeFiles/dicom2meshlib.dir/all] Error 2 make: *** [all] Error 2 MacBook-Pro-de-Cicero:build cogitas3d$

@eidelen
Copy link
Owner

eidelen commented Sep 15, 2020

I can compile on OSX, VTK 9.0.1. However, I made a branch without visualization for the mean time.

git pull
git checkout  vtk-9-novisual

Does this work?

@cogitas3d
Copy link
Author

Master @eidelen

It works perfectly! Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants