Skip to content

Conversation

@FranzBusch
Copy link

Updates the Swift version to the latest released Swift version. This ensures that the projects are fuzzed against the latest compiler and runtime versions. Additionally, some projects don't support 5.10 anymore so bumping to 6.2 should give us the latest versions of those projects.

@github-actions
Copy link

FranzBusch is a new contributor to projects/swift-nio. The PR must be approved by known contributors before it can be merged. The past contributors are: catenacyber, asraa
FranzBusch is a new contributor to projects/swift-protobuf. The PR must be approved by known contributors before it can be merged. The past contributors are: thomasvl, catenacyber, asraa
FranzBusch is a new contributor to projects/grpc-swift. The PR must be approved by known contributors before it can be merged. The past contributors are: catenacyber, asraa

Copy link
Collaborator

@DavidKorczynski DavidKorczynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overall looks good. There's a current issue which caused the ubuntu* base images not to be pushed to the registry #14338 which has just been fixed #14340 Will wait for the base images to be propagated to test this (in 24h or so) and then merge this PR.

Edit: can see they've already been pushed actually.

@kleisauke
Copy link
Contributor

IIUC, the base_os_version property should also be set to ubuntu-24-04 in project.yaml‎ for the projects modified in this PR. For reference, see commit c9db9f9.

FranzBusch and others added 3 commits December 12, 2025 10:30
Updates the Swift version to the latest released Swift version. This ensures that the projects are fuzzed against the latest compiler and runtime versions. Additionally, some projects don't support 5.10 anymore so bumping to 6.2 should give us the latest versions of those projects.
Co-authored-by: Kleis Auke Wolthuizen <[email protected]>
@FranzBusch
Copy link
Author

@kleisauke Sorry it took me a bit to get back to this. I updated the base_os_version now

@DavidKorczynski
Copy link
Collaborator

/gcbrun trial_build.py swift-nio swift-protobuf grpc-swift --force-build

@FranzBusch
Copy link
Author

@DavidKorczynski thanks for kicking the build. It looks like the Swift deps weren't correct and I just updated that. Can you kick the build again?

@DavidKorczynski
Copy link
Collaborator

/gcbrun trial_build.py swift-nio swift-protobuf grpc-swift --force-build

@DavidKorczynski
Copy link
Collaborator

The plan now is to land #14486 and then follow the steps Thomas mentions here #14486 (comment) "land this and then stack #14342 on top, and thus move both of your base images forward, just to different Swift versions.". Thomas has a point on making sure 20.04 follows

@DavidKorczynski
Copy link
Collaborator

The plan now is to land #14486 and then follow the steps Thomas mentions here #14486 (comment) "land this and then stack #14342 on top, and thus move both of your base images forward, just to different Swift versions.". Thomas has a point on making sure 20.04 follows

I may go back on this and simply go through with this PR. We have so few swift projects and think we can look beyond 20.04. For that reason if we can get the CI working here then we should just land this.

@DavidKorczynski
Copy link
Collaborator

/gcbrun trial_build.py swift-nio swift-protobuf grpc-swift --force-build

@FranzBusch
Copy link
Author

Thanks for pushing on this @DavidKorczynski. It is not entirely clear to me why the trial build failed.

@DavidKorczynski
Copy link
Collaborator

DavidKorczynski commented Jan 23, 2026

This looks to be failing:

2026-01-23T10:46:29.5075990Z + swift build -c debug -Xswiftc -parse-as-library -Xswiftc -static-stdlib --static-swift-stdlib -Xswiftc -sanitize=fuzzer,address --sanitize=address -Xcc=-O1 -Xcc=-fno-omit-frame-pointer -Xcc=-gline-tables-only -Xcc=-Wno-error=incompatible-function-pointer-types -Xcc=-Wno-error=int-conversion -Xcc=-Wno-error=deprecated-declarations -Xcc=-Wno-error=implicit-function-declaration -Xcc=-Wno-error=implicit-int -Xcc=-Wno-error=unknown-warning-option -Xcc=-Wno-error=vla-cxx-extension -Xcc=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -Xcc=-fsanitize=address -Xcc=-fsanitize-address-use-after-scope -Xcc=-fsanitize=fuzzer-no-link -Xcxx=-O1 -Xcxx=-fno-omit-frame-pointer -Xcxx=-gline-tables-only -Xcxx=-Wno-error=incompatible-function-pointer-types -Xcxx=-Wno-error=int-conversion -Xcxx=-Wno-error=deprecated-declarations -Xcxx=-Wno-error=implicit-function-declaration -Xcxx=-Wno-error=implicit-int -Xcxx=-Wno-error=unknown-warning-option -Xcxx=-Wno-error=vla-cxx-extension -Xcxx=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -Xcxx=-fsanitize=address -Xcxx=-fsanitize-address-use-after-scope -Xcxx=-fsanitize=fuzzer-no-link -Xcxx=-stdlib=libc++
2026-01-23T10:46:29.5080876Z /usr/bin/swift-build: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory
2026-01-23T10:46:29.5511315Z ERROR:__main__:Building fuzzers failed.
2026-01-23T10:46:29.5632743Z Pulling and building base images first.
2026-01-23T10:46:29.5634254Z Running command: python /home/runner/work/oss-fuzz/oss-fuzz/infra/helper.py pull_images
2026-01-23T10:46:29.5635472Z Running command: python /home/runner/work/oss-fuzz/oss-fuzz/infra/helper.py build_image base-image --no-pull --cache
2026-01-23T10:46:29.5636633Z Running command: python /home/runner/work/oss-fuzz/oss-fuzz/infra/helper.py build_image base-builder --no-pull --cache

@FranzBusch
Copy link
Author

Hm weird since I added libncurses-dev to the Dockerfile

@FranzBusch
Copy link
Author

@DavidKorczynski I am confused why this not picking up my changes in install_swift_ubuntu_24_04.sh which should fix this error. Is the above /gcbrun trial_build.py swift-nio swift-protobuf grpc-swift --force-build forcing a rebuild of the gcr.io/oss-fuzz-base/base-builder-swift:ubuntu-24-04 image?

@DavidKorczynski
Copy link
Collaborator

@DavidKorczynski I am confused why this not picking up my changes in install_swift_ubuntu_24_04.sh which should fix this error. Is the above /gcbrun trial_build.py swift-nio swift-protobuf grpc-swift --force-build forcing a rebuild of the gcr.io/oss-fuzz-base/base-builder-swift:ubuntu-24-04 image?

hmm, let me run this locally and see if I run into the same issue

@DavidKorczynski
Copy link
Collaborator

Did this succeed for you locally @FranzBusch ?

When I try to build it I get the error:

367.4 
367.4 
367.4 -- Build files have been written to: /src/llvm-project
367.5 ++ nproc
367.5 + ninja -j26 llvm-symbolizer
367.6 ninja: error: '/usr/lib/swift_static/linux/libicui18nswift.a', needed by 'bin/llvm-symbolizer', missing and no known rule to make it
------
ubuntu-24-04.Dockerfile:20
--------------------
  18 |     
  19 |     COPY llvmsymbol.diff /src/
  20 | >>> RUN install_swift_ubuntu_24_04.sh
  21 |     
  22 |     COPY precompile_swift /usr/local/bin/
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c install_swift_ubuntu_24_04.sh" did not complete successfully: exit code: 1

You can try to build the images by using the below changes in infra/base-images/all.sh:

$ git diff ./infra/base-images/all.sh
diff --git a/infra/base-images/all.sh b/infra/base-images/all.sh
index 2d5ba5075..6b468cd68 100755
--- a/infra/base-images/all.sh
+++ b/infra/base-images/all.sh
@@ -32,6 +32,7 @@
 
 # The first argument is the version tag, e.g., 'latest', 'ubuntu-20-04'.
 VERSION_TAG=${1:-latest}
+VERSION_TAG="ubuntu-24-04"
 
 # Get the directory where this script is located to find the helper script.
 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
@@ -40,14 +41,19 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
 # This avoids duplicating the image list and ensures this script is always
 # up-to-date.
 IMAGE_LIST=$(python3 "${SCRIPT_DIR}/list_images.py")
+IMAGE_LIST=(
+  base-builder
+  base-builder-swift
+  base-runner
+)
 
 echo "Building version: ${VERSION_TAG}"
 echo "Images to build: ${IMAGE_LIST}"
 
 # Loop through the official list of images and build each one.
-for image_name in ${IMAGE_LIST}; do
+for image_name in ${IMAGE_LIST[@]}; do
   image_dir="infra/base-images/${image_name}"
-  
+  echo $image_dir
   if [ "${VERSION_TAG}" == "latest" ]; then
     dockerfile="${image_dir}/Dockerfile"
     tag="gcr.io/oss-fuzz-base/${image_name}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants