Package Details: bazel-buildtools 7.1.1-1

Git Clone URL: (read-only, click to copy)
Package Base: bazel-buildtools
Description: A bazel BUILD file formatter and editor
Upstream URL:
Licenses: Apache-2.0
Submitter: zasdfgbnm
Maintainer: FantasqueX
Last Packager: FantasqueX
Votes: 6
Popularity: 0.034809
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:
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.base/java.util.concurrent.ThreadPoolExecutor$
    at java.base/
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(
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(
    at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(
    at java.base/java.lang.reflect.Constructor.setAccessible(
    ... 21 more
==> ERROR: A failure occurred in build().

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


After fresh rebuild, install it works.


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
@@ -15,6 +15,6 @@ package() {
        install -d "$pkgdir"/usr/bin
        install -Dm755 buildifier buildozer unused_deps $pkgdir/usr/bin/
-         'f1e85ee5d83cd19ab2ec5281ad8246c9'
-         'b42cc398eca7d59bdc80e77408d12236')
+         '9e2f79e043960e6dd2dbd17676e46466'
+         '95f2df2d9682230b68b996936e432c94')