Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906065 - sci-libs/tensorflow-2.11.9 Bazel error while trying to build tensorflow and jdk 17
Summary: sci-libs/tensorflow-2.11.9 Bazel error while trying to build tensorflow and j...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-05-10 12:02 UTC by Lemon Lime
Modified: 2023-05-30 15:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lemon Lime 2023-05-10 12:02:12 UTC
I was trying to build tensorflow and I am getting the following error:

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:170)
	at com.google.devtools.build.lib.exec.FileWriteStrategy.beginWriteOutputToFile(FileWriteStrategy.java:58)
	at com.google.devtools.build.lib.analysis.actions.FileWriteActionContext.beginWriteOutputToFile(FileWriteActionContext.java:49)
	at com.google.devtools.build.lib.analysis.actions.AbstractFileWriteAction.beginExecution(AbstractFileWriteAction.java:66)
	at com.google.devtools.build.lib.actions.Action.execute(Action.java:133)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$5.execute(SkyframeActionExecutor.java:907)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1076)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:1031)
	at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:152)
	at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:91)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:492)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:856)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.computeInternal(ActionExecutionFunction.java:349)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:169)
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:590)
	at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:382)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
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 @43c3d622
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	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)
	... 21 more
 * ERROR: sci-libs/tensorflow-2.11.0::gentoo failed (compile phase):
 *   ebazel failed
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 4687:  Called ebazel 'build' '//tensorflow:libtensorflow_framework.so' '//tensorflow:libtensorflow.so'
 *   environment, line 3117:  Called die
 * The specific snippet of code:
 *       "${@}" || die "ebazel failed"
 *
 * If you need support, post the output of `emerge --info '=sci-libs/tensorflow-2.11.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-libs/tensorflow-2.11.0::gentoo'`.
 * The complete build log is located at '/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.11.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.11.0/temp/environment'.
 * Working directory: '/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.11.0/work/tensorflow-2.11.0-python3_10'
 * S: '/var/tmp/notmpfs/portage/sci-libs/tensorflow-2.11.0/work/tensorflow-2.11.0'


It seems to be related to the following thread on Github https://github.com/bazelbuild/bazel/issues/17103. Seems to be an issue on FreeBSD as well
Comment 1 Lemon Lime 2023-05-15 19:41:34 UTC
Fixed with:
https://bugs.gentoo.org/906160
Comment 2 Larry the Git Cow gentoo-dev 2023-05-21 19:32:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fff6e7099ea6a9cf790d54fcd5aef3105111ab97

commit fff6e7099ea6a9cf790d54fcd5aef3105111ab97
Author:     Tomas Fabrizio Orsi <torsi@fi.uba.ar>
AuthorDate: 2023-05-11 18:30:39 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2023-05-21 19:32:37 +0000

    dev-util/bazel: version bump
    
    Closes: https://bugs.gentoo.org/906160
    Closes: https://github.com/gentoo/gentoo/pull/31001
    Bug: https://bugs.gentoo.org/906065
    
    Signed-off-by: Tomas Fabrizio Orsi <torsi@fi.uba.ar>
    Signed-off-by: Jason Zaman <perfinion@gentoo.org>

 dev-util/bazel/Manifest           |  1 +
 dev-util/bazel/bazel-6.2.0.ebuild | 96 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+)
Comment 3 Lemon Lime 2023-05-30 15:16:49 UTC
Bug fixed using new bazel version, which was added to the tree