ANTsX / ITKR

port of ITK to R
6 stars 14 forks source link

Compile errors #25

Closed awong26 closed 5 years ago

awong26 commented 6 years ago

Hi,

I'm trying to install ITKR from inside the R environment and am running into an error during the compilation process. Your help would be appreciated. For reference I'm running the latest version of R and Rstudio on a Windows 7 machine.

Installing ITKR
"C:/PROGRA~1/R/R-35~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD  \
  INSTALL "C:/Users/Coda/AppData/Local/Temp/Rtmpa8caoE/filee703b617bc1/ITKR"  \
  --library="C:/Users/Coda/Documents/R/win-library/3.5" --install-tests 

* installing *source* package 'ITKR' ...
Cloning into 'itks'...
Checking out files: 100% (15398/15398), done.
Your branch is up-to-date with 'origin/master'.
Already on 'master'
Note: checking out 'd92873e33e8a54e933e445b92151191f02feab42'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d92873e33e... Merge topic 'FixGDCMHonorVisibilityProperties'
-- The C compiler identification is GNU 4.9.3
-- Check for working C compiler: C:/Rtools/mingw_32/bin/gcc.exe
-- Check for working C compiler: C:/Rtools/mingw_32/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 4.9.3
-- Check for working CXX compiler: C:/Rtools/mingw_32/bin/g++.exe
-- Check for working CXX compiler: C:/Rtools/mingw_32/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:41 (message):
  ITK source code directory path length is too long (73 > 50).Please move the
  ITK source code directory to a directory with a shorter path.

-- Configuring incomplete, errors occurred!
See also "C:/Users/Coda/AppData/Local/Temp/Rtmpa8caoE/filee703b617bc1/ITKR/src/itkb/CMakeFiles/CMakeOutput.log".
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture

c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.0/include" -DNDEBUG  -I"C:/Users/Coda/Documents/R/win-library/3.5/Rcpp/include"        -O2 -Wall  -mtune=generic -c dummy.cpp -o dummy.o
cd itkb && mingw32-make -j 2 && \
mingw32-make install && rm -rf ../itks && \
rm -rf CMakeFiles/ && rm -rf Modules/ && rm -rf CMakeTmp/ \
rm -f Makefile rm -rf Utilities/Doxygen
mingw32-make[1]: Entering directory 'C:/Users/Coda/AppData/Local/Temp/Rtmpa8caoE/filee703b617bc1/ITKR/src/itkb'
mingw32-make[1]: *** No targets specified and no makefile found.  Stop.
mingw32-make[1]: Leaving directory 'C:/Users/Coda/AppData/Local/Temp/Rtmpa8caoE/filee703b617bc1/ITKR/src/itkb'
make: *** [libs] Error 2
ERROR: compilation failed for package 'ITKR'
* removing 'C:/Users/Coda/Documents/R/win-library/3.5/ITKR'
In R CMD INSTALL
Installation failed: Command failed (1)
stnava commented 6 years ago

testing on windows is an ongoing process --- i dont know much about it but several people succeed with this, dont know if they were using mingw or not. you might try to pull again to see if you experienced "bad timing" on a commit or something of that nature.

stnava commented 6 years ago

also any help from you or other windows users would be appreciated

awong26 commented 6 years ago

I realized that the error is being caused by the temporary path (that gets created during the download/install process) is too long. I got around the problem by manually cloning the repository to a location with a short path name, and then asking devtools to do the build and install manually. That seemed to do the trick!

awong26 commented 6 years ago

Actually it still seems to be having issues; although it completed the install process it does not work properly. I'm trying to see how to get it running.