acxz / pkgbuilds

PKGBUILDs for Arch Linux
25 stars 46 forks source link

[python-dm-tree] Bazel build failure with `java.lang.reflect.InaccessibleObjectException` #150

Closed HippocampusGirl closed 1 year ago

HippocampusGirl commented 3 years ago

When trying to upgrade python-dm-tree, I get an java.lang.reflect.InaccessibleObjectException. Is there a known workaround?

==> Making package: python-dm-tree 0.1.6-1 (Thu 23 Sep 2021 10:55:40 AM CEST)
==> Retrieving sources...
  -> Found python-dm-tree-0.1.6
==> Validating source files with sha256sums...
    python-dm-tree-0.1.6 ... Passed
==> Making package: python-dm-tree 0.1.6-1 (Thu 23 Sep 2021 10:55:41 AM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found python-dm-tree-0.1.6
==> Validating source files with sha256sums...
    python-dm-tree-0.1.6 ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting python-dm-tree-0.1.6 with bsdtar
==> Sources are ready.
python-dm-tree-0.1.6-1: parsing pkg list...
==> Making package: python-dm-tree 0.1.6-1 (Thu 23 Sep 2021 10:55:43 AM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/tree
copying tree/tree_benchmark.py -> build/lib.linux-x86_64-3.9/tree
copying tree/__init__.py -> build/lib.linux-x86_64-3.9/tree
copying tree/tree_test.py -> build/lib.linux-x86_64-3.9/tree
running build_ext
bazel build //tree:_tree --symlink_prefix=build/temp.linux-x86_64-3.9/bazel- --compilation_mode=opt
Starting local Bazel server and connecting to it...
INFO: Analyzed target //tree:_tree (25 packages loaded, 374 targets configured).
INFO: Found 1 target...
[0 / 29] [Prepa] BazelWorkspaceStatusAction stable-status.txt
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.ExceptionInInitializerError
        at com.google.devtools.build.lib.actions.ParameterFile.writeContent(ParameterFile.java:118)
        at com.google.devtools.build.lib.actions.ParameterFile.writeParameterFile(ParameterFile.java:111)
        at com.google.devtools.build.lib.analysis.actions.ParameterFileWriteAction$ParamFileWriter.writeOutputFile(ParameterFileWriteAction.java:175)
        at com.google.devtools.build.lib.exec.FileWriteStrategy.beginWriteOutputToFile(FileWriteStrategy.java:58)
        at com.google.devtools.build.lib.analysis.actions.AbstractFileWriteAction.beginExecution(AbstractFileWriteAction.java:66)
        at com.google.devtools.build.lib.actions.Action.execute(Action.java:127)
        at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$5.execute(SkyframeActionExecutor.java:855)
        at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1016)
        at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:975)
        at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:129)
        at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:81)
        at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:472)
        at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:834)
        at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:307)
        at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:477)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:398)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.String(byte[],byte) accessible: module java.base does not "opens java.lang" to unnamed module @13e39c73
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188)
        at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181)
        at com.google.devtools.build.lib.unsafe.StringUnsafe.<init>(StringUnsafe.java:75)
        at com.google.devtools.build.lib.unsafe.StringUnsafe.initInstance(StringUnsafe.java:56)
        at com.google.devtools.build.lib.unsafe.StringUnsafe.<clinit>(StringUnsafe.java:37)
        ... 19 more
error: command '/usr/bin/bazel' failed with exit code 37
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'python-dm-tree-0.1.6-1':
acxz commented 3 years ago

Just checked, I'm also getting the same error. Most likely an update in bazel causes the current build step to fail for dm-tree. This will be best solved upstream. If you could make an issue upstream and link it here for tracking that would be much appreciated.

acxz commented 3 years ago

Some more digging shows that they have moved over to using cmake instead of bazel as their build system, but have not released a version with cmake. https://github.com/deepmind/tree/issues/16#issuecomment-877072875

Take a look at the python-dm-tree-git package on the AUR. That installed fine for me. I'll go ahead and close this issue once a new version of dm-tree is released upstream without bazel.

HippocampusGirl commented 3 years ago

Thank you for looking into this :-)

acxz commented 1 year ago

Issue has been fixed in the latest release