Date: 2018-07-11 21:08 Sender: Martin MaechlerThanks, 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 DowleIt 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)
$
|