pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/58985: devel/bazel hard-codes /usr/pkg/bin/bash



>Number:         58985
>Category:       pkg
>Synopsis:       devel/bazel hard-codes /usr/pkg/bin/bash
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 12 08:20:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The BashBazelD Foundation
>Environment:
>Description:
ESC[32m[11 / 42]ESC[0m [Prepa] Executing genrule //tools/osx:xcode-locator-genrule
^MESC[1AESC[KESC[31mESC[1mERROR: ESC[0m/tmp/pkgbuild/2024Q4/devel/bazel/work/tools/osx/BUILD:37:8: Executing genrule //tools/osx:xcode-locator-genrule failed: (Exit -1): bash failed: error executing command (from target //tools/osx:xcode-locator-genrule) 
  (cd /tmp/bazel_CrnQE9Pp/out/execroot/io_bazel && \
  exec env - \
    PATH=/tmp/pkgbuild/2024Q4/devel/bazel/work/.cwrapper/bin:/tmp/pkgbuild/2024Q4/devel/bazel/work/.buildlink/bin:/tmp/pkgbuild/2024Q4/devel/bazel/work/.gcc/bin:/tmp/pkgbuild/2024Q4/devel/bazel/work/.tools/bin:/pkg/2024Q4/java/openjdk11/bin:/pkg/2024Q4/bin:/bin:/sbin:/usr/bin:/usr/sbin:/pbulk/2024Q4/pkg/bin:/pkg/2024Q4/bin:/pkg/2024Q4/bin \
  /usr/pkg/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cp tools/osx/xcode_locator_stub.sh bazel-out/netbsd-opt/bin/tools/osx/xcode-locator')
# Configuration: dd6ce88338648350e1482b39e7cffb45491370f361102cf20b01029ff6a790d3
# Execution platform: //:default_host_platform
Action failed to execute: java.io.IOException: Cannot run program "/usr/pkg/bin/bash" (in directory "/tmp/bazel_CrnQE9Pp/out/execroot/io_bazel"): error=2, No such file or directory

(Also: this build output is filled with terminal colour escape sequences.  Can we disable them?)

Grepping for /usr/pkg in pkgsrc/devel/bazel also turns up various other patches that bake other paths under it into bazel, like /usr/pkg/java/openjdk11.
>How-To-Repeat:
1. bootstrap pkgsrc into a prefix other than /usr/pkg, e.g. /opt/pkg or ~/pkg
2. build devel/bazel
>Fix:
1. patch to use @BASH@ instead of /usr/pkg/bin/bash, @OPENJDK_PREFIX@ instead of /usr/pkg/java/openjdk11, &c.
2. SUBST to replace @BASH@ by ${TOOLBASE}/bin/bash, @OPENJDK_PREFIX@ by ${LOCALBASE}/java/openjdk11 or whatever, &c.



Home | Main Index | Thread Index | Old Index