ci: Add openbsd #195
pull maflcko wants to merge 4 commits into bitcoin-core:master from maflcko:ci-bsd changing 4 files +36 −2-
maflcko commented at 7:10 pm on August 20, 2025: contributor
-
DrahtBot commented at 7:10 pm on August 20, 2025: none
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
-
in .github/workflows/ci.yml:17 in 17b454368f outdated
12+ shell: openbsd {0} 13+ steps: 14+ - uses: actions/checkout@v4 15+ 16+ - name: Start OpenBSD VM 17+ uses: vmactions/openbsd-vm@v1
maflcko commented at 7:20 pm on August 20, 2025:I guess this needs to be added, like #184 (comment).
(I can’t vouch for this action, but I guess it should be fine to enable, even if backdoored?)
Sjors commented at 10:33 am on August 21, 2025: memberWhy doesn’t this fail? https://github.com/bitcoin/bitcoin/issues/33219maflcko commented at 10:35 am on August 21, 2025: contributorWhy doesn’t this fail? bitcoin/bitcoin#33219
It does fail. See the previous comment on why the CI is not run here.
ryanofsky commented at 12:56 pm on August 21, 2025: collaboratorIt does fail. See the previous comment on why the CI is not run here.
This is great! Thanks for adding this. I added vmactions/openbsd-vm@* to https://github.com/bitcoin-core/libmultiprocess/settings/actions, so maybe CI could be triggered here now. Could consider adding the #include fix from https://github.com/bitcoin/bitcoin/issues/33219#issuecomment-3202305628 here too
maflcko force-pushed on Aug 21, 2025maflcko force-pushed on Aug 21, 2025maflcko commented at 1:06 pm on August 21, 2025: contributorForce pushed to fix the bugs found by the LLM :sweat_smile: (existential sweat smile)ci: Add openbsd 98414e7d28maflcko force-pushed on Aug 21, 2025maflcko commented at 1:42 pm on August 21, 2025: contributorBuild failure as expected in https://github.com/bitcoin-core/libmultiprocess/actions/runs/17128243881/job/48585209051?pr=195#step:5:2:
0 cd /home/runner/work/libmultiprocess/libmultiprocess 1 CI_CONFIG="ci/configs/openbsd.bash" bash ci/scripts/ci.sh 2 shell: /home/runner/.local/bin/openbsd {0} 3+ '[' x ']' 4+ source ci/configs/openbsd.bash 5++ CI_DESC='CI config for OpenBSD' 6++ CI_DIR=build-openbsd 7++ export 'CXXFLAGS=-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter' 8++ CXXFLAGS='-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter' 9++ CMAKE_ARGS=(-G Ninja) 10++ BUILD_ARGS=(-k 0) 11+ : build-openbsd 12+ '[' -v BUILD_TARGETS ']' 13+ BUILD_TARGETS=(all tests mpexamples) 14+ '[' -n '' ']' 15+ cmake -B build-openbsd -G Ninja 16-- The CXX compiler identification is Clang 16.0.6 17-- Detecting CXX compiler ABI info 18-- Detecting CXX compiler ABI info - done 19-- Check for working CXX compiler: /usr/bin/c++ - skipped 20-- Detecting CXX compile features 21-- Detecting CXX compile features - done 22-- Found OpenSSL: /usr/lib/libcrypto.so.56.0 (found version "2.0.0") found components: Crypto SSL 23-- Found ZLIB: /usr/lib/libz.so.7.1 (found version "1.3.1.1") 24-- Performing Test CMAKE_HAVE_LIBC_PTHREAD 25-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success 26-- Found Threads: TRUE 27-- Performing Test HAVE_PTHREAD_GETNAME_NP 28-- Performing Test HAVE_PTHREAD_GETNAME_NP - Failed 29-- Performing Test HAVE_PTHREAD_THREADID_NP 30-- Performing Test HAVE_PTHREAD_THREADID_NP - Failed 31-- Performing Test HAVE_PTHREAD_GETTHREADID_NP 32-- Performing Test HAVE_PTHREAD_GETTHREADID_NP - Failed 33-- Configuring done (2.9s) 34-- Generating done (0.1s) 35-- Build files have been written to: /home/runner/work/libmultiprocess/libmultiprocess/build-openbsd 36+ cmake --build build-openbsd -t all tests mpexamples -- -k 0 37[1/59] Building CXX object CMakeFiles/mputil.dir/src/mp/util.cpp.o 38[2/59] Compiling Cap'n Proto schema include/mp/proxy.capnp 39[3/59] Building CXX object CMakeFiles/multiprocess.dir/include/mp/proxy.capnp.c++.o 40[4/59] Building CXX object CMakeFiles/mpgen.dir/src/mp/gen.cpp.o 41[5/59] Linking CXX executable mpgen 42FAILED: mpgen 43: && /usr/bin/c++ -Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -Xlinker --dependency-file=CMakeFiles/mpgen.dir/link.d CMakeFiles/mputil.dir/src/mp/util.cpp.o CMakeFiles/mpgen.dir/src/mp/gen.cpp.o -o mpgen /usr/local/lib/libcapnp.a /usr/local/lib/libcapnp-rpc.a /usr/local/lib/libcapnpc.a /usr/local/lib/libkj.a /usr/local/lib/libkj-async.a /usr/local/lib/libcapnp.a /usr/local/lib/libkj.a -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib && : 44ld: warning: parser.c++(parser.c++.o:(kj::parse::ParserRef<kj::parse::IteratorInput<capnp::compiler::Token::Reader, capnp::_::IndexingIterator<capnp::List<capnp::compiler::Token, (capnp::Kind)3>::Reader const, capnp::compiler::Token::Reader>>, capnp::compiler::CapnpParser::DeclParserResult>::WrapperImpl<kj::parse::Transform_<kj::parse::Sequence_<kj::parse::TransformOrReject_<kj::parse::TransformOrReject_<kj::parse::Any_ const&, capnp::compiler::(anonymous namespace)::MatchTokenType<capnp::Text::Reader, (capnp::compiler::Token::Which)0, &capnp::compiler::Token::Reader::getIdentifier() const>> const&, capnp::compiler::(anonymous namespace)::ExactString>, kj::parse::TransformOrReject_<kj::parse::Any_ const&, capnp::compiler::(anonymous namespace)::MatchTokenType<capnp::Text::Reader, (capnp::compiler::Token::Which)0, &capnp::compiler::Token::Reader::getIdentifier() const>> const&, kj::parse::Optional_<kj::parse::ParserRef<kj::parse::IteratorInput<capnp::compiler::Token::Reader, capnp::_::IndexingIterator<capnp::L 45ld: error: undefined hidden symbol: std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::operator<<[abi:v160006]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, std::__1::__thread_id) 46>>> referenced by util.cpp 47>>> CMakeFiles/mputil.dir/src/mp/util.cpp.o:(mp::ThreadName(char const*)) 48c++: error: linker command failed with exit code 1 (use -v to see invocation) 49[6/59] Building CXX object CMakeFiles/multiprocess.dir/src/mp/proxy.cpp.o 50[7/59] Linking CXX static library libmultiprocess.a 51ninja: build stopped: cannot make progress due to previous errors.dd40897efeAdd missing thread include
This is required for OpenBSD. Authored by Ryan in https://github.com/bitcoin/bitcoin/issues/33219#issuecomment-3202305628
maflcko force-pushed on Aug 21, 2025ryanofsky commented at 2:24 pm on August 21, 2025: collaboratorIn dd40897efe799172c83b86b3543b005df516d9ae https://github.com/bitcoin-core/libmultiprocess/actions/runs/17128945048/job/48587647670?pr=195 looks like a new error linking the mpexample programld: error: unable to find library -lstdc++fs. I don’t think I tried to build this in my openbsd build, so would need to look into a fix. Possible workaround might be to not build this target for nowryanofsky commented at 2:29 pm on August 21, 2025: collaboratorI am also just now realizing the gnu32 job is very slow when run CI because it seems to be building a lot of things. It is fast when I run it locally, but that’s because the nix outputs are cached. Should look into how to set up caching in CI.maflcko commented at 4:29 pm on August 21, 2025: contributorthx, excluded. Looks like it passes nowryanofsky commented at 4:37 pm on August 21, 2025: collaboratorActually I think I see what was causing the error. I think we just need to get rid of this line:
It is probably safe to just delete. Chatgpt says it is only needed on older versions of gcc so could be replaced with:
0# Only link stdc++fs on ancient GCC that needed it (we don't support these, but document the rule). 1if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) 2 target_link_libraries(mpexample PRIVATE stdc++fs) 3endif()But I think we don’t care about compilers that old (2019)
486a510bbeci: Remove ancient and problematic -lstdc++fs in mpexample
This is no longer needed, according to https://en.cppreference.com/w/cpp/filesystem.html#Notes: > Using this library may require additional compiler/linker options. GNU > implementation prior to 9.1 requires linking with -lstdc++fs and LLVM > implementation prior to LLVM 9.0 requires linking with -lc++fs. Also, it is causing a OpenBSD link error: [54/59] Linking CXX executable example/mpexample FAILED: example/mpexample : && /usr/bin/c++ -Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -Xlinker --dependency-file=example/CMakeFiles/mpexample.dir/link.d example/CMakeFiles/mpexample.dir/example.cpp.o example/CMakeFiles/mpexample.dir/init.capnp.c++.o example/CMakeFiles/mpexample.dir/init.capnp.proxy-client.c++.o example/CMakeFiles/mpexample.dir/init.capnp.proxy-server.c++.o example/CMakeFiles/mpexample.dir/init.capnp.proxy-types.c++.o example/CMakeFiles/mpexample.dir/calculator.capnp.c++.o example/CMakeFiles/mpexample.dir/calculator.capnp.proxy-client.c++.o example/CMakeFiles/mpexample.dir/calculator.capnp.proxy-server.c++.o example/CMakeFiles/mpexample.dir/calculator.capnp.proxy-types.c++.o example/CMakeFiles/mpexample.dir/printer.capnp.c++.o example/CMakeFiles/mpexample.dir/printer.capnp.proxy-client.c++.o example/CMakeFiles/mpexample.dir/printer.capnp.proxy-server.c++.o example/CMakeFiles/mpexample.dir/printer.capnp.proxy-types.c++.o -o example/mpexample libmultiprocess.a -lstdc++fs /usr/local/lib/libcapnp-rpc.a /usr/local/lib/libcapnp.a /usr/local/lib/libkj-async.a /usr/local/lib/libkj.a -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib && : ld: error: unable to find library -lstdc++fs c++: error: linker command failed with exit code 1 (use -v to see invocation)
maflcko force-pushed on Aug 21, 2025maflcko commented at 6:21 pm on August 21, 2025: contributorthx, removed itin .github/workflows/ci.yml:14 in 486a510bbe outdated
9+ runs-on: ubuntu-latest 10+ defaults: 11+ run: 12+ shell: openbsd {0} 13+ steps: 14+ - uses: actions/checkout@v4
hebasto commented at 8:45 pm on August 21, 2025:98414e7d28672aea7a218c691d34295d8934ae09:
0 - uses: actions/checkout@v5in ci/configs/openbsd.bash:5 in 486a510bbe outdated
0@@ -0,0 +1,5 @@ 1+CI_DESC="CI config for OpenBSD" 2+CI_DIR=build-openbsd 3+export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter" 4+CMAKE_ARGS=(-G Ninja) 5+BUILD_ARGS=(-k 0)
hebasto commented at 8:54 pm on August 21, 2025:98414e7d28672aea7a218c691d34295d8934ae09:
Mention this new script in
ci/README.md?
maflcko commented at 6:31 am on August 22, 2025:I don’t think it can be called directly by the ci run script, because it requires OpenBSD and not nix.
It is up to the dev (or GHA) to setup the OpenBSD and then call the
ci.shdirectly. Thus, it remains undocumented.in .github/workflows/ci.yml:10 in 486a510bbe outdated
4@@ -5,6 +5,34 @@ on: 5 pull_request: 6 7 jobs: 8+ build-openbsd: 9+ runs-on: ubuntu-latest 10+ defaults:
hebasto commented at 9:00 pm on August 21, 2025:98414e7d28672aea7a218c691d34295d8934ae09:
For consistency with the naming of other jobs::
0 runs-on: ubuntu-latest 1 name: build • openbsd 2 defaults:hebasto approvedhebasto commented at 9:00 pm on August 21, 2025: memberACK 486a510bbeff76a9cdb3498798217238631bb70e.eed42f210dci: Bump all tasks to actions/checkout@v5
Also, add name: build • openbsd
maflcko commented at 6:46 am on August 22, 2025: contributorthx, used v5 for all tasks, to avoid having to touch this file again for the same reasonhebasto approvedhebasto commented at 7:31 am on August 22, 2025: memberACK eed42f210d173f0049f238fe4ac13fba935aa917.in .github/workflows/ci.yml:33 in 98414e7d28 outdated
28+ cd /usr/ports/devel/capnproto/ 29+ make install 30+ 31+ - name: Run CI script 32+ run: | 33+ cd ${{ github.workspace }}
ryanofsky commented at 8:51 pm on August 22, 2025:In commit “ci: Add openbsd” (98414e7d28672aea7a218c691d34295d8934ae09)
Seems like this line might redundant according to https://github.com/vmactions/openbsd-vm “you will have the same directory”. Would be nice if if it could be dropped to be simpler and consistent with the other job
hebasto commented at 10:45 am on August 24, 2025:Whendefaults.run.shellruns, the working directory is/root, socd ${{ github.workspace }}is still necessary.in .github/workflows/ci.yml:34 in 98414e7d28 outdated
29+ make install 30+ 31+ - name: Run CI script 32+ run: | 33+ cd ${{ github.workspace }} 34+ CI_CONFIG="ci/configs/openbsd.bash" bash ci/scripts/ci.sh
ryanofsky commented at 9:07 pm on August 22, 2025:In commit “ci: Add openbsd” (98414e7d28672aea7a218c691d34295d8934ae09)
Note: It seems to be necessary to set CI_CONFIG this way instead of with
env:because only github environment variables and environment variables inenvs:are shared with the vm according to https://github.com/vmactions/openbsd-vm/blob/main/README.mdryanofsky approvedryanofsky commented at 9:09 pm on August 22, 2025: collaboratorCode review ACK eed42f210d173f0049f238fe4ac13fba935aa917. Nice changes!ryanofsky merged this on Aug 22, 2025ryanofsky closed this on Aug 22, 2025
ryanofsky referenced this in commit dd68d0f40b on Aug 22, 2025maflcko deleted the branch on Aug 23, 2025Sjors referenced this in commit 38d7eeaddb on Aug 25, 2025Sjors referenced this in commit 18a717abb7 on Aug 25, 2025Sjors referenced this in commit 8ce3ac4bb8 on Aug 25, 2025achow101 referenced this in commit 6ca6f3b37b on Aug 25, 2025janus referenced this in commit ab3a29600f on Sep 15, 2025
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-04 19:30 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me