-
Notifications
You must be signed in to change notification settings - Fork 34
ci: Add openbsd #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add openbsd #195
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee 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. |
- uses: actions/checkout@v4 | ||
|
||
- name: Start OpenBSD VM | ||
uses: vmactions/openbsd-vm@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?)
Why doesn't this fail? bitcoin/bitcoin#33219 |
It 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 bitcoin/bitcoin#33219 (comment) here too |
36b4765
to
4333bf8
Compare
Force pushed to fix the bugs found by the LLM 😅 (existential sweat smile) |
Build failure as expected in https://github.com/bitcoin-core/libmultiprocess/actions/runs/17128243881/job/48585209051?pr=195#step:5:2:
|
This is required for OpenBSD. Authored by Ryan in bitcoin/bitcoin#33219 (comment)
In dd40897 https://github.com/bitcoin-core/libmultiprocess/actions/runs/17128945048/job/48587647670?pr=195 looks like a new error linking the mpexample program |
I 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. |
thx, excluded. Looks like it passes now |
Actually I think I see what was causing the error. I think we just need to get rid of this line: libmultiprocess/example/CMakeLists.txt Line 27 in cb170d4
It is probably safe to just delete. Chatgpt says it is only needed on older versions of gcc so could be replaced with: # Only link stdc++fs on ancient GCC that needed it (we don't support these, but document the rule).
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
target_link_libraries(mpexample PRIVATE stdc++fs)
endif() But I think we don't care about compilers that old (2019) |
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)
thx, removed it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 486a510.
Also, add name: build • openbsd
thx, used v5 for all tasks, to avoid having to touch this file again for the same reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK eed42f2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK eed42f2. Nice changes!
|
||
- name: Run CI script | ||
run: | | ||
cd ${{ github.workspace }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In commit "ci: Add openbsd" (98414e7)
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When defaults.run.shell
runs, the working directory is /root
, so cd ${{ github.workspace }}
is still necessary.
- name: Run CI script | ||
run: | | ||
cd ${{ github.workspace }} | ||
CI_CONFIG="ci/configs/openbsd.bash" bash ci/scripts/ci.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In commit "ci: Add openbsd" (98414e7)
Note: It seems to be necessary to set CI_CONFIG this way instead of with env:
because only github environment variables and environment variables in envs:
are shared with the vm according to https://github.com/vmactions/openbsd-vm/blob/main/README.md
…6f1e54 1b8d4a6f1e54 Merge bitcoin-core/libmultiprocess#194: mpgen: Work around c++20 / capnproto 0.8 incompatibility f1fad396bf5f Merge bitcoin-core/libmultiprocess#195: ci: Add openbsd eed42f210d17 ci: Bump all tasks to actions/checkout@v5 486a510bbeff ci: Remove ancient and problematic -lstdc++fs in mpexample dd40897efe79 Add missing thread include 98414e7d2867 ci: Add openbsd dc3ba2204606 cmake, doc: Add check for CVE-2022-46149 cb170d4913a2 Merge bitcoin-core/libmultiprocess#193: build: require CapnProto 0.7.0 or better 8ceeaa6ae401 ci: Add olddeps job to test old dependencies versions c4cb758eccb5 mpgen: Work around c++20 / capnproto 0.8 incompatibility 30930dff7b06 build: require CapnProto 0.7.0 or better git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 1b8d4a6f1e54b92708bd2ad627ec6d440a1daf3d
1b8d4a6f1e Merge bitcoin-core/libmultiprocess#194: mpgen: Work around c++20 / capnproto 0.8 incompatibility f1fad396bf Merge bitcoin-core/libmultiprocess#195: ci: Add openbsd eed42f210d ci: Bump all tasks to actions/checkout@v5 486a510bbe ci: Remove ancient and problematic -lstdc++fs in mpexample dd40897efe Add missing thread include 98414e7d28 ci: Add openbsd dc3ba22046 cmake, doc: Add check for CVE-2022-46149 cb170d4913 Merge bitcoin-core/libmultiprocess#193: build: require CapnProto 0.7.0 or better 8ceeaa6ae4 ci: Add olddeps job to test old dependencies versions c4cb758ecc mpgen: Work around c++20 / capnproto 0.8 incompatibility 30930dff7b build: require CapnProto 0.7.0 or better git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 1b8d4a6f1e54b92708bd2ad627ec6d440a1daf3d
1b8d4a6f1e Merge bitcoin-core/libmultiprocess#194: mpgen: Work around c++20 / capnproto 0.8 incompatibility f1fad396bf Merge bitcoin-core/libmultiprocess#195: ci: Add openbsd eed42f210d ci: Bump all tasks to actions/checkout@v5 486a510bbe ci: Remove ancient and problematic -lstdc++fs in mpexample dd40897efe Add missing thread include 98414e7d28 ci: Add openbsd dc3ba22046 cmake, doc: Add check for CVE-2022-46149 cb170d4913 Merge bitcoin-core/libmultiprocess#193: build: require CapnProto 0.7.0 or better 8ceeaa6ae4 ci: Add olddeps job to test old dependencies versions c4cb758ecc mpgen: Work around c++20 / capnproto 0.8 incompatibility 30930dff7b build: require CapnProto 0.7.0 or better git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 1b8d4a6f1e54b92708bd2ad627ec6d440a1daf3d
1b8d4a6f1e Merge bitcoin-core/libmultiprocess#194: mpgen: Work around c++20 / capnproto 0.8 incompatibility f1fad396bf Merge bitcoin-core/libmultiprocess#195: ci: Add openbsd eed42f210d ci: Bump all tasks to actions/checkout@v5 486a510bbe ci: Remove ancient and problematic -lstdc++fs in mpexample dd40897efe Add missing thread include 98414e7d28 ci: Add openbsd dc3ba22046 cmake, doc: Add check for CVE-2022-46149 cb170d4913 Merge bitcoin-core/libmultiprocess#193: build: require CapnProto 0.7.0 or better 8ceeaa6ae4 ci: Add olddeps job to test old dependencies versions c4cb758ecc mpgen: Work around c++20 / capnproto 0.8 incompatibility 30930dff7b build: require CapnProto 0.7.0 or better git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 1b8d4a6f1e54b92708bd2ad627ec6d440a1daf3d
dd68d0f Squashed 'src/ipc/libmultiprocess/' changes from b4120d34bad2..1b8d4a6f1e54 (Ryan Ofsky) Pull request description: Includes: - bitcoin-core/libmultiprocess#193 - bitcoin-core/libmultiprocess#195 - bitcoin-core/libmultiprocess#194 These changes are needed to build fix libmultiprocess build issue that happens on OpenBSD and work around an incompatibility between GCC versions <14 and cap'nproto versions <0.9 when compiling with c++20 that was fixed upstream in capnproto/capnproto#1170. The issues were reported: - #33219 - #33176 - willcl-ark/bitcoin-core-docker#43 The fixes added CI jobs upstream to catch these issues earlier. The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh) ACKs for top commit: Sjors: ACK 323b3fd achow101: ACK 323b3fd hebasto: ACK 323b3fd, I've reproduced the subtree update locally. The two issues noted in this PR are unrelated to its changes and can be addressed separately. Tree-SHA512: 3d03693d269c04d9ed10e8dd03e8059062929f37616d974c6fdf346ee62737c990ec550e013575e7474bfa4efcead3938bf9b259d62c073d76e720ebafe4ff66
Requested in bitcoin/bitcoin#33219 (comment)