libgdx / libgdx/packr

Packing with Oracle JDK causes error

Open
#227 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.6k
Forks
174
PR merge metrics
No merged PRs in 30d

Description

when building with official Oracle JDK archives There is an error

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
java.nio.file.NoSuchFileException: dist/linux64/tmp/jdk-17.0.4/LICENSE
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:471)
        at java.base/java.nio.file.Files.createSymbolicLink(Files.java:1069)
        at com.badlogicgames.packr.ArchiveUtils.extractTarArchive(ArchiveUtils.java:196)
        at com.badlogicgames.packr.ArchiveUtils.extractArchive(ArchiveUtils.java:127)
        at com.badlogicgames.packr.Packr.copyAndMinimizeJRE(Packr.java:406)
        at com.badlogicgames.packr.Packr.pack(Packr.java:175)
        at com.badlogicgames.packr.Packr.main(Packr.java:75)

It is because Oracle using a symbolic link on LICENSE file and in archive it seems like an empty file, but it is actually linked to legal/java.base/LICENSE.
When it is unpacked, it is working good.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ArchiveUtils.extractTarArchive at the failing symlink extraction, then trace its callers through ArchiveUtils.extractArchive and Packr.copyAndMinimizeJRE. Reproduce packing with the official Oracle JDK archive and verify that the LICENSE symlink is handled without the NoSuchFileException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.