r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
8 stars 2 forks source link

r-universe and Java 17 #412

Closed TanguyBarthelemy closed 1 month ago

TanguyBarthelemy commented 1 month ago

Hi, I was wondering why do the versions of Java used depend on the operating system (Linux, MacOS, Windows). Currently, I'm trying to build some packages (rjd3toolkit for example) and in the GitHub action used to build the package, a different version of Java is used according to the OS or something else ?

On r-universe, my package depends on Java >= 17 (here openjdk 21):

image

But some GHA failed because of the java version.

R devel - Windows:

2024-05-18T04:42:18.4175328Z Error: package or namespace load failed for 'rjd3toolkit':
2024-05-18T04:42:18.4176845Z  .onLoad failed in loadNamespace() for 'rjd3toolkit', details:
2024-05-18T04:42:18.4177900Z   call: fun(libname, pkgname)
2024-05-18T04:42:18.4178456Z   error: Your java version is 1.8.0_412.  N or higher.

R release - Windows:

2024-05-18T04:42:07.5341301Z Error: package or namespace load failed for 'rjd3toolkit':
2024-05-18T04:42:07.5342293Z  .onLoad failed in loadNamespace() for 'rjd3toolkit', details:
2024-05-18T04:42:07.5342977Z   call: fun(libname, pkgname)
2024-05-18T04:42:07.5343538Z   error: Your java version is 1.8.0_412.  N or higher.

R oldrel - Windows:

2024-05-18T04:42:15.1587188Z Error: package or namespace load failed for 'rjd3toolkit':
2024-05-18T04:42:15.1588122Z  .onLoad failed in loadNamespace() for 'rjd3toolkit', details:
2024-05-18T04:42:15.1589132Z   call: fun(libname, pkgname)
2024-05-18T04:42:15.1589665Z   error: Your java version is 1.8.0_412.  N or higher.

R release - MacOS:

2024-05-18T04:42:33.7684360Z echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
...
2024-05-18T04:43:02.1279760Z Error: package or namespace load failed for ‘rjd3toolkit’:
2024-05-18T04:43:02.1280720Z  .onLoad failed in loadNamespace() for 'rjd3toolkit', details:
2024-05-18T04:43:02.1281780Z   call: fun(libname, pkgname)
2024-05-18T04:43:02.1282390Z   error: Your java version is 11.0.23.  N or higher.

R oldrel - MacOS:

2024-05-18T04:42:31.3303900Z echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
...
2024-05-18T04:42:55.4396520Z Error: package or namespace load failed for ‘rjd3toolkit’:
2024-05-18T04:42:55.4397590Z  .onLoad failed in loadNamespace() for 'rjd3toolkit', details:
2024-05-18T04:42:55.4398340Z   call: fun(libname, pkgname)
2024-05-18T04:42:55.4398940Z   error: Your java version is 11.0.23.  N or higher.

Is it possible to specify the java version (maybe in the packages.json file?

Thank you

jeroen commented 1 month ago

Thanks, I think it should be fixed now. Can you try again?

jeroen commented 1 month ago

Your build passes now: https://github.com/r-universe/tanguybarthelemy/actions/runs/9099280527/job/25216366643

TanguyBarthelemy commented 1 month ago

Ok thank you, I retried this morning the failed builds. I'll now concentrate on the error on the source and WASM builds!

jeroen commented 1 month ago

I don't think Java works in WASM, so you can probably ignore those :)

TanguyBarthelemy commented 1 month ago

Thank you for your quick answers!