r-quantities / units

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

Core dumped when installing #282

Closed JATC1024 closed 3 years ago

JATC1024 commented 3 years ago

I get the following error when trying to install units using the command install.packages("units")

sh: line 1: 4151 Aborted (core dumped) '/mnt/hdd1/hao/lib64/R/bin/R' --no-save --slave 2>&1 < '/mnt/hdd1/hao/tmpdir/RtmpivbXcD/fileb523b2c1ae8'

I try downloading the source files and install using R CMD INSTALL units-0.7-1 and still get a similar error:

7f48170ac000-7f48170ad000 rw-p 001d0000 08:41 11729725 /mnt/hdd1/hao/lib64/libgfortran.so.4.0.0sh: line 1: 9491 Aborted (core dumped) '/mnt/hdd1/hao/lib64/R/bin/R' --no-save --slave 2>&1 < '/mnt/hdd1/hao/tmpdir/RtmpjOL8ff/file1ef04341ed00'

How could I fix this? Thanks in advance

JATC1024 commented 3 years ago

R version: 3.6.3 UDUNITS version: 2.0.4

Enchufa2 commented 3 years ago

That's the only output? Can you install other packages?

JATC1024 commented 3 years ago

Looks like the root of the error comes from here:

Error in `/mnt/hdd1/hao/lib64/R/bin/exec/R': free(): invalid pointer: 0x0000000003243578 ======= Backtrace: =========
/lib64/libc.so.6(+0x81329)[0x7f437a843329]
/mnt/hdd1/hao/rlibs/00LOCK-units/00new/units/libs/units.so(_ZN4Rcpp9exception18record_stack_traceEv+0x1ba)[0x7f436fab9d6a]
/mnt/hdd1/hao/rlibs/00LOCK-units/00new/units/libs/units.so(_ZN4Rcpp9exceptionC2EPKcb+0x7a)[0x7f436faba07a]
/mnt/hdd1/hao/rlibs/00LOCK-units/00new/units/libs/units.so(ZN4Rcpp4stopIJPcEEEvPKcDpOT+0x3f)[0x7f436fac06df]
/mnt/hdd1/hao/rlibs/00LOCK-units/00new/units/libs/units.so(_ZN4Rcpp17finalizer_wrapperI7ut_unitXadL_Z7ut_freeEEEEvP7SEXPREC+0x0)[0x7f436fac0090]
/mnt/hdd1/hao/rlibs/00LOCK-units/00new/units/libs/units.so(_units_R_ut_parse+0x64)[0x7f436fab5d14]

I can install other packages

JATC1024 commented 3 years ago

I can install it on another machine so it probably has something to do with the environment, though I have no idea what it is.

Enchufa2 commented 3 years ago

Try with a newer version of UDUNITS. If that's not the issue, then it's something with your particular environment, which I see is not standard, and we cannot help you with that, sorry.

JATC1024 commented 3 years ago

I'm afraid so. I'll post a comment here if I'm able to solve it somehow.

JATC1024 commented 3 years ago

It seems that some of my R packages got messed up. I am able to install units now after installing a brand new R from source. I also need to change --libdir when configuring it so that it does not use existing libraries installed by the previous R binary.