vigente / gerardus

Computational biology and medical image processing scripts and programs
219 stars 74 forks source link

No ITK #108

Open mcbrs1a opened 6 years ago

mcbrs1a commented 6 years ago

I run cmake ..

then when trying to isntall ITK, don't get the:

/home/myname/Software/gerardus/cpp/src/third-party/InsightToolkit-4.3.1/bin directory

ITK also doesn't download

rcasero commented 6 years ago

Why doesn't ITK download, what error do you get?

mcbrs1a commented 6 years ago

I dont get an error, I get :

== Generating build files (DONE) ==

-- Compiling Matlab function vmu2png.m... -- ... compilation result: 0 -- Configuring done -- Generating done -- Build files have been written to: /home/petic/PreClin/gerardus/build

On 8 November 2017 at 11:00, Ramón Casero notifications@github.com wrote:

Why doesn't ITK download, what error do you get?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vigente/gerardus/issues/108#issuecomment-342783871, or mute the thread https://github.com/notifications/unsubscribe-auth/Afnjt-gkxwZ1PCnmZR95L2mqCHECfL8hks5s0YnfgaJpZM4QWMmm .

rcasero commented 6 years ago

So did you run the first cmake ..? After which you should have got a message saying

 -- ******************************************************************************
 -- ITK built successfully. Now you need to install it manually. For that, run
 --    pushd "/home/myname/Software/gerardus/cpp/src/third-party/InsightToolkit-4.3.1/bin"
 --    sudo make install; popd
 -- If ITK installed successfully, you can then run
 --    cmake ..
 -- again to finish configuring Gerardus.
 -- ******************************************************************************

as it says here

https://github.com/vigente/gerardus/wiki/Build-instructions#instructions-for-linux-and-mac-users

mcbrs1a commented 6 years ago

yes correct I don't get that message

On 8 November 2017 at 11:04, Ramón Casero notifications@github.com wrote:

So did you run the first cmake ..? After which you should have got a message saying

-- ** -- ITK built successfully. Now you need to install it manually. For that, run -- pushd "/home/myname/Software/gerardus/cpp/src/third-party/InsightToolkit-4.3.1/bin" -- sudo make install; popd -- If ITK installed successfully, you can then run -- cmake .. -- again to finish configuring Gerardus. -- **

as it says here

https://github.com/vigente/gerardus/wiki/Build- instructions#instructions-for-linux-and-mac-users

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vigente/gerardus/issues/108#issuecomment-342784714, or mute the thread https://github.com/notifications/unsubscribe-auth/Afnjtwsg7ITc_LjBNfN7QXMsPrubvNJzks5s0Yq7gaJpZM4QWMmm .

rcasero commented 6 years ago

Did you do something manually, or did you change anything in the CMakeLists.txt by hand?

rcasero commented 6 years ago

Or do do have an ITK already installed in your system?

mcbrs1a commented 6 years ago

No I did nothing, im doing a new clone and running cmake ..

yes I have /usr/local/itk do I just delete that?

rcasero commented 6 years ago

The current version of gerardus checks whether ITK is already installed in the system, as you can see here

https://github.com/vigente/gerardus/blob/64bc24f6e25dab286debfba51833cc9551782c3e/CMakeLists.txt#L408

If it can find an ITK already installed, then it will not try to download and build another one. The reason for this is that downloading and building ITK is slow, so you only want to do it once.

To run gerardus programs/functions, you want to let it download and build ITK, so that it's built with a g++ version that is compatible with Matlab.

Unfortunately, this means that the gerardus ITK cannot coexist with another ITK in your system.

So yes, basically if you want to build gerardus, you need to delete the other ITK.

mcbrs1a commented 6 years ago

Ok, its strange though how it was downloading previously; i've removed /usr/local/itk but still don't get the download. The only other place I have is whereis itk

/usr/src/WrapITK/itk.swg

Do I need to remove this also?

rcasero commented 6 years ago

Even if you remove ITK physically, your cmake cache may still say that it was found. Try rm -rf build/* in the gerardus directory. Also, when you installed ITK, you may have installed ITK libraries somewhere else that was not /usr/local/itk.

mcbrs1a commented 6 years ago

so is there nothing I can do? Can gerardus only be used by people who have never installled ITK before?

mcbrs1a commented 6 years ago

Ok I deleted /usr/local/cmake/itk4.3 and it seems to be working