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

Installation problem #2

Open
povolann opened this issue Aug 30, 2018 · 3 comments
Open

Installation problem #2

povolann opened this issue Aug 30, 2018 · 3 comments

Comments

@povolann
Copy link

Hi,

I have tried to install RTK using your script and I have problem with CMake, but I'm not really sure what should I do. I get this error after running your script:

anya@anya-ntb:~/Rekonstrukce$ ./auto_build_RTK.sh
Cloning into 'ITK'...
remote: Counting objects: 426430, done.
remote: Compressing objects: 100% (77182/77182), done.
remote: Total 426430 (delta 345435), reused 426363 (delta 345395)
Receiving objects: 100% (426430/426430), 115.22 MiB | 2.57 MiB/s, done.
Resolving deltas: 100% (345435/345435), done.
Checking connectivity... done.
CMake Error: The source directory "/home/anya/Rekonstrukce/ITK-bin" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
./auto_build_RTK.sh: line 16: -DCMAKE_CXX_FLAGS=-fPIC: command not found
make: *** No targets specified and no makefile found. Stop.
Cloning into 'RTK'...
remote: Counting objects: 26631, done.
remote: Compressing objects: 100% (197/197), done.
remote: Total 26631 (delta 147), reused 185 (delta 106), pack-reused 26328
Receiving objects: 100% (26631/26631), 11.91 MiB | 2.39 MiB/s, done.
Resolving deltas: 100% (17996/17996), done.
Checking connectivity... done.
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for isnan
-- Looking for isnan - found
CMake Error at CMakeLists.txt:150 (find_package):
By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ITK", but
CMake did not find one.
Could not find a package configuration file provided by "ITK" (requested version 4.12.0) with any of the following names:
ITKConfig.cmake
itk-config.cmake
Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR" to a directory containing one of the above files. If "ITK" provides a separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/home/anya/Rekonstrukce/RTK-bin/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.
./auto_build_RTK.sh: line 36: cd: bin: No such file or directory
./auto_build_RTK.sh: line 37: ./HelloWorld: No such file or directory

@parishan
Copy link

Hi,

I have the same problem. Could you fix it, Povolann?

@parishan
Copy link

Hi,

I solved the previous problem, but many errors were received, such as bellow:

CMakeFiles/rtkData.dir/build.make:458: recipe for target 'ExternalData/testing/Data/Baseline/Laplacian/Laplacian.mha' failed
make[2]: *** [ExternalData/testing/Data/Baseline/Laplacian/Laplacian.mha] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/rtkData.dir/build.make:199: recipe for target 'ExternalData/testing/Data/Baseline/Varian/attenuationProBeam.mha' failed
make[2]: *** [ExternalData/testing/Data/Baseline/Varian/attenuationProBeam.mha] Error 1
CMakeFiles/Makefile2:419: recipe for target 'CMakeFiles/rtkData.dir/all' failed
make[1]: *** [CMakeFiles/rtkData.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 21%] Linking C static library ../../bin/liblpsolve55.a
[ 21%] Built target lpsolve55
[ 21%] Linking CXX executable ../../bin/gengetopt
[ 21%] Built target gengetopt
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
./auto_build_RTK.sh: line 51: ./HelloWorld: No such file or directory

How I can fix them?

Thanks

@TrevorHoyte
Copy link

There is a mistake in the script on lines 16 and 34 ,There is no need for the 'ITK' in the ../ITK. similarly for RTK
Here is the revised script give it a try hopefully it works for you .
################################################################################
#!/bin/bash

Check if some of the requirements are satisfied

command -v gcc >/dev/null 2>&1 || { echo >&2 "C/C++ compiler is not installed. Aborting."; exit 1; }
command -v cmake >/dev/null 2>&1 || { echo >&2 "Cmake is not installed. Aborting."; exit 1; }
command -v git >/dev/null 2>&1 || { echo >&2 "Git is not installed. Aborting."; exit 1; }

if [ ! -d "./ITK" ]; then
git clone http://itk.org/ITK.git
fi

if [ ! -d "./ITK-bin" ]; then
mkdir ITK-bin
cd ITK-bin
cmake -DModule_ITKReview=ON -DITK_USE_FFTWD=ON -DITK_USE_FFTWF=ON -DBUILD_DOCUMENTATION=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF
-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC ../
make -j
cd ..
fi

if [ ! -d "./RTK" ]; then
git clone http://github.com/SimonRit/RTK.git
fi

if [ ! -d "./RTK-bin" ]; then
# Getting the full path of ITK-bin
cd ITK-bin
path_of_ITK=$(pwd)
cd ..

# Compile RTK
mkdir RTK-bin
cd RTK-bin
cmake -DITK_DIR=$path_of_ITK -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC ../
make -j
cd bin
./HelloWorld
cd ..
cd ..

fi

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

3 participants