Closed llrs closed 1 year ago
You need additionally rsync
i.e. dnf install rsync
so that you can type (inside the svn checkout .. R source)
./tools/rsync-recommended
And the same applies to Ubuntu.
Now, after the above rsync-recommended
indeed, ..../configure
ends nicely showing all capabilities, i.e., ending with
Interfaces supported: X11, tcltk
External libraries: pcre2, readline, curl
Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU
Options enabled: shared BLAS, R profiling
Capabilities skipped:
Options not enabled: memory profiling
Recommended packages: yes
as it should be (IMO).
Using make
(in a "builddir" != "srcdir") proceeds nicely for a long time, then I see
...............
building/updating vignettes for package 'stats' ...
processing 'reshape.Rnw'
make[1]: Leaving directory '/usr/local/app/R/inst/R-devel/src/library'
make[1]: Entering directory '/usr/local/app/R/inst/R-devel'
configuring Java ...
Java interpreter : /usr/bin/java
Java version : 17.0.5
Java home path : /usr/lib/jvm/java-17-openjdk-17.0.5.0.8-2.fc36.x86_64
Java compiler : not present
Java headers gen.:
Java archive tool:
trying to compile and link a JNI program
detected JNI cpp flags :
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
make[2]: Entering directory '/tmp/Rjavareconf.p4WrOU'
gcc -I"/usr/local/app/R/inst/R-devel/include" -DNDEBUG -I/usr/local/include -fpic \
-g -O2 -c conftest.c -o conftest.o
conftest.c:1:10: fatal error: jni.h: No such file or directory
1 | #include <jni.h>
| ^~~~~~~
compilation terminated.
make[2]: *** [/usr/local/app/R/inst/R-devel/etc/Makeconf:176: conftest.o] Error 1
make[2]: Leaving directory '/tmp/Rjavareconf.p4WrOU'
Unable to compile a JNI program
JAVA_HOME : /usr/lib/jvm/java-17-openjdk-17.0.5.0.8-2.fc36.x86_64
Java library path:
JNI cpp flags :
JNI linker flags :
Updating Java configuration in /usr/local/app/R/inst/R-devel
Done.
I can also quickly reproduce the above output (when inside the build directory), I do
bin/R CMD javareconv
Now that is not really crucial functionality, but (only) needed when installing packages such as CRAN's https://cran.r-project.org/package=rJava or one of its dozens of reverse dependencies.
Still in my home setup, I do have (and want) a java compiler that R can use when needed, and so instead of the above not present
, I get
Java compiler : /usr/bin/javac
and also .. Java archive tool: /usr/bin/jar
Probably a full java development kit is comparatively large, and so you may well mention this among the "extras".
Note that the R Administration manual contains some more details (not easy to understand if you are not "java person"), e.g. https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#Java-support
R doesn't find the JDK unless we set JAVA_HOME
for the configure script.
@llrs You could take the installation of the JDK (default-jdk
for Ubuntu, java-devel
for Fedora) to a separate optional step, as suggested by @mmaechler, and then add that, in such a case, the proper JAVA_HOME
should be exported before running ./configure
, i.e.,
$ export JAVA_HOME=<path_to_jdk>
where this path is /usr/lib/jvm/default-java
for Debian/Ubuntu, according to Dirk's recipe, and /usr/lib/jvm/jre
for Fedora, see the spec.
The guide at https://cran.r-project.org/bin/linux/fedora/ says to keep R updated on Fedora using sudo dnf install R.
Using dnf to update R leaves me with R version 4.1.3
The current version appears to be 4.2.2
What is the issue here? How can I keep my R package up to date on Fedora?
@AlexElledge Unfortunately we lagged behind updating R for Fedora 36 due to personal and organizational issues, so we have v4.1.3 there. Fedora 37 is launched this week with R 4.2.2.
I think this should be discussed more publicly on R-SIG-Fedora (the dedicated mailing list): https://stat.ethz.ch/mailman/listinfo/r-sig-fedora
But as Inaki @Enchufa2 has replied already:
Note that we (all of Math + Stats at ETH Zurich) update our Fedora only once per academic year .. and only install the even numbers, i.e. F 28, 30, 32, 34, and now F 36 but then only next summer (academic break) F 38.
But then, we now can run podman run -ti fedora
and that will soon be F 37 ?
But then, we now can run
podman run -ti fedora
and that will soon be F 37 ?
Not exactly. Running this pulls fedora:latest
, which is equivalent to fedora:rawhide
, which will become F38. F37 was branched in August, and so you need to specify podman run -ti fedora:37
to run this version.
@AlexElledge And now that we are at it, when there's a mismatch between the R version in the current release of Fedora and rawhide, there's a straighforward way to run the latest R version (and any software in rawhide, for that matter) via toolbox, as explained here.
@Enchufa2 thanks for the info! I'll be upgrading to 37 in a couple weeks so that's good to know. I don't really know what the process is for pushing updates to the official repository is, but if it's something you can train someone on fairly easily then I would volunteer to help in the future.
Thanks @mmaechler and @Enchufa2 for the feedback! I included rsync but I left the java dependency as it was to not complicate the process.
I wait to merge #74 before merging this @hturner and @nbenn, but if you have any other feedback, the java installation/dependency or other, let me know.
I agree to leave the java dependency out for now, as our focus is on a straight-forward setup for people contributing to base R. So I've merged this in.
Thanks to @Enchufa2 I got the dependencies in Fedora.
This PR is meant to merge after the windows one at #74