Closed nguyengg closed 1 year ago
Looks like that is new; let me see what we need to add
Resolved in #339
@nguyengg @ugol please verify
Can confirm that fixed it for me!
[Container] 2023/08/09 17:16:40 Running command goenv install -l \| grep ${TARGET_GOENV_VERSION} \|\| cp ${CODEBUILD_SRC_DIR}/.goenv/${TARGET_GOENV_VERSION} ${HOME}/.goenv/plugins/go-build/share/go-build/${TARGET_GOENV_VERSION}
40 | 1.21.0
41 |
42 | [Container] 2023/08/09 17:16:41 Running command goenv install -s ${TARGET_GOENV_VERSION}
43 | Downloading go1.21.0.linux-arm64.tar.gz...
44 | -> go1.21.0.linux-arm64.tar.gz
Thanks for the quick turnaround!
Can confirm that fixed it for me!
[Container] 2023/08/09 17:16:40 Running command goenv install -l \| grep ${TARGET_GOENV_VERSION} \|\| cp ${CODEBUILD_SRC_DIR}/.goenv/${TARGET_GOENV_VERSION} ${HOME}/.goenv/plugins/go-build/share/go-build/${TARGET_GOENV_VERSION} 40 | 1.21.0 41 | 42 | [Container] 2023/08/09 17:16:41 Running command goenv install -s ${TARGET_GOENV_VERSION} 43 | Downloading go1.21.0.linux-arm64.tar.gz... 44 | -> go1.21.0.linux-arm64.tar.gz
Thanks for the quick turnaround!
No problem. Glad I could help
Sidenote: if you're using AWS CodeBuild images (or any images) that cache goenv repo, you may still run into that problem until the image is updated. I was using an aarch64 image for which I had to manually check out goenv so the latest commit is always pulled.
Sidenote: if you're using AWS CodeBuild images (or any images) that cache goenv repo, you may still run into that problem until the image is updated. I was using an aarch64 image for which I had to manually check out goenv so the latest commit is always pulled.
See https://github.com/go-nv/goenv#aws-codebuild. I documented buildspec steps so you can pull the latest goenv in your prebuild phase.
I had something similar with:
# AWS CodeBuild Docker image for aarch64 doesn't install goenv so we must install it.
# Additionally, image for amd64 may hav outdated goenv as well so we should update it.
- |
if [[ ! -d "$HOME/.goenv" ]] ; then
git clone --depth 1 https://github.com/syndbg/goenv.git $HOME/.goenv
PATH="/root/.goenv/shims:/root/.goenv/bin:/go/bin:$PATH"
GOENV_DISABLE_GOPATH=1
else
git -C "$HOME/.goenv" pull --rebase
fi
Just wanted to leave a note in case others found this issue and thought it still unresolved because of outdated goenv.
Previous go-build files such as https://github.com/go-nv/goenv/blob/master/plugins/go-build/share/go-build/1.20.7 do not have links for install_bsd_arm so my build hasn't run into this build error before. But since https://github.com/go-nv/goenv/blob/master/plugins/go-build/share/go-build/1.21.0, these lines:
... are causing my build to fail with this error:
I included the
$PATH
in case it may help with debugging. Would anyone have an idea what's going on?