ANTsX / ANTsR

R interface to the ANTs biomedical image processing library
https://antsx.github.io/ANTsR
Apache License 2.0
127 stars 35 forks source link

Too many open files #323

Closed muratmaga closed 4 years ago

muratmaga commented 4 years ago

Describe the bug

Building the ANTsR on a new ubuntu 20.04 install via the 'devtools', install_github option. ITKR and ANTsRCore installs, but ANTsR fails at the end with this error message:

usr/bin/ld: cannot open linker script file /usr/lib/gcc/x86_64-linux-gnu/9/../../..
/x86_64-linux-gnu/libm.so: Too many open files
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:6: ANTsR.so] Error 1
ERROR: compilation failed for package ‘ANTsR’
* removing ‘/home/maga/R/x86_64-pc-linux-gnu-library/4.0/ANTsR’
Error: Failed to install 'ANTsR' from GitHub:
  (converted from warning) installation of package ‘/tmp/RtmphBfC4w/filea8ca68692115/ANTsR_0.5.6.2.tar.gz’ had non-zero exit status

It has cmake3.16.3, gcc 9.3.0. This is my first time with ubuntu, has anybody encountered this before?

stnava commented 4 years ago

I have never seen that - but google suggests it is an uncommon but not new error. I also never use devtools but not sure command line will make any difference. the solution seems to be something to do with ulimit --- you might try some of the suggestions to see if it helps.

xpectA2I commented 3 years ago

I am having the very same problem. I tried all of the ways to install ANTsR but keep getting this exact same error any which way I go. Command line or within R. Even AntsrCore is causing trouble. Fslr and other nuerobase packages install smoothly.. I redid it on my local mac machine but on a linux system I am just not able to be successful.

gdevenyi commented 3 years ago

First guess is ulimit -S -n 2048 before launching R

xpectA2I commented 3 years ago

Okay that was it.. oh my gosh.. saves me so much trouble.. Thank you thank you