SCM

[#6588] undefined symbol: is_redescender

Date:
2018-06-25 19:20
Priority:
4
State:
Closed
Submitted by:
Matt Dowle (mdowle)
Assigned to:
Martin Maechler (mmaechler)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
None
Resolution:
Fixed
URL:
Summary:
undefined symbol: is_redescender

Detailed description
Hi,

I'm seeing the following error when installing robustbase 0.93-1 (released 2 days ago) on Ubuntu. I've searched online but couldn't find anything related to this error.

> install.packages("robustbase")
Installing package into ‘/home/mdowle/build/revdeplib’
(as ‘lib’ is unspecified)
trying URL 'http://cloud.r-project.org/src/contrib/robustbase_0.93-1.tar.gz'
Content type 'application/x-gzip' length 2957641 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

* installing *source* package ‘robustbase’ ...
** package ‘robustbase’ successfully unpacked and MD5 sums checked
** libs
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c R-rng4ftn.c -o R-rng4ftn.o
f95 -fpic -g -O2 -c eigen.f -o eigen.o
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c init.c -o init.o
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c lmrob.c -o lmrob.o
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c mc.c -o mc.o
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c monitor.c -o monitor.o
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c qn_sn.c -o qn_sn.o
f95 -fpic -g -O2 -c rf-common.f -o rf-common.o
f95 -fpic -g -O2 -c rffastmcd.f -o rffastmcd.o
f95 -fpic -g -O2 -c rfltsreg.f -o rfltsreg.o
f95 -fpic -g -O2 -c rllarsbi.f -o rllarsbi.o
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c rob-utils.c -o rob-utils.o
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c rowMedians.c -o rowMedians.o
gcc -I"/home/mdowle/build/R-3.5.0/include" -DNDEBUG -I/usr/local/include -fpic -O0 -g -c wgt_himed.c -o wgt_himed.o
gcc -shared -L/usr/local/lib -o robustbase.so R-rng4ftn.o eigen.o init.o lmrob.o mc.o monitor.o qn_sn.o rf-common.o rffastmcd.o rfltsreg.o rllarsbi.o rob-utils.o rowMedians.o wgt_himed.o -L/home/mdowle/build/R-3.5.0/lib -lRlapack -L/home/mdowle/build/R-3.5.0/lib -lRblas -lgfortran -lm -lquadmath -lgfortran -lm -lquadmath
installing to /home/mdowle/build/revdeplib/robustbase/libs
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** byte-compile and prepare package for lazy loading
Creating a generic function from function ‘chgDefaults’ in package ‘robustbase’
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘robustbase’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/mdowle/build/revdeplib/robustbase/libs/robustbase.so':
/home/mdowle/build/revdeplib/robustbase/libs/robustbase.so: undefined symbol: is_redescender
Error: loading failed
* DONE (robustbase)

The downloaded source packages are in
‘/tmp/RtmpbWmLVY/downloaded_packages’
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04 LTS

Matrix products: default
BLAS: /home/mdowle/build/R-3.5.0/lib/libRblas.so
LAPACK: /home/mdowle/build/R-3.5.0/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0
>

Best, Matt

Comments:

Message  ↓
Date: 2018-07-20 14:40
Sender: Martin Maechler

This should be fixed in robustbase_0.93-1.1 which has been on CRAN for about 18 hours now.

Please let us now if the fix (using 'static inline') still fails.

Date: 2018-07-12 02:33
Sender: Matt Dowle

Hi Martin,
Yes, you're right. Replacing 'inline' by 'static inline' works.
Best, Matt

Date: 2018-07-11 21:08
Sender: Martin Maechler

Thanks, Matt.
This is my largest vacation / traveling time for more than 10 years, and I had computer problems in addition: Hence a late reaction.
Your diagnosis is definitely helpful... and I should have read it to the end first, before spending much time on the third (!!) report for the same problem.

Indeed this must be a bit compiler/library specific as neither I nor the different CRAN machines had seen the problem.

Rather than making it a macro (which is ok here, but the plan was to be more future-proof and macros ... dada dada,

can you try if replacing 'inline' by 'static inline' solves the problem as well?

Thank you,
Martin

Date: 2018-06-28 01:43
Sender: Matt Dowle

It appears to be related the inline definition of is_redescender in robustbase.h. I see that there is no problem on CRAN, so perhaps it is my compiler. I'm using gcc 7.3.0 on Ubuntu 18.04, further details pasted below.

The workaround is I changed line 62 of robustbase.h to the following :
#define is_redescender(ipsi) (ipsi!=0)
and this fixed it and the package installs and loads fine now.

In R_psifun on line 533 of lmrob.c, there is a #define of for_i_n_NA and then is_redescender is used within a switch case. When is_redescender is an inline function, it appears the compiler is not catching that and is not replacing the usage on line 556 with the inline function, rather leaving that function to be resolved at link time. It feels to me like a compiler bug, perhaps. I couldn't find any reports online of problems in this regard with gcc 7.3.0, though. Using a #define of is_redescender instead of declaring it as an inline function, works. Perhaps, owing to the triviality of the current version of the is_redescender logic, compiler optimization is coming into play and interacting to result in a compiler bug.

The reason I looked at it is because package PCRedux suggests data.table and is therefore in my reverse dependency check list. PCRedux imports robustbase.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-16ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --with-as=/usr/bin/x86_64-linux-gnu-as --with-ld=/usr/bin/x86_64-linux-gnu-ld --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)
$

Attached Files:

Changes

Field Old Value Date By
ResolutionNone2018-07-20 14:40mmaechler
status_idOpen2018-07-20 14:40mmaechler
close_dateNone2018-07-20 14:40mmaechler
priority32018-07-11 21:00mmaechler
assigned_tonone2018-07-11 21:00mmaechler
Thanks to:
Vienna University of Economics and Business Powered By FusionForge