[R] make install libgfortran.so.5: cannot open shared object file: No such file or directory; conftest.c:1:10: fatal error: jni.h: No such file or directory

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Sun Nov 20 20:26:23 CET 2022

On Sun, 20 Nov 2022 14:03:34 -0500
Rob Kudyba <rk3199 using columbia.edu> wrote:

> /path/to/gcc-11.2/lib is definitely in LD_LIBRARY_PATH when loading
> the GCC 11.2 module.
> If using the /path/to/R-4.2.2/etc/ldpaths where would I put the
> correct path? I would've hoped the configure/make process would've
> found this automatically.

Interesting that bin/R works but calling bin/R from what amounts to
`make -C src/library install` doesn't. I think that the failing step is
the following command:

@$(ECHO) "  building HTML index ..."
@$(ECHO) "utils:::make.packages.html(.Library, verbose=FALSE,
docdir=\"$(DESTDIR)${rdocdir}\")" | \

I don't see a reason for Make to lose the LD_LIBRARY_PATH when
launching R like this.

Can you see the failing step in the `make -d install` output? There
will be a lot of text, most of it unrelated, unfortunately.

If something loses the LD_LIBRARY_PATH environment variable on the way
from Make to R, hard-coding it in etc/ldpaths should work around the
problem, but it may be hard to find out what went wrong.

If you run `mkfifo /tmp/1` and insert `read foo </tmp/1` into
etc/ldpaths, it should hang until you write something into /tmp/1.
Using this, it should be possible to inspect /proc/${pid}/environ for
the whole process tree from the parent Make process to the shell that's
about to launch R. Can you find the first process that lacks the proper
LD_LIBRARY_PATH environment variable?

Best regards,

More information about the R-help mailing list