r-quantities / units

Measurement units for R
https://r-quantities.github.io/units
173 stars 27 forks source link

Package loading failed when compiled with intel compiler #287

Closed lolow closed 2 years ago

lolow commented 3 years ago

Hi, I have these errors below. Compilation looks fine, I also forced the udunits2 but same error comes when the package is loading.

install.packages("units", configure.args='--with-udunits2-lib=/zeus/opt/intel20.1/udunits/2.2.26/lib --with-udunits2-include=/zeus/opt/intel20.1/udunits/2.2.26/include')

> Installing package into ‘/home/xxx/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/units_0.7-2.tar.gz'
Content type 'application/x-gzip' length 855840 bytes (835 KB)
==================================================
downloaded 835 KB

* installing *source* package ‘units’ ...
** package ‘units’ successfully unpacked and MD5 sums checked
** using staged installation
configure: units: 0.7-2
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether icpc -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... icpc -std=gnu++11 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for error_at_line... yes
checking for gcc... icc -std=gnu99
checking whether we are using the GNU C compiler... yes
checking whether icc -std=gnu99 accepts -g... yes
checking for icc -std=gnu99 option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking udunits2.h usability... yes
checking udunits2.h presence... yes
checking for udunits2.h... yes
checking for ut_read_xml in -ludunits2... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
icpc -std=gnu++11 -I"/zeus/opt/intel20.1/R/4.0.2/lib64/R/include" -DNDEBUG -DUDUNITS2_DIR=0 -I/zeus/opt/intel20.1/udunits/2.2.26/include -I/zeus/opt/intel20.1/udunits/2.2.26/include -I/usr/local/include -I'/home/xxx/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include   -fpic  -g -Wall -pedantic -std=c++11 -mtune=native -pipe -c RcppExports.cpp -o RcppExports.o
icpc -std=gnu++11 -I"/zeus/opt/intel20.1/R/4.0.2/lib64/R/include" -DNDEBUG -DUDUNITS2_DIR=0 -I/zeus/opt/intel20.1/udunits/2.2.26/include -I/zeus/opt/intel20.1/udunits/2.2.26/include -I/usr/local/include -I'/home/xxx/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include   -fpic  -g -Wall -pedantic -std=c++11 -mtune=native -pipe -c udunits.cpp -o udunits.o
icpc -std=gnu++11 -shared -L/zeus/opt/intel20.1/R/4.0.2/lib64/R/lib -L/usr/local/lib64 -o units.so RcppExports.o udunits.o -lexpat -L/zeus/opt/intel20.1/udunits/2.2.26/lib -lexpat -ludunits2 -L/zeus/opt/intel20.1/R/4.0.2/lib64/R/lib -lR
installing to /home/xxx/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-units/00new/units/libs
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: segfault from C stack overflow
Execution halted
ERROR: loading failed
* removing ‘/home/xxx/R/x86_64-pc-linux-gnu-library/4.0/units’
* restoring previous ‘/work/seme/ld30319/R/x86_64-pc-linux-gnu-library/4.0/units’

The segfault is not very informative. Is there a way to obtain more information? Thank you for any help!

Enchufa2 commented 3 years ago

My next move would be to run the R session with gdb (or whatever the Intel compiler has). See Writing R Extensions for further details.

Enchufa2 commented 2 years ago

Closing this. Please, feel free to reopen if you find more clues and this is a units issue.