[R-pkg-devel] set pkg_config for 3rd party software

Ralf Stubner r@||@@tubner @end|ng |rom gm@||@com
Fri Sep 6 11:22:15 CEST 2019


On Thu, Sep 5, 2019 at 6:36 PM Martin Maechler
<maechler using stat.math.ethz.ch> wrote:
> For me (on Fedora 30)
>
>   $ R CMD config LDFLAGS
>   -L/usr/lib64

This looks wrong. I would expect that /usr/lib64 is one of the
standard directories that are searched anyway. So why put it into the
very beginning of the search? BTW, this does not happen on Debian:

$ R CMD config LDFLAGS
-Wl,-z,relro

> Yes, on a machine with root permission I can hack around to get
> what I want,  but of course I'd really like   'R CMD INSTALL ..'
> to do the "right thing"
> just from my  configure  plus src/Makevars{.in}  files.
> Yes, I tried  'LDFLAGS = ' (to set it to "empty") in
> src/Makevars*  but that did not help either.

I see no way to correct this within a package. The only thing that
comes to mind is adding a test in `configure{.ac}` that will fail when
a to old version of libmpfr is actually used for linking. If the test
fails, one can at least give an informative message. Then either an
admin corrects the configuration or the user overwrites LDFLAS in
~/.R/Makevars.

cheerio
ralf



More information about the R-package-devel mailing list