Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/go-rdma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
# Pinned in lockstep with scripts/build-rdma.sh and
# scripts/setup-rdma-release-host.sh: this job copies vendor/s3rdma out of
# the checkout, so a floating main makes the build race whatever landed
# there. v0.6.0 is the first release carrying the libs3rdma transport.
# there. v1.0.0 installs the library as libminio with a stable soname.
- name: Checkout minio-cpp
uses: actions/checkout@v5
with:
repository: minio/minio-cpp
ref: v0.6.0
ref: v1.0.0
path: "minio-cpp"
persist-credentials: false

Expand All @@ -58,14 +58,14 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get -qy update
sudo apt-get -qy install libibverbs-dev librdmacm-dev libnuma-dev
sudo apt-get -qy install libibverbs-dev librdmacm-dev libnuma-dev zlib1g-dev

# Ubuntu's cmake is older than vcpkg needs, and vcpkg does not fetch its
# own on arm64, so provision it explicitly on both architectures.
- name: Set up CMake
uses: lukka/get-cmake@v4.4.2

- name: Build and install libminiocpp.so with RDMA
- name: Build and install libminio with RDMA
shell: bash
env:
MATRIX_ARCH: ${{ matrix.config.arch }}
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
env:
CGO_ENABLED: "1"
run: |
# libminiocpp is static, so minio-go's own -lminiocpp no longer drags in
# The library is static, so minio-go's own -lminio no longer drags in
# the C++ runtime or the vcpkg archives; name them from the one list the
# build script and goreleaser config also use.
export CGO_LDFLAGS="-L/usr/local/lib $(cat scripts/rdma-cgo-libs.txt)"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/minio/madmin-go/v4 v4.6.7
github.com/minio/mc v0.0.0-20251106162529-77f82e18b540
github.com/minio/md5-simd v1.1.2
github.com/minio/minio-go/v7 v7.3.1-0.20260816235542-f80cde2b89e5
github.com/minio/minio-go/v7 v7.3.1-0.20260909183557-78bfa91607c2
github.com/minio/pkg/v3 v3.7.0
github.com/minio/websocket v1.6.0
github.com/muesli/termenv v0.16.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,8 @@ github.com/minio/mc v0.0.0-20251106162529-77f82e18b540 h1:OAeamQLGQyf7sT/JEocLpA
github.com/minio/mc v0.0.0-20251106162529-77f82e18b540/go.mod h1:bqx15FhQpl5JfYU3yRM4iz2z2K6DiVSaPbj9P7trZZA=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.3.1-0.20260816235542-f80cde2b89e5 h1:RhiGQ8tELV/qw9BTqgfjX4DSMVFhmqBiVYCoKl98cqM=
github.com/minio/minio-go/v7 v7.3.1-0.20260816235542-f80cde2b89e5/go.mod h1:KUPWdecEO1LWyUz+sTGXAuf2jZHrPh5fCsRH86QbPfk=
github.com/minio/minio-go/v7 v7.3.1-0.20260909183557-78bfa91607c2 h1:nvX7IksPFOF/cBvkSg/Z+urBZkmhZrfUVmzdNFLjZ5Y=
github.com/minio/minio-go/v7 v7.3.1-0.20260909183557-78bfa91607c2/go.mod h1:KUPWdecEO1LWyUz+sTGXAuf2jZHrPh5fCsRH86QbPfk=
github.com/minio/mux v1.9.0 h1:dWafQFyEfGhJvK6AwLOt83bIG5bxKxKJnKMCi0XAaoA=
github.com/minio/mux v1.9.0/go.mod h1:1pAare17ZRL5GpmNL+9YmqHoWnLmMZF9C/ioUCfy0BQ=
github.com/minio/pkg/v3 v3.7.0 h1:0aL3kyWUTwqKXMMq5SQG89UU6u4+Ov2kAdtRS9I8WSQ=
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-rdma.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ else
"${MINIO_CPP_REPO:-https://github.com/minio/minio-cpp}"
fi
git -C "${MINIO_CPP_DIR}" fetch --depth 1 origin \
"${MINIO_CPP_REF:-v0.6.0}"
"${MINIO_CPP_REF:-v1.0.0}"
git -C "${MINIO_CPP_DIR}" checkout --detach -f FETCH_HEAD

