Repository navigation
Fix deploying golang - #4373
Fix deploying golang#4373
Conversation
|
Independent reproduction on a clean Steps: docker run --rm -it ubuntu:24.04 bash
apt-get update && apt-get install -y sudo git ca-certificates
git clone --depth 1 https://github.com/cvmfs/cvmfs.git && cd cvmfs # 746d9e4
sudo ci/build_install_builddeps.sh
apt-get install -y ninja-build # not covered by the builddeps script
mkdir build && cd build
cmake -G Ninja -D BUILD_UNITTESTS=ON -D BUILD_GATEWAY=ON ../Output: I first hit this on WSL2 / Ubuntu 24.04 and assumed it might be specific to As far as I can tell the cause is that mkdir -p $externals_build_dir
mkdir -p $externals_install_dir/include
mkdir -p $externals_install_dir/libbut not mkdir -p $externals_install_dir/lib
+mkdir -p $externals_install_dir/binHappy to test any variant of the fix if that is useful. |
|
@andrey-utkin I think you'll need something like: diff --git a/externals/bootstrap.sh b/externals/bootstrap.sh
index cfbd99f77..2189c84d1 100755
--- a/externals/bootstrap.sh
+++ b/externals/bootstrap.sh
@@ -214,7 +214,7 @@ if [[ -v BUILTIN_EXTERNALS_LIST ]] && ! echo ";${BUILTIN_EXTERNALS_LIST};" | gre
else
missing_libs="libcrypto sha3"
- if [ x"$BUILD_GATEWAY" != x ] || [ x"$BUILD_DUCC" != x ] || [ x"$BUILD_SNAPSHOTTER" != x ]; then
+ if [ x"${BUILD_GATEWAY:-}" != x ] || [ x"${BUILD_DUCC:-}" != x ] || [ x"${BUILD_SNAPSHOTTER:-}" != x ]; then
required_go_minor_version="23"
if [ -n "$(command -v go)" ]; then
go_minor_version=`go version | { read _ _ v _; echo ${v#go}; } | cut -d '.' -f2`Just to note, all of the changed files are fast becoming obsolete. |
53de9d7 to
564ee86
Compare
I tried that path to double-check, and it still ends in the same failure: the Go 1. 2. Immediately afterwards that Go is unreachable for whatever runs next — $ /src/cvmfs/externals_install.x86_64.ubuntu24.04/go/bin/go version
go version go1.25.8 linux/amd64The 3. Besides the missing-
So the bootstrapped toolchain is silently downgraded on the way to the error. This may also be why the builddeps route looks clean elsewhere: with a system Go Since |
|
diff --git i/CMakeLists.txt w/CMakeLists.txt
index 9383533e2..f141b8b63 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -601,7 +601,19 @@ endif ()
# First check if we have golang available
#
if (BUILD_GATEWAY OR BUILD_DUCC OR BUILD_SNAPSHOTTER)
- find_program(GO_COMPILER go)
+ if (NOT CVMFS_GO_DIR AND NOT "$ENV{CVMFS_GO_DIR}" STREQUAL "")
+ set (CVMFS_GO_DIR "$ENV{CVMFS_GO_DIR}")
+ endif ()
+ find_program(GO_COMPILER go
+ HINTS ${CVMFS_GO_DIR} "${EXTERNALS_INSTALL_LOCATION}/go/bin")
if(NOT GO_COMPILER)
message(FATAL_ERROR "go compiler not found")
else() |
|
Thanks, that looks much cleaner than my bootstrap.sh idea. If it's OK with you, |
23a2e81 to
47671b9
Compare
I will work around this, but can we please have modern Bash on macos? |
134499e to
f849b0a
Compare
--> Building golang_rev2 + local library_build_dir=/usr/local/src/cvmfs/externals_build.x86_64.ubuntu24.04/build_golang_rev2 + print_hint Building golang_rev2 + local msg=Building golang_rev2 + echo --> Building golang_rev2 + pwd + local save_dir=/usr/local/src/cvmfs + cd /usr/local/src/cvmfs/externals_build.x86_64.ubuntu24.04/build_golang_rev2 + ./configureHook.sh + ./makeHook.sh + pwd /usr/local/src/cvmfs/externals_build.x86_64.ubuntu24.04/build_golang_rev2 + ls -ld /usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04 drwxr-xr-x 6 root root 4096 Jul 28 13:56 /usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04 + ls -l /usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04 total 16 drwxr-xr-x 4 root root 4096 Jul 28 12:26 crypto drwxr-xr-x 10 root root 4096 Mar 26 2025 go drwxr-xr-x 2 root root 4096 Jul 28 12:26 include drwxr-xr-x 2 root root 4096 Jul 28 12:26 lib + export GOROOT_FINAL=/usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/go + GOROOT_FINAL=/usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/go + rm /usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/bin/go rm: cannot remove '/usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/bin/go': No such file or directory + true + rm /usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/bin/gofmt rm: cannot remove '/usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/bin/gofmt': No such file or directory + true + ln -s /usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/go/bin/go /usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/bin/go ln: failed to create symbolic link '/usr/local/src/cvmfs/externals_install.x86_64.ubuntu24.04/bin/go': No such file or directory CMake Error at CMakeLists.txt:291 (message): bootstrapping failed
f849b0a to
5d3ff64
Compare
Clean slate build fails on Ubuntu 24.04 (seemed to not happen earlier). The first commit bash enables strict mode and tracing (
set -x) inexternals/bootstrap.shandexternals/*/src/*.shand adjusts the code. The second one addresses the initial failure.