bbrister/SIFT3D

Installation on Ubuntu 20.04

Closed this issue · 3 comments

Hello,

I would like to thank you for the implementation first!

Issue:

After running the dependencies installation command:

sudo apt-get install zlib1g-dev liblapack-dev libdcmtk-dev libnifti-dev

I tried to install the SIFT3D-1.4.6-Ubuntu-16.04.deb

sudo dpkg -i SIFT3D-1.4.6-Ubuntu-16.04.deb

  Selecting previously unselected package sift3d.
  (Reading database ... 353068 files and directories currently installed.)
  Preparing to unpack SIFT3D-1.4.6-Ubuntu-16.04.deb ...
  Unpacking sift3d (1.4.6) ...
  dpkg: dependency problems prevent configuration of sift3d:
   sift3d depends on libdcmtk5; however:
    Package libdcmtk5 is not installed.

  dpkg: error processing package sift3d (--install):
   dependency problems - leaving unconfigured
  Errors were encountered while processing:
   sift3d

I ran sudo apt-get install -y libdcmtk-dev and got:

  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  libdcmtk-dev is already the newest version (3.6.4-2.1build2).
  You might want to run 'apt --fix-broken install' to correct these.
  The following packages have unmet dependencies:
   sift3d : Depends: libdcmtk5 but it is not installable

It claims that it is not installable, which is confirmed by running sudo apt-get install libdcmtk5 and getting:

  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  Package libdcmtk5 is not available, but is referred to by another package.
  This may mean that the package is missing, has been obsoleted, or
  is only available from another source
  
  E: Package 'libdcmtk5' has no installation candidate

Is there a way to go around this?

Thank you!

Before running cmake .. you might want to disable find_package() calls for DCMTK package using the following commnad: CMAKE_DISABLE_FIND_PACKAGE_DCMTK=TRUE.

Documentation: Every non-REQUIRED find_package() call in a project can be disabled by setting the variable CMAKE_DISABLE_FIND_PACKAGE_ to TRUE. This can be used to build a project without an optional package, although that package is installed.

# Create the Makefiles
cmake .. 

If you ran cmake .. without disabling DCMTK, then remove it from CMakeCache.txt file that was created once you ran cmake .. command inside the build folder (should be lines 253-263).

Documentation: This switch (CMAKE_DISABLE_FIND_PACKAGE_) should be used during the initial CMake run. Otherwise if the package has already been found in a previous CMake run, the variables which have been stored in the cache will still be there. In that case it is recommended to remove the cache variables for this package from the cache using the cache editor or cmake(1) -U.

# Compile the program
make

# Install the files
sudo make install

Installation was successful.

Hi,

Thanks for your interest. I regret that the binary packages have fallen out of date. They check for old DCMTK package names which were used in Ubuntu 16.

Out of curiosity, why did you have to disable the find_package() call for DCMTK when building from source? I tried to set this up so DCMTK would be optional, and build could continue without it, but maybe that's broken now.

Oh, it probably still works then since I tried installing it using binaries only.

Then, I tried building from source after I read the CMake files. I did not know that it should work if just running it from source.

But, great to hear!