See R-exts 5.8: you cannot link directly to other package or its
libraries. It is not possible is a portable way across platforms for many
reasons including those that you are hitting here. If a package exposes
some C-level functionality to other packages, you can use it and R provides
a way to obtain access to the function - see R-exts 5.4.3.
There are ways to make a *static* library available, because that allows
your package to be installed without actually requiring the presence of the
other package at install time. But, again, the package has to make it
explicitly available since you cannot guarantee that your package won't
break as it's technically internal to the other package. That said, it
seems the there is a bug in float since it provides the wrong flags to link
against its library (float:::ldflags()). It should really just use
system.file("libs","libfloat.a",package="float") - you may want to contact
the maintainer of float about that. Flags cannot be hard-coded at install
time because the package can be installed in any location, moreover staged
install is preformed in a direction separate from the R library anyway.
Cheers,
Simon
On Jul 25, 2019, at 8:18 AM, Dmitriy Selivanov <
selivanov.dmitriy at gmail.com> wrote:
is done in configure script and with installation from source it works
fine. But there is an issue when installing rsparse from CRAN binaries.
this case rsparse shared library references the path of the float shared
library which is recorded during the build on CRAN machine. And it is
different from the path on user machine (On cran it is
@rpath/Volumes/SSD-Data/Builds/R-dev-web/QA/Simon/packages/el-capitan-x86_64/Rlib/3.6/float/libs/float.so).
In
fact the warning is produced by CRAN checks -
)
I've tried to fix this be using `.onLoad` hook where I run
`install_name_tool -change ...`, but it seems `dyn.load` is called before
.onLoad hook...
What will be the correct way to solve this issue?
Thanks in advance.
--
Regards
Dmitriy Selivanov
[[alternative HTML version deleted]]