ci: add OpenBSD Clang cross job #35397

pull fanquake wants to merge 11 commits into bitcoin:master from fanquake:openbsd_clang_cross changing 29 files +361 −35
  1. fanquake commented at 3:27 PM on May 27, 2026: member

    This adds a Linux cross job for OpenBSD. bitcoin-chainstate and test_kernel currently fail to link:

    [ 69%] Linking CXX executable ../../../bin/test_kernel
    ld.lld: error: non-exported symbol '__cxa_atexit' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(atexit.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol '__stack_smash_handler' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(stack_protector.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol '__assert2' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(assert.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'free' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(malloc.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'memset' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(memset.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'memcpy' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(memcpy.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'memmove' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(memmove.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'strlen' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(strlen.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'malloc' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(malloc.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'realloc' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(malloc.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'memcmp' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(memcmp.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'abort' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(abort.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'vsnprintf' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(vsnprintf.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'fseek' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(fseek.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'fclose' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(fclose.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'setbuf' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(setbuf.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'fwrite' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(fwrite.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol '__stdout' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(findfp.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'fflush' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(fflush.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: non-exported symbol 'fread' in '/ci_container_base/depends/SDKs/openbsd-x86_64-unknown-openbsd-7.9/usr/lib/libc.a(fread.o)' is referenced by DSO '../../../lib/libbitcoinkernel.so'
    ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    

    so they are disabled for now.

    Based on #35427 + https://github.com/hebasto/bitcoin/commits/260531-openbsd-qt-cross.

  2. DrahtBot added the label Tests on May 27, 2026
  3. 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
    Concept ACK sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. fanquake commented at 3:27 PM on May 27, 2026: member

    bitcoin-chainstate and test_kernel currently fail to link

    cc @sedited

  5. DrahtBot added the label CI failed on May 27, 2026
  6. 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 link bitcoin-chainstate due to “non-exported symbol” errors from the OpenBSD SDK’s libc.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>

  7. sedited commented at 5:50 PM on May 27, 2026: contributor

    Concept ACK

    I guess a similar treatment could also be done for freebsd.

  8. fanquake commented at 9:03 AM on May 28, 2026: member

    I guess a similar treatment could also be done for freebsd.

    Do you mean NetBSD? We added a Clang cross FreeBSD job in #34491.

  9. fanquake force-pushed on May 28, 2026
  10. 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

  11. 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 -latest as well?


    maflcko commented at 4:36 PM on May 28, 2026:

    Also, since you are touching "CI", could address the nit from #35378#pullrequestreview-4382590112? but feel free to ignore those nits, not important


    fanquake commented at 8:07 AM on May 29, 2026:

    Put both into #35408

  12. fanquake force-pushed on May 28, 2026
  13. fanquake force-pushed on May 28, 2026
  14. fanquake commented at 4:39 PM on May 28, 2026: member

    Depends Qt builds, but CMake can't seem to find it, so I have dropped Qt for now.

    cc @hebasto, you might want to have a look here.

  15. fanquake force-pushed on May 29, 2026
  16. maflcko commented at 9:20 AM on May 29, 2026: member

    I 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

  17. sedited commented at 9:23 AM on May 29, 2026: contributor

    Do you mean NetBSD? We added a Clang cross FreeBSD job in #34491.

    Yes, not sure why I confused them.

  18. fanquake commented at 1:42 PM on May 29, 2026: member

    Put up something for NetBSD here: #35412.

  19. fanquake referenced this in commit 214ad1761b on May 29, 2026
  20. fanquake force-pushed on May 29, 2026
  21. hebasto commented at 5:01 PM on May 31, 2026: member

    Depends Qt builds, but CMake can't seem to find it, so I have dropped Qt for now.

    cc @hebasto, you might want to have a look here.

    Sure. Pleas check out #35427.

  22. hebasto commented at 5:39 PM on May 31, 2026: member

    9bb19b65bf4ec0a65d091aaafac193e59099f198 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'
    
  23. fanquake commented at 5:58 PM on May 31, 2026: member

    https://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?

  24. hebasto commented at 8:26 PM on May 31, 2026: member

    9bb19b6 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:

    • On the master branch: the build passes.
    • On this PR branch: the build fails.

    UPDATE, I got the result in my comment above locally, not in the GHA environment.

  25. fanquake commented at 8:34 PM on May 31, 2026: member

    I 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 that llvm-ar is available?

  26. hebasto commented at 9:15 PM on May 31, 2026: member

    I 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 that llvm-ar is 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.

  27. rustaceanrob referenced this in commit eee9e69ff2 on Jun 5, 2026
  28. fanquake commented at 10:50 AM on June 12, 2026: member

    Now based on #35427, and dropped some of the llvm usage.

  29. fanquake force-pushed on Jun 12, 2026
  30. fanquake force-pushed on Jun 12, 2026
  31. fanquake force-pushed on Jun 12, 2026
  32. fanquake force-pushed on Jun 12, 2026
  33. fanquake force-pushed on Jun 12, 2026
  34. fanquake force-pushed on Jun 12, 2026
  35. hebasto commented at 7:50 AM on June 14, 2026: member

    a6b89a59b1a334830a1ad47791edab37db7d1945

    Now based on #35427...

    It seems that not only the ranlib fixes were taken from 260531-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.

  36. hebasto commented at 10:38 AM on June 14, 2026: member

    https://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-static configure option, the fontconfig package 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>
    
  37. depends: Fix `fontconfig` build for OpenBSD using LLVM toolchain cf240f7317
  38. depends: Fix `libxcb` build for OpenBSD using LLVM toolchain 2e6e034913
  39. depends: Fix `libxkbcommon` build for OpenBSD using LLVM toolchain a077306ea1
  40. depends: Fix `libxcb_util` build for OpenBSD using LLVM toolchain 1e1cef398d
  41. depends: Fix `libxcb_util_render` build for OpenBSD using LLVM toolchain 6daf0cc44a
  42. depends: Fix `libxcb_util_image` build for OpenBSD using LLVM toolchain ed783ec490
  43. depends: Fix `libxcb_util_keysyms` build for OpenBSD using LLVM toolchain b27eace595
  44. depends: Fix `libxcb_util_wm` build for OpenBSD using LLVM toolchain dba2916d5a
  45. depends: Build `qt` and `qrencode` packages for OpenBSD hosts 348dea071f
  46. depends: openBSD cross with Clang cda6d83747
  47. ci: add openBSD cross CI job e829dcbb48
  48. fanquake force-pushed on Jun 15, 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-06-24 04:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me