Skip to content
Prev 28222 / 29559 Next

cannot install rgdal after updating to fedora32

Vero, Ista, and Roger,

I used Ista's help to get a Docker container in which I could try this.

Yes, there does seem to be something wrong with the R packages for
Fedora 32, as I am also getting this when installing packages (not
just rgdal)

Warning in file.create(f.tg) :
  cannot create file '/usr/share/doc/R/html/packages.html', reason 'No
such file or directory'
Warning in utils::make.packages.html(.Library, docdir = R.home("doc")) :
  cannot update HTML package index

I believe that they (Fedora) also did not include building the HTML
documentation for R.

The particular LDFLAG that is causing the issue seems to be this one,

    LDFLAGS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'

as that fails with the same message, but using all the others (the
following line used the additional printing of LDFLAGS, thank you
Roger!), as in the following,

    install.packages('rgdal', repos="https://R-Forge.R-project.org",
configure.vars=c("LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now'"))

does work.  I don't know if that helps you any, Roger, but I thought
that might help if someone reports this to Fedora.  I agree with you
that they probably should be dropped.

I am confused by them having the compiler syntax `-Wl,<linker options,
comma separated>`.  I think if those were CFLAGS, that would result in
a line like

    ld -z relro --as-needed -z now

where these are the explanations from the `ld` man page.

    -z relro                    Create RELRO program header (default)
    -z now                      Mark object non-lazy runtime binding
    --as-needed                 Only set DT_NEEDED for following
dynamic libs if used

I am not working on Fedora, so my ability to pursue further is limited.

Thanks, Roger, for providing a solution so quickly!

-- bennet
On Sun, Jun 28, 2020 at 1:30 PM Veronica Andreo <veroandreo at gmail.com> wrote: