Package Details: bazel-buildtools 7.1.1-1

Git Clone URL: https://aur.archlinux.org/bazel-buildtools.git (read-only, click to copy)
Package Base: bazel-buildtools
Description: A bazel BUILD file formatter and editor
Upstream URL: https://github.com/bazelbuild/buildtools
Licenses: Apache-2.0
Submitter: zasdfgbnm
Maintainer: FantasqueX
Last Packager: FantasqueX
Votes: 6
Popularity: 0.001577
First Submitted: 2018-03-15 20:23 (UTC)
Last Updated: 2024-05-14 02:12 (UTC)

Dependencies (1)

Required by (0)

Sources (2)

Latest Comments

bidskii commented on 2022-03-06 22:11 (UTC) (edited on 2022-03-13 01:12 (UTC) by bidskii)

@Kernald perhaps an option would be to look in /usr/lib/jvm for folders starting with java-11 and add matching paths to the PATH?

Also, is the dependency on JDK11 or JRE11? If it is JDK11 then I think you need depends=("java-environment=11")

Something like this should allow you to remove the OpenJDK 11 hard coding. If the user has multiple JDK11 environments installed then this would just choose the first one that archlinux-java lists

jvm_path=$(archlinux-java status | awk '{print $1}' | grep 11 | head -n1)
PATH="/usr/lib/jvm/${jvm_path}/bin/:$PATH" bazel build //buildifier //buildozer //unused_deps

Kernald commented on 2022-03-06 21:28 (UTC)

@bidskii I just updated the PKGBUILD to build with OpenJDK 11. The issue that I have with this is that it specifically hardcodes to OpenJDK 11, no other 11 JDK. Both options have the same issue as far as I can tell - I didn't find any other PKGBUILD that had a similar dependency on a specific Java version...

bidskii commented on 2022-02-28 21:42 (UTC)

@Kernald Unfortunately not. Having java-11 installed doesn't satisfy the dependency. java-11 needs to be installed AND activated as the default java instance on the system, see here. I think the PKGBUILD script (probably in prepare?) needs to check that java-11 is set as the default. Or, the bazel command in build needs to be wrapped up as shown here

Kernald commented on 2022-02-13 20:51 (UTC)

@bidskii Thanks! That should hopefully be fixed.

bidskii commented on 2022-02-13 04:54 (UTC)

I think this might have a dependence on java-11. When trying to build with java-17-openjdk as the default java environment I get the following error. However, building with java-11-openjdk as the default java environment succeeds with no errors.

Starting local Bazel server and connecting to it...
INFO: Analyzed 3 targets (119 packages loaded, 9733 targets configured).
INFO: Found 3 targets...
[10 / 80] 2 actions, 1 running
    Creating runfiles tree bazel-out/k8-fastbuild/bin/unused_deps/unused_deps_/unused_deps.runfiles; 0s local
    [Prepa] Creating source manifest for @com_google_protobuf//:protoc
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 @1700915
    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: A failure occurred in build().
    Aborting...

condy commented on 2020-02-27 11:29 (UTC)

@Kernald

After fresh rebuild, install it works.

Thanks

Kernald commented on 2020-02-16 00:28 (UTC)

@condy I just tried rebuilding it, it works fine. Maybe you have the previous version of the files in your folder? (the PKGBUILD doesn't rename them, so they always have the same name)

condy commented on 2020-02-13 11:27 (UTC)

==> Making package: bazel-buildtools 1.0.0-1 (Thu 13 Feb 2020 07:26:27 PM CST)
==> Retrieving sources...
  -> Found buildifier
  -> Found buildozer
  -> Found unused_deps
==> Validating source files with sha256sums...
    buildifier ... FAILED
    buildozer ... FAILED
    unused_deps ... FAILED
==> ERROR: One or more files did not pass the validity check!
Error downloading sources: bazel-buildtools

Validation failed

Eremiell commented on 2018-04-30 04:27 (UTC)

Not sure why, but t seems the hashes don't match. Maybe they were rebuilt? Anyway...

diff --git a/PKGBUILD b/PKGBUILD
index 4049b15..e01f9a5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,6 +15,6 @@ package() {
        install -d "$pkgdir"/usr/bin
        install -Dm755 buildifier buildozer unused_deps $pkgdir/usr/bin/
 }
-md5sums=('20bd6625605b44fc67820c3e175192fb'
-         'f1e85ee5d83cd19ab2ec5281ad8246c9'
-         'b42cc398eca7d59bdc80e77408d12236')
+md5sums=('aae6e0cc5249e5468e8f103097c08919'
+         '9e2f79e043960e6dd2dbd17676e46466'
+         '95f2df2d9682230b68b996936e432c94')