echo ">>> building libminiocpp with RDMA"
Expand All @@ -143,7 +143,7 @@ echo ">>> building libminiocpp with RDMA"
cmake --install ./build
mkdir -p "${PREFIX}/lib"
cp -P vendor/s3rdma/lib/"${S3RDMA_ARCH}"/* "${PREFIX}/lib/"
# Collect vcpkg's static dependencies next to libminiocpp.a so the whole
# Collect vcpkg's static dependencies next to libminio.a so the whole
# static link resolves from one -L. cmake --install only places libminiocpp.
cp -P vcpkg_installed/*/lib/*.a "${PREFIX}/lib/"
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/rdma-cgo-libs.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-lminiocpp -ls3rdma -lcurlpp -lcurl -lssl -lcrypto -lINIReader -linih -lpugixml -lz -lstdc++ -lm -ldl -lpthread
-lminio -ls3rdma -lssl -lcrypto -lINIReader -linih -lpugixml -lbrotlienc -lbrotlidec -lbrotlicommon -lz -lstdc++ -lm -ldl -lpthread
43 changes: 33 additions & 10 deletions scripts/setup-rdma-release-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# amd64 ${PREFIX} (default /usr/local, built natively)
# arm64 ${PREFIX}/aarch64-linux-gnu (cross-built)
#
# Each holds libminiocpp.a built with RDMA enabled plus its headers, the vcpkg
# Each holds libminio.a built with RDMA enabled plus its headers, the vcpkg
# static archives it links against (scripts/rdma-cgo-libs.txt), and the vendored
# libs3rdma shared object the release packaging copies out. The arm64 prefix
# path is fixed rather than host-dependent because qreleaser.yaml has to name it
Expand Down Expand Up @@ -104,8 +104,8 @@ esac
# Pinned in lockstep with scripts/build-rdma.sh and .github/workflows/go-rdma.yml:
# a floating minio-cpp is what leaves a host with headers too old for the
# minio-go revision in go.mod, and vcpkg's port scripts track the newest CMake.
# v0.6.0 is the first release carrying the libs3rdma RDMA transport.
MINIO_CPP_REF="${MINIO_CPP_REF:-v0.6.0}"
# v1.0.0 installs the library as libminio with a stable soname.
MINIO_CPP_REF="${MINIO_CPP_REF:-v1.0.0}"
MINIO_CPP_REPO="${MINIO_CPP_REPO:-https://github.com/minio/minio-cpp}"
VCPKG_REF="${VCPKG_REF:-2026.07.29}"
CMAKE_MIN="3.31"
Expand Down Expand Up @@ -174,6 +174,9 @@ static_libs() {
for lib in $(tr ' ' '\n' <"${REPO_DIR}/scripts/rdma-cgo-libs.txt" | sed -n 's/^-l//p'); do
case "${lib}" in
stdc++ | m | dl | pthread) ;;
# zlib is a system library here: minio-cpp 1.0.0 takes vcpkg's only on
# Windows, so the prefix neither holds nor needs an archive for it.
z) ;;
s3rdma) ;;
*) echo "${lib}" ;;
esac
Expand Down Expand Up @@ -250,8 +253,8 @@ verify_prefix() {

# Name checks alone cannot tell a cross prefix from one holding host-built
# archives, which is the failure a shared vcpkg checkout invites. Check both
# libminiocpp and a vcpkg archive, since they are produced by separate builds.
for name in libminiocpp.a libssl.a; do
# libminio and a vcpkg archive, since they are produced by separate builds.
for name in libminio.a libssl.a; do
[ -f "${prefix}/lib/${name}" ] || continue
found="$(elf_machine "${prefix}/lib/${name}")"
if [ "${found}" != "${machine}" ]; then
Expand Down Expand Up @@ -279,7 +282,7 @@ if command -v apt-get >/dev/null 2>&1; then
run_privileged apt-get -qq update || true
run_privileged apt-get -o DPkg::Lock::Timeout=600 -qy install --no-install-recommends \
build-essential git curl zip unzip tar pkg-config \
libibverbs-dev librdmacm-dev libnuma-dev
libibverbs-dev librdmacm-dev libnuma-dev zlib1g-dev

if printf '%s\n' "${TARGETS[@]}" | grep -qx arm64 && [ "${HOST_ARCH}" != arm64 ]; then
echo ">>> installing the aarch64 cross toolchain and arm64 RDMA libraries"
Expand All @@ -301,10 +304,12 @@ if command -v apt-get >/dev/null 2>&1; then
run_privileged apt-get -qq update || true
# libibverbs-dev and friends are Multi-Arch: same -- install both arches
# together so adding :arm64 cannot drop :amd64 and break native builds.
# zlib joined them at minio-cpp 1.0.0, which takes it from the system on
# Linux rather than vcpkg, so the cross build needs the arm64 one too.
run_privileged apt-get -o DPkg::Lock::Timeout=600 -qy install --no-install-recommends \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
libibverbs-dev:amd64 librdmacm-dev:amd64 libnuma-dev:amd64 \
libibverbs-dev:arm64 librdmacm-dev:arm64 libnuma-dev:arm64
libibverbs-dev:amd64 librdmacm-dev:amd64 libnuma-dev:amd64 zlib1g-dev:amd64 \
libibverbs-dev:arm64 librdmacm-dev:arm64 libnuma-dev:arm64 zlib1g-dev:arm64
fi
else
echo "no apt-get; ensure a C++ toolchain and libibverbs/librdmacm/libnuma -dev are installed" >&2
Expand Down Expand Up @@ -414,19 +419,37 @@ build_target() {
# An install this run would reproduce byte for byte is not older, and backing
# it up on every rerun would litter the prefix.
local stale=() f lib
if cmp -s "${src}/build/libminiocpp.a" "${prefix}/lib/libminiocpp.a"; then
if cmp -s "${src}/build/libminio.a" "${prefix}/lib/libminio.a"; then
echo ">>> ${prefix} already holds this ${arch} build"
else
if [ -e "${prefix}/include/miniocpp" ]; then
stale+=("${prefix}/include/miniocpp")
fi
for f in "${prefix}"/lib/libminiocpp.*; do
# libminiocpp.* is the pre-1.0.0 name of the same library, so a host
# provisioned before the rename has both here. Only the archive is swept
# under the current name: the shared-object sweep below already covers
# libminio.so*, and queueing one path twice makes the second mv fail on
# an already-moved source, which set -e turns into an aborted provision.
for f in "${prefix}"/lib/libminio.a "${prefix}"/lib/libminiocpp.*; do
if [ -e "${f}" ]; then
stale+=("${f}")
fi
done
fi

# Dependency archives a previous minio-cpp orphaned: 1.0.0 replaced curlpp
# with cpp-httplib and takes zlib from the system on Linux, so vcpkg no
# longer builds any of these. An orphaned libz.a is the one that misleads --
# it still satisfies -lz, so the link succeeds here and against the system
# zlib everywhere else, and the release would not match what CI built.
# Not conditional on the library having changed -- a prefix already holding
# this build can still carry the previous version's dependency set.
for f in "${prefix}"/lib/libcurlpp.* "${prefix}"/lib/libcurl.* "${prefix}"/lib/libz.*; do
if [ -e "${f}" ]; then
stale+=("${f}")
fi
done

# Shared objects that shadow the archives we install. ld picks these over the
# .a in the same -L, which is how a release ends up depending on a library it
# neither bundles nor declares.
Expand Down
Loading