This adds a Linux cross job for OpenBSD; similar to #34491 (FreeBSD).
ci: add OpenBSD Clang cross job #35397
pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:openbsd_clang_cross changing 4 files +61 −0-
fanquake commented at 3:27 PM on May 27, 2026: member
- DrahtBot added the label Tests on May 27, 2026
-
DrahtBot commented at 3:27 PM on May 27, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35397.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK hebasto, willcl-ark Concept ACK sedited If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
No conflicts as of last run.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
- DrahtBot added the label CI failed on May 27, 2026
-
DrahtBot commented at 4:24 PM on May 27, 2026: contributor
<!--85328a0da195eb286784d51f73fa0af9-->
🚧 At least one of the CI tasks failed. <sub>Task
OpenBSD Cross: https://github.com/bitcoin/bitcoin/actions/runs/26520966708/job/78111604124</sub> <sub>LLM reason (✨ experimental): ld.lld failed to linkbitcoin-chainstatedue to “non-exported symbol” errors from the OpenBSD SDK’slibc.a(e.g.,__cxa_atexit,malloc,memcpy,strlen).</sub><details><summary>Hints</summary>
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
</details>
-
sedited commented at 5:50 PM on May 27, 2026: contributor
Concept ACK
I guess a similar treatment could also be done for freebsd.
- fanquake force-pushed on May 28, 2026
-
in .github/workflows/ci.yml:540 in 44d10a78eb outdated
550 | + warp-runner: 'warp-ubuntu-latest-x64-16x' 551 | fallback-runner: 'ubuntu-24.04' 552 | timeout-minutes: 120 553 | file-env: './ci/test/00_setup_env_native_msan.sh' 554 | 555 | + - name: 'OpenBSD Cross'
maflcko commented at 4:34 PM on May 28, 2026:nit: Can you move this one up, so that the bsd ones are nicely grouped?
fanquake commented at 4:38 PM on May 28, 2026:Moved up
in .github/workflows/ci.yml:542 in 44d10a78eb outdated
552 | timeout-minutes: 120 553 | file-env: './ci/test/00_setup_env_native_msan.sh' 554 | 555 | + - name: 'OpenBSD Cross' 556 | + warp-runner: 'warp-ubuntu-latest-x64-8x' 557 | + fallback-runner: 'ubuntu-24.04'
maflcko commented at 4:35 PM on May 28, 2026:unrelated nit: Seems odd that wrap is using
-latest-, but fallback is using Noble.Could add a prepare-commit to move all GH fallback ones to
-latestas well?
fanquake force-pushed on May 28, 2026fanquake force-pushed on May 28, 2026fanquake force-pushed on May 29, 2026maflcko commented at 9:20 AM on May 29, 2026: memberI guess a similar treatment could also be done for freebsd.
Do you mean NetBSD?
Yeah, given that apparently all three of them can run into unrelated/orthogonal(?) build issues, it could make sense to check all of them
fanquake referenced this in commit 214ad1761b on May 29, 2026fanquake force-pushed on May 29, 2026hebasto commented at 5:39 PM on May 31, 2026: member9bb19b65bf4ec0a65d091aaafac193e59099f198 breaks compilation on OpenBSD:
$ uname -rs OpenBSD 7.8 $ gmake -C depends -j 10 libevent <snip> [ 39%] Linking C static library lib/libevent_core.a Error running link command: no such file or directorygmake[3]: *** [CMakeFiles/event_core_static.dir/build.make:389: lib/libevent_core.a] Error 2 gmake[2]: *** [CMakeFiles/Makefile2:97: CMakeFiles/event_core_static.dir/all] Error 2 gmake[1]: *** [Makefile:136: all] Error 2 gmake[1]: Leaving directory '/home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-openbsd7.8/libevent/2.1.12-stable-1e1062d7183/build' gmake: *** [funcs.mk:343: /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-openbsd7.8/libevent/2.1.12-stable-1e1062d7183/build/.stamp_built] Error 2 gmake: Leaving directory '/home/hebasto/dev/bitcoin/depends'fanquake commented at 5:58 PM on May 31, 2026: memberhttps://github.com/bitcoin/bitcoin/commit/9bb19b65bf4ec0a65d091aaafac193e59099f198 breaks compilation on OpenBSD: Error running link command: no such file or directory
That looks more like a misconfigured environment, or you've forgotten a build dependency?
hebasto commented at 8:26 PM on May 31, 2026: member9bb19b6 breaks compilation on OpenBSD: Error running link command: no such file or directory
That looks more like a misconfigured environment, or you've forgotten a build dependency?
I believe this demo run clearly isolates the issue:
UPDATE, I got the result in my comment above locally, not in the GHA environment.
fanquake commented at 8:34 PM on May 31, 2026: memberI believe this demo run clearly isolates the issue:
It's still the same error as above:
Error running link command: no such file or directory. gmake is trying to run the archiver (llvm-ar), and it's failing. Did you install llvm, so thatllvm-aris available?hebasto commented at 9:15 PM on May 31, 2026: memberI believe this demo run clearly isolates the issue:
It's still the same error as above:
Error running link command: no such file or directory. gmake is trying to run the archiver (llvm-ar), and it's failing. Did you install llvm, so thatllvm-aris available?The list of the installed packages is exactly as documented:https://github.com/bitcoin/bitcoin/blob/fbe628756cc417dd4b6ccd9d3a709ca8e2f6023c/depends/README.md?plain=1#L52-L55
If this PR introduces a new build dependency (
llvm) when building on OpenBSD, that constitutes a regression and should be fixed.rustaceanrob referenced this in commit eee9e69ff2 on Jun 5, 2026fanquake force-pushed on Jun 12, 2026fanquake force-pushed on Jun 12, 2026fanquake force-pushed on Jun 12, 2026fanquake force-pushed on Jun 12, 2026fanquake force-pushed on Jun 12, 2026fanquake force-pushed on Jun 12, 2026hebasto commented at 7:50 AM on June 14, 2026: membera6b89a59b1a334830a1ad47791edab37db7d1945
Now based on #35427...
It seems that not only the
ranlibfixes were taken from260531-openbsd-qt-cross, but the top commit was included as well, which is incorrect.It should actually be taken from #35427, which includes files like
depends/patches/freetype/openbsd_versioning.patch.hebasto commented at 10:38 AM on June 14, 2026: memberhttps://github.com/bitcoin/bitcoin/actions/runs/27414843225/job/81025003056:
<snip> ld.lld: error: undefined symbol: XML_ParserCreate >>> referenced by fcxml.c >>> fcxml.o:(FcConfigParseAndLoadFromMemoryInternal) in archive /home/runner/work/_temp/depends/x86_64-unknown-openbsd/lib/libfontconfig.a <snip>It seems the issue is that, despite the
--disable-staticconfigure option, thefontconfigpackage was still configured as a static library:<snip> checking if libtool supports shared libraries... no checking whether to build shared libraries... no checking whether to build static libraries... yes <snip>fanquake force-pushed on Jun 15, 2026fanquake force-pushed on Jun 25, 2026fanquake commented at 12:13 PM on June 25, 2026: memberDropped the QT changes back out, as well as most of the /depends changes. Marked reviewable.
fanquake marked this as ready for review on Jun 25, 2026fanquake force-pushed on Jun 25, 2026DrahtBot removed the label CI failed on Jun 25, 2026fanquake force-pushed on Jun 26, 2026fanquake commented at 3:08 PM on June 26, 2026: memberFixed this for
BUILD_KERNEL_LIB/BUILD_UTIL_CHAINSTATE.Kino1994 referenced this in commit 58aa6f27f9 on Jun 28, 2026depends: add openbsd_LDFLAGS 5404b62074ci: add openBSD cross CI job d64ea15824fanquake force-pushed on Jun 29, 2026in ci/test/01_base_install.sh:135 in d64ea15824
130 | + ${CI_RETRY_EXE} curl --location --fail "https://cdn.openbsd.org/pub/OpenBSD/${OPENBSD_VERSION}/amd64/${OPENBSD_SDK_FILENAME}" -o "$OPENBSD_SDK_PATH" 131 | + fi 132 | + tar -C "${DEPENDS_DIR}/SDKs/${OPENBSD_SDK_BASENAME}" -xf "$OPENBSD_SDK_PATH" 133 | + ( 134 | + # The SDK has versioned shared libs, but no unversioned libfoo.so symlink, 135 | + # which breaks linking the kernel with lld. Create the symlinks.
hebasto commented at 3:21 PM on June 29, 2026:Is this an
lld's issue?
fanquake commented at 4:14 PM on June 29, 2026:Not sure I understand the question?
hebasto commented at 4:17 PM on June 29, 2026:"The SDK has versioned shared libs, but no unversioned libfoo.so symlink..." -- this is a standard on OpenBSD.
"... which breaks linking the kernel with lld" -- Why does the standard naming of shared libraries break linking?
fanquake commented at 4:32 PM on June 29, 2026:Why does the standard naming of shared libraries break linking?
Because here we are using an
lldthat doesn't have OpenBSDs patches applied to it, i.e :https://github.com/openbsd/ports/blob/master/devel/llvm/22/patches/patch-lld_ELF_DriverUtils_cpp.in ci/test/00_setup_env_openbsd_cross.sh:16 in d64ea15824
11 | +export APT_LLVM_V="22" 12 | +export HOST=x86_64-unknown-openbsd 13 | +export OPENBSD_VERSION=7.9 14 | +export OPENBSD_SDK_BASENAME="openbsd-${HOST}-${OPENBSD_VERSION}" 15 | +export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} lld" 16 | +export SYSROOT="--sysroot=${DEPENDS_DIR}/SDKs/${OPENBSD_SDK_BASENAME}"
fanquake commented at 4:14 PM on June 29, 2026:I'll likely change the FreeBSD build to match what's being done here, and with NetBSD.
BigcoinBGC referenced this in commit 225fdde042 on Jun 30, 2026hebasto commented at 6:23 PM on June 30, 2026: memberIt seems the issue is that, despite the
--disable-staticconfigure option, thefontconfigpackage was still configured as a static library:<snip> checking if libtool supports shared libraries... no checking whether to build shared libraries... no checking whether to build static libraries... yes <snip>A note for my future self:
I believe this is a Libtool bug. The fix was introduced in
323d8a5dfd80b9e3eb649cdf2a08a7cb9d6ba833and is available in v2.5.4.The first
fontconfigversion to bundle the fixed Libtool in its source tarball is 2.16.0.hebasto approvedhebasto commented at 6:27 PM on June 30, 2026: memberACK d64ea158240ce030995e4bc38d077685c241e931.
DrahtBot requested review from sedited on Jun 30, 2026hebasto commented at 6:27 PM on June 30, 2026: memberwillcl-ark approvedwillcl-ark commented at 7:56 AM on July 1, 2026: memberACK d64ea158240ce030995e4bc38d077685c241e931
hebasto merged this on Jul 1, 2026hebasto closed this on Jul 1, 2026fanquake deleted the branch on Jul 1, 2026fanquake referenced this in commit 81e77ee95f on Jul 3, 2026fanquake referenced this in commit ed83c0dfbd on Jul 3, 2026
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-07-09 06:47 UTC