handsome-businessperson-4981
01/09/2025, 6:55 AMGOOS=linux GOARCH=arm64 go build ...
I am unable to find a way to do this using the existing go_binary()
target. Is this not supported? I am using Pants v2.23gifted-lunch-20593
01/09/2025, 3:45 PMhandsome-businessperson-4981
01/09/2025, 10:17 PMhandsome-businessperson-4981
01/09/2025, 11:09 PMshell_command()
but I can't figure out how to make it execute the command when I call pants package ::
gifted-lunch-20593
01/10/2025, 10:36 AMhandsome-businessperson-4981
01/10/2025, 2:02 PMgo_package()
local_environment(
name="lambda_arch",
golang_subprocess_env_vars = [
"GOOS=linux",
"GOARCH=arm64",
],
)
go_binary(
name="bootstrap",
environment="::lambda_arch",
)
... but pants -ldebug package ::
failed with:
00:56:48.81 [DEBUG] Completed: Link Go binary: ./package_analyzer
00:56:48.81 [DEBUG] Completed: Scheduling: Link Go binary: ./package_analyzer
00:56:48.81 [DEBUG] Completed: Download and analyze all third-party Go packages - environment:lambda_arch
00:56:48.81 [DEBUG] Completed: Generate `go_third_party_package` targets from `go_mod` target - environment:lambda_arch
00:56:48.81 [DEBUG] Completed: Find targets from input specs
00:56:48.81 [DEBUG] Completed: `package` goal
00:56:48.81 [DEBUG] computed 1 nodes in 0.269227 seconds. there are 2086 total nodes.
00:56:48.81 [ERROR] 1 Exception encountered:
Engine traceback:
in `package` goal
ProcessExecutionFailure: Process 'Link Go binary: ./package_analyzer' failed with exit code 1.
stdout:
stderr:
runtime.rt0_go: relocation target runtime.tlsinit not defined
handsome-businessperson-4981
01/10/2025, 2:03 PMgifted-lunch-20593
01/10/2025, 2:04 PMhandsome-businessperson-4981
01/10/2025, 2:43 PMbright-musician-12219
03/20/2025, 4:02 PM