users > cmtk v. 3.3.2 compile issue
Showing 1-2 of 2 posts
Display:
Results per page:
Jun 15, 2023  01:06 PM | ktagen-sudo - University of Colorado Anschutz Medical Campus
cmtk v. 3.3.2 compile issue

Hi, 


I have downloaded CMTK-3.3.2-Source.tar.gz and I am trying to build it from source. Our HPC cluster is Red Hat Enterprise Linux 8.7 (Ootpa)


My cmake version is 3.25.6, my gcc version is 11.2.0.7, my fftw version is 3.3.10.8. I used the following cmake command: 


cmake -C ../core/config/gcc-x86_64-sse.cmake -DCMAKE_INSTALL_PREFIX=/projects/kfotso@xsede.org/nitrc/nitrc_install -DDCMTK_config_INCLUDE_DIR=/projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/config/ -DDCMTK_ofstd_INCLUDE_DIR=/projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/ofstd -DDCMTK_dcmdata_INCLUDE_DIR=/projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/dcmdata -DDCMTK_dcmimgle_INCLUDE_DIR=/projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/dcmimgle -DDCMTK_ofstd_LIBRARY=/projects/kfotso@xsede.org/nitrc/dcmtk-install/lib -DDCMTK_dcmdata_LIBRARY=/projects/kfotso@xsede.org/nitrc/dcmtk-install/lib -DDCMTK_dcmimgle_LIBRARY=/projects/kfotso@xsede.org/nitrc/dcmtk-install/lib -DDCMTK_DCMDICTPATH=/projects/kfotso@xsede.org/nitrc/dcmtk-install/share/dcmtk/dicom.dic -DMXML_INCLUDE_DIR=/projects/kfotso@xsede.org/nitrc/mxml_install/include -DMXML_LIBRARY=/projects/kfotso@xsede.org/nitrc/mxml_install/lib -DFFTW_DIR=/curc/sw/install/fftw/3.3.10/gcc/11.2.0 -DFFTW_INCLUDE_PATH=/curc/sw/install/fftw/3.3.10/gcc/11.2.0/include -DFFTWD_THREADS_LIB=/curc/sw/install/fftw/3.3.10/gcc/11.2.0/lib/libfftw3_threads.so.3 -DFFTWD_OMP_LIB=/curc/sw/install/fftw/3.3.10/gcc/11.2.0/lib/libfftw3_omp.so.3 ../core


 


When running make, I got the following error:


/curc/sw/install/gcc/11.2.0/include/c++/11.2.0/bits/unique_ptr.h:57:28: note: declared here
   57 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
/projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.cxx:169:29: warning: ‘template<class> class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  169 |     this->m_Document = std::auto_ptr<DiDocument>(new DiDocument(this->m_Dataset.get(), this->m_Dataset->getOriginalXfer(), CIF_AcrNemaCompatibility));
      |                             ^~~~~~~~
In file included from /curc/sw/install/gcc/11.2.0/include/c++/11.2.0/bits/locale_conv.h:41,
                 from /curc/sw/install/gcc/11.2.0/include/c++/11.2.0/locale:43,
                 from /curc/sw/install/gcc/11.2.0/include/c++/11.2.0/iomanip:43,
                 from /projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/ofstd/ofstream.h:33,
                 from /projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/ofstd/oftypes.h:90,
                 from /projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/ofstd/ofvector.h:46,
                 from /projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/oflog/loglevel.h:35,
                 from /projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/oflog/logger.h:34,
                 from /projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/oflog/oflog.h:28,
                 from /projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/dcmdata/dctypes.h:27,
                 from /projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/dcmdata/dctk.h:28,
                 from /projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.h:43,
                 from /projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.cxx:33:
/curc/sw/install/gcc/11.2.0/include/c++/11.2.0/bits/unique_ptr.h:57:28: note: declared here
   57 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
/projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.cxx: In member function ‘void cmtk::ImageFileDICOM::DoFOV()’:
/projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.cxx:252:55: error: invalid conversion from ‘DcmObject*’ to ‘DcmItem*’ [-fpermissive]
  252 |       if (this->m_Document->getValue(tagKey, pTmpInt, pObj) > 0) {
      |                                                       ^~~~
      |                                                       |
      |                                                       DcmObject*
In file included from /projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.h:44,
                 from /projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.cxx:33:
/projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/dcmimgle/didocu.h:295:37: note:   initializing argument 3 of ‘long unsigned int DiDocument::getValue(const DcmTagKey&, const Uint16*&, DcmItem*) cons
t’
  295 |                            DcmItem *item = NULL) const;
      |                                     ^
/projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.cxx: In member function ‘void cmtk::ImageFileDICOM::DoAcquisitionMatrix()’:
/projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.cxx:281:74: error: invalid conversion from ‘DcmObject*’ to ‘DcmItem*’ [-fpermissive]
  281 |       if (this->m_Document->getValue(DCM_AcquisitionMatrix, tmpDbl, dim, pObj) > 0)
      |                                                                          ^~~~
      |                                                                          |
      |                                                                          DcmObject*
In file included from /projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.h:44,
                 from /projects/kfotso@xsede.org/nitrc/core/libs/IO/cmtkImageFileDICOM.cxx:33:
/projects/kfotso@xsede.org/nitrc/dcmtk-install/include/dcmtk/dcmimgle/didocu.h:226:37: note:   initializing argument 4 of ‘long unsigned int DiDocument::getValue(const DcmTagKey&, Uint16&, long unsigned int, Dc
mItem*, OFBool) const’
  226 |                            DcmItem *item = NULL,
      |                                     ^
make[2]: *** [libs/IO/CMakeFiles/cmtkIO.dir/build.make:202: libs/IO/CMakeFiles/cmtkIO.dir/cmtkImageFileDICOM.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4366: libs/IO/CMakeFiles/cmtkIO.dir/all] Error 2
make: *** [Makefile:166: all] Error 2


Do you have any suggestion?


 


Sincerely


 

Attachment: make.log
Jun 15, 2023  06:06 PM | ktagen-sudo - University of Colorado Anschutz Medical Campus
RE: cmtk v. 3.3.2 compile issue

The procedure below seems to have worked. Thanks!


 


1. Untar the compressed tarball file:
tar -xzvf CMTK-3.3.2-Source.tar.gz


 



2. Rename the package core

mv CMTK-3.3.2-Source.tar.gz core


 



3. Create build directory and cd:

mkdir build;cd build


 



4. Load cmake v 3.25.0, gcc v10.3.0 and fftw v3.3.10:

module load cmake gcc/10.3.0 fftw/3.3.10


 



5. Configure with cmake:

cmake -C ../core/config/gcc-x86_64-sse.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -
DBUILD_CONTRIB=ON -DBUILD_CONTRIB_MUNGER=ON -
DFFTW_DIR=/curc/sw/install/fftw/3.3.10/gcc/10.3.0 -
DFFTW_INCLUDE_PATH=/curc/sw/install/fftw/3.3.10/gcc/10.3.0/include -
DFFTWD_THREADS_LIB=/curc/sw/install/fftw/3.3.10/gcc/10.3.0/lib/libfftw3_threads.so.3 -
DFFTWD_OMP_LIB=/curc/sw/install/fftw/3.3.10/gcc/10.3.0/lib/libfftw3_omp.so.3 -
DCMAKE_INSTALL_PREFIX=/scratch/alpine/kefo9343/nitrc/build ../core/


 



6. Run make:

make j 4


 



7. Install

make install


 



8. Make package that is compatible with all the specific system versions


 


cpack -G RPM


 



9. Go to the bin directory and add the path

cd bin; PATH=${PATH}:$(pwd)


 



10. Add the PATH to your ~/.bashrc as well