Skip to content

ci: Add NetBSD job#196

Merged
ryanofsky merged 1 commit intobitcoin-core:masterfrom
hebasto:250823-ci-netbsd
Jan 9, 2026
Merged

ci: Add NetBSD job#196
ryanofsky merged 1 commit intobitcoin-core:masterfrom
hebasto:250823-ci-netbsd

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Aug 23, 2025

@DrahtBot
Copy link

DrahtBot commented Aug 23, 2025

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK ryanofsky

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

hebasto added a commit to hebasto/bitcoin-core-nightly that referenced this pull request Aug 23, 2025
hebasto added a commit to hebasto/bitcoin-core-nightly that referenced this pull request Aug 23, 2025
@ryanofsky
Copy link
Collaborator

Errors all appear to be undefined reference to 'kj::getCaughtExceptionAsKj()' linker errors

@hebasto hebasto closed this Aug 23, 2025
@hebasto hebasto reopened this Aug 23, 2025
@ryanofsky
Copy link
Collaborator

I noticed getCaughtExceptionAsKj doesn't seem to be defined if KJ_NO_EXCEPTIONS is defined. Doesn't look like netbsd is defining that though https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/capnproto/

@ryanofsky ryanofsky closed this Aug 23, 2025
@ryanofsky ryanofsky reopened this Aug 23, 2025
@Sjors
Copy link
Member

Sjors commented Sep 5, 2025

Maybe rebase after #197 for easier review?

@hebasto
Copy link
Member Author

hebasto commented Sep 5, 2025

Maybe rebase after #197 for easier review?

Sure! Rebased.

@ryanofsky
Copy link
Collaborator

Assuming the netbsd job still fails, I guess there are different directions we may go with this issue:

  • If it's possible to fix this with a change in libmultiprocess that would be ideal.
  • If that's not possible, then maybe netbsd job could install from capnproto from source and we could report an issue to netbsd.
  • If installing capnproto from source doesn't work, this will require a fix in capnproto.

And regardless of these, we may want to add a try_compile test and error with suggested workarounds along the lines of #205

@hebasto
Copy link
Member Author

hebasto commented Sep 5, 2025

Assuming the netbsd job still fails, I guess there are different directions we may go with this issue:

  • If it's possible to fix this with a change in libmultiprocess that would be ideal.

  • If that's not possible, then maybe netbsd job could install from capnproto from source and we could report an issue to netbsd.

  • If installing capnproto from source doesn't work, this will require a fix in capnproto.

And regardless of these, we may want to add a try_compile test and error with suggested workarounds along the lines of #205

FWIW, build with depends succeeds: https://github.com/hebasto/bitcoin-core-nightly/actions/runs/17482518540/job/49655572035.

@maflcko
Copy link
Contributor

maflcko commented Dec 22, 2025

Could rebase for fresh CI logs?

@hebasto
Copy link
Member Author

hebasto commented Dec 22, 2025

Could rebase for fresh CI logs?

Sure thing! Done.

@maflcko
Copy link
Contributor

maflcko commented Dec 22, 2025

For reference, the full error is:

[7/7] Linking CXX executable test/mptest
FAILED: [code=1] test/mptest 
: && /usr/pkg/gcc14/bin/g++ -Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter  test/CMakeFiles/mptest.dir/mp/test/test.cpp.o test/CMakeFiles/mptest.dir/mp/test/foo.capnp.c++.o test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-client.c++.o test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-server.c++.o test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-types.c++.o -o test/mptest  -Wl,-rpath,/usr/pkg/lib  libmultiprocess.a  /usr/pkg/lib/libkj-test-1.1.0.so  /usr/pkg/lib/libcapnp-rpc-1.1.0.so  /usr/pkg/lib/libcapnp-1.1.0.so  /usr/pkg/lib/libkj-async-1.1.0.so  /usr/pkg/lib/libkj-1.1.0.so  -lpthread  -Wl,-R/usr/pkg/lib  -pthread  -lpthread && :
/usr/bin/ld: warning: libstdc++.so.9, needed by /usr/pkg/lib/libkj-test-1.1.0.so, may conflict with libstdc++.so.7
/usr/bin/ld: test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-server.c++.o: in function `kj::Maybe<kj::Exception> kj::runCatchingExceptions<mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackParams, mp::test::messages::FooInterface::CallbackResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > >, mp::TypeList<mp::test::FooCallback&, int> >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackParams, mp::test::messages::FooInterface::CallbackResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > > const&, mp::TypeList<mp::test::FooCallback&, int>&&)::{lambda()#1}::operator()()::{lambda()#3}>(mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackParams, mp::test::messages::FooInterface::CallbackResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > >, mp::TypeList<mp::test::FooCallback&, int> >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackParams, mp::test::messages::FooInterface::CallbackResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > > const&, mp::TypeList<mp::test::FooCallback&, int>&&)::{lambda()#1}::operator()()::{lambda()#3}&&)':
foo.capnp.proxy-server.c++:(.text._ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_14CallbackParamsENSB_15CallbackResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENSJ_ILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEEEJNS1_8TypeListIJRNS9_11FooCallbackEiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSV_IJEEERS17_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOS11_[_ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_14CallbackParamsENSB_15CallbackResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENSJ_ILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEEEJNS1_8TypeListIJRNS9_11FooCallbackEiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSV_IJEEERS17_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOS11_]+0x52): undefined reference to `kj::getCaughtExceptionAsKj()'
/usr/bin/ld: test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-server.c++.o: in function `kj::Maybe<kj::Exception> kj::runCatchingExceptions<mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackUniqueParams, mp::test::messages::FooInterface::CallbackUniqueResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > >, mp::TypeList<std::unique_ptr<mp::test::FooCallback, std::default_delete<mp::test::FooCallback> >, int> >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackUniqueParams, mp::test::messages::FooInterface::CallbackUniqueResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > > const&, mp::TypeList<std::unique_ptr<mp::test::FooCallback, std::default_delete<mp::test::FooCallback> >, int>&&)::{lambda()#1}::operator()()::{lambda()#3}>(mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackUniqueParams, mp::test::messages::FooInterface::CallbackUniqueResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > >, mp::TypeList<std::unique_ptr<mp::test::FooCallback, std::default_delete<mp::test::FooCallback> >, int> >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackUniqueParams, mp::test::messages::FooInterface::CallbackUniqueResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > > const&, mp::TypeList<std::unique_ptr<mp::test::FooCallback, std::default_delete<mp::test::FooCallback> >, int>&&)::{lambda()#1}::operator()()::{lambda()#3}&&)':
foo.capnp.proxy-server.c++:(.text._ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_20CallbackUniqueParamsENSB_21CallbackUniqueResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENSJ_ILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEEEJNS1_8TypeListIJSt10unique_ptrINS9_11FooCallbackESt14default_deleteISX_EEiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSV_IJEEERS1A_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOS14_[_ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_20CallbackUniqueParamsENSB_21CallbackUniqueResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENSJ_ILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEEEJNS1_8TypeListIJSt10unique_ptrINS9_11FooCallbackESt14default_deleteISX_EEiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSV_IJEEERS1A_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOS14_]+0x52): undefined reference to `kj::getCaughtExceptionAsKj()'
/usr/bin/ld: test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-server.c++.o: in function `kj::Maybe<kj::Exception> kj::runCatchingExceptions<mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackSharedParams, mp::test::messages::FooInterface::CallbackSharedResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > >, mp::TypeList<std::shared_ptr<mp::test::FooCallback>, int> >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackSharedParams, mp::test::messages::FooInterface::CallbackSharedResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > > const&, mp::TypeList<std::shared_ptr<mp::test::FooCallback>, int>&&)::{lambda()#1}::operator()()::{lambda()#3}>(mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackSharedParams, mp::test::messages::FooInterface::CallbackSharedResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > >, mp::TypeList<std::shared_ptr<mp::test::FooCallback>, int> >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackSharedParams, mp::test::messages::FooInterface::CallbackSharedResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > > const&, mp::TypeList<std::shared_ptr<mp::test::FooCallback>, int>&&)::{lambda()#1}::operator()()::{lambda()#3}&&)':
foo.capnp.proxy-server.c++:(.text._ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_20CallbackSharedParamsENSB_21CallbackSharedResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENSJ_ILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEEEJNS1_8TypeListIJSt10shared_ptrINS9_11FooCallbackEEiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSV_IJEEERS18_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOS12_[_ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_20CallbackSharedParamsENSB_21CallbackSharedResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENSJ_ILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEEEJNS1_8TypeListIJSt10shared_ptrINS9_11FooCallbackEEiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSV_IJEEERS18_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOS12_]+0x52): undefined reference to `kj::getCaughtExceptionAsKj()'
/usr/bin/ld: test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-server.c++.o: in function `kj::Maybe<kj::Exception> kj::runCatchingExceptions<mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::SaveCallbackParams, mp::test::messages::FooInterface::SaveCallbackResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerCall>, mp::TypeList<std::shared_ptr<mp::test::FooCallback> > >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::SaveCallbackParams, mp::test::messages::FooInterface::SaveCallbackResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerCall> const&, mp::TypeList<std::shared_ptr<mp::test::FooCallback> >&&)::{lambda()#1}::operator()()::{lambda()#3}>(mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::SaveCallbackParams, mp::test::messages::FooInterface::SaveCallbackResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerCall>, mp::TypeList<std::shared_ptr<mp::test::FooCallback> > >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::SaveCallbackParams, mp::test::messages::FooInterface::SaveCallbackResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Callback, 17>, mp::ServerCall> const&, mp::TypeList<std::shared_ptr<mp::test::FooCallback> >&&)::{lambda()#1}::operator()()::{lambda()#3}&&)':
foo.capnp.proxy-server.c++:(.text._ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_18SaveCallbackParamsENSB_19SaveCallbackResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENS1_10ServerCallEEEJNS1_8TypeListIJSt10shared_ptrINS9_11FooCallbackEEEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSO_IJEEERS11_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOSV_[_ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_18SaveCallbackParamsENSB_19SaveCallbackResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENS1_10ServerCallEEEJNS1_8TypeListIJSt10shared_ptrINS9_11FooCallbackEEEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSO_IJEEERS11_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOSV_]+0x52): undefined reference to `kj::getCaughtExceptionAsKj()'
/usr/bin/ld: test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-server.c++.o: in function `kj::Maybe<kj::Exception> kj::runCatchingExceptions<mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackSavedParams, mp::test::messages::FooInterface::CallbackSavedResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> >, mp::TypeList<int> >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackSavedParams, mp::test::messages::FooInterface::CallbackSavedResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > const&, mp::TypeList<int>&&)::{lambda()#1}::operator()()::{lambda()#3}>(mp::PassField<mp::Accessor<mp::foo_fields::Context, 17>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackSavedParams, mp::test::messages::FooInterface::CallbackSavedResults> >, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> >, mp::TypeList<int> >(mp::Priority<1>, mp::TypeList<>, mp::ServerInvokeContext<mp::ProxyServer<mp::test::messages::FooInterface>, capnp::CallContext<mp::test::messages::FooInterface::CallbackSavedParams, mp::test::messages::FooInterface::CallbackSavedResults> >&, mp::ServerField<1, mp::Accessor<mp::foo_fields::Arg, 1>, mp::ServerRet<mp::Accessor<mp::foo_fields::Result, 2>, mp::ServerCall> > const&, mp::TypeList<int>&&)::{lambda()#1}::operator()()::{lambda()#3}&&)':
foo.capnp.proxy-server.c++:(.text._ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_19CallbackSavedParamsENSB_20CallbackSavedResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEJNS1_8TypeListIJiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSS_IJEEERS12_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOSW_[_ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_19CallbackSavedParamsENSB_20CallbackSavedResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEJNS1_8TypeListIJiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSS_IJEEERS12_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOSW_]+0x52): undefined reference to `kj::getCaughtExceptionAsKj()'
/usr/bin/ld: test/CMakeFiles/mptest.dir/mp/test/foo.capnp.proxy-server.c++.o:foo.capnp.proxy-server.c++:(.text._ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_22CallbackExtendedParamsENSB_23CallbackExtendedResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENSJ_ILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEEEJNS1_8TypeListIJRNS9_16ExtendedCallbackEiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSV_IJEEERS17_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOS11_[_ZN2kj21runCatchingExceptionsIZZN2mp9PassFieldINS1_8AccessorINS1_10foo_fields7ContextELi17EEENS1_19ServerInvokeContextINS1_11ProxyServerINS1_4test8messages12FooInterfaceEEEN5capnp11CallContextINSB_22CallbackExtendedParamsENSB_23CallbackExtendedResultsEEEEENS1_11ServerFieldILi1ENS3_INS4_8CallbackELi17EEENSJ_ILi1ENS3_INS4_3ArgELi1EEENS1_9ServerRetINS3_INS4_6ResultELi2EEENS1_10ServerCallEEEEEEEJNS1_8TypeListIJRNS9_16ExtendedCallbackEiEEEEEENSt9enable_ifIXsrSt7is_sameIDTclsrT_3getcldtdtfp1_12call_context9getParamsEEENS1_7Context6ReaderEE5valueENS_7PromiseINT0_11CallContextEEEE4typeENS1_8PriorityILi1EEENSV_IJEEERS17_RKT1_DpOT2_ENUlvE_clEvEUlvE1_EENS_5MaybeINS_9ExceptionEEEOS11_]+0x52): more undefined references to `kj::getCaughtExceptionAsKj()' follow
collect2: error: ld returned 1 exit status

@hebasto
Copy link
Member Author

hebasto commented Dec 22, 2025

I built the updated devel/capnproto-1.2.0 from source and am still encountering the same errors.

@hebasto hebasto force-pushed the 250823-ci-netbsd branch 3 times, most recently from 1d93480 to a5a4d6d Compare December 22, 2025 21:05
@hebasto hebasto marked this pull request as ready for review December 22, 2025 21:15
@hebasto
Copy link
Member Author

hebasto commented Dec 22, 2025

CI is green now. Undrafted.

@hebasto
Copy link
Member Author

hebasto commented Dec 22, 2025

Assuming the netbsd job still fails, I guess there are different directions we may go with this issue:

  • If it's possible to fix this with a change in libmultiprocess that would be ideal.

  • If that's not possible, then maybe netbsd job could install from capnproto from source and we could report an issue to netbsd.

  • If installing capnproto from source doesn't work, this will require a fix in capnproto.

And regardless of these, we may want to add a try_compile test and error with suggested workarounds along the lines of #205

Officially, GCC has supported the __has_feature extension since version 14. On NetBSD, however, GCC 10.5.0, which is used to build binary packages, already implements __has_feature, but __has_feature(cxx_exceptions) evaluates to false for some reason. This makes the following code problematic:https://github.com/capnproto/capnproto/blob/584db417ecf8377c7d8cd1099bf5fbccd57d68aa/c%2B%2B/src/kj/common.h#L154-L175

As a result, KJ_NO_EXCEPTIONS is defined to 1 by default. This behaviour is overridden in this PR.

@hebasto
Copy link
Member Author

hebasto commented Dec 30, 2025

The implementation of the vmactions/*-vm actions has been significantly reworked recently, so this PR has been adjusted accordingly.

A side note: all vmactions/*-vm actions are now unconditionally cached using the repository's GHA quota.

@hebasto
Copy link
Member Author

hebasto commented Dec 31, 2025

Reworked to test all supported NetBSD releases.

Copy link
Collaborator

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review d6f80ca. Thanks for the update and nice to see this working! If you can add a few comments to explain (whatever is known about) a few mysterious things in this config, I think it would be ok to merge this. Specific questions I have are below.

Comment on lines 40 to 49
cvs -danoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P \
pkgsrc/devel/capnproto \
pkgsrc/devel/libtool-base \
pkgsrc/devel/pkgconf \
pkgsrc/devel/zlib \
pkgsrc/lang/gcc15 \
pkgsrc/mk \
pkgsrc/pkgtools \
pkgsrc/security/openssl \
pkgsrc/sysutils/install-sh/files
Copy link
Collaborator

Choose a reason for hiding this comment

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

In commit "ci: Add NetBSD job" (d6f80ca)

Can you add a comment about where this list of dependencies comes from? I would like have some idea of how it can be updated in the future in the case of a new release or breakage.

I see openssl and zlib included at the bottom of https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/capnproto/Makefile?rev=1.11 so it makes sense they need to be included in the CVS checkout. But i'm not sure about the other ones. Especially gcc15 which seems to be checked out but not ever mentioned in the logs after the cvs checkout. So maybe it is not being used? The gcc15 version is also surprising since gcc14 seems to be used in other places this PR.

If you don't have answers to all the questions here that is fine, it would just help to have a comment saying where this comes from, so it is clear which parts of the netbsd config were intentionally chosen and which parts we are unsure about.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you add a comment about where this list of dependencies comes from?

The entire run option is commented:

# capnproto prerequisites.
# See the following "Install capnproto" step.
run: |

Especially gcc15 which seems to be checked out but not ever mentioned in the logs after the cvs checkout. So maybe it is not being used? The gcc15 version is also surprising since gcc14 seems to be used in other places this PR.

I was surprised as well. However, the build fails without lang/gcc15:

make: "/usr/pkgsrc/mk/compiler/gcc.mk" line 311: Could not find ../../lang/gcc15/version.mk
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/pkgsrc/devel/capnproto

The same applies to all other packages.

Copy link
Collaborator

Choose a reason for hiding this comment

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

re: #196 (comment)

I guess my question is literally where did this list of dependencies come from originally? Did you look at netbsd package information at a web url? Look at cvs sources? Have an LLM generate it? Just arrive at it by trial and error? It would be helpful to know more so we can know how to maintain this.

And thanks for explaining gcc15 dependency and providing the error. It would be good to have a comment explaining discrepancy with gcc 14 like: "gcc15 is referenced here because the pkgsrc framework requires lang/gcc15/version.mk to exist during the "make install" step below, even though we compile our project with gcc14."

CI_DESC="CI config for NetBSD"
CI_DIR=build-netbsd
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
export CXX="/usr/pkg/gcc14/bin/g++"
Copy link
Collaborator

Choose a reason for hiding this comment

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

In commit "ci: Add NetBSD job" (d6f80ca)

Is it necessary to hardcode gcc 14 here? If the gcc version in this file needs to be kept in sync with the gcc version ci.yml it would be helpful to have a comment both places stating this. Or if there is a way to use a default system compiler or a default gcc version and not hardcode any version that would seem even nicer.

Copy link
Member Author

@hebasto hebasto Jan 9, 2026

Choose a reason for hiding this comment

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

Is it necessary to hardcode gcc 14 here? ... if there is a way to use a default system compiler or a default gcc version and not hardcode any version that would seem even nicer.

On NetBSD 9.4, the default compiler is GCC 7.5.0, and the build fails at the configuration stage.

On NetBSD 10.1, the default compiler is GCC 10.5.0, and the build fails as well:

 [6/7] Building CXX object CMakeFiles/multiprocess.dir/src/mp/proxy.cpp.o
FAILED: [code=1] CMakeFiles/multiprocess.dir/src/mp/proxy.cpp.o 
/usr/bin/c++  -I/home/runner/work/libmultiprocess/libmultiprocess/build-netbsd/include -I/home/runner/work/libmultiprocess/libmultiprocess/include -isystem /usr/pkg/include -Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -std=gnu++2a -pthread -MD -MT CMakeFiles/multiprocess.dir/src/mp/proxy.cpp.o -MF CMakeFiles/multiprocess.dir/src/mp/proxy.cpp.o.d -o CMakeFiles/multiprocess.dir/src/mp/proxy.cpp.o -c /home/runner/work/libmultiprocess/libmultiprocess/src/mp/proxy.cpp
In file included from /home/runner/work/libmultiprocess/libmultiprocess/src/mp/proxy.cpp:8:
/home/runner/work/libmultiprocess/libmultiprocess/include/mp/proxy-types.h:527:2: error: extra ‘;’ [-Werror=pedantic]
  527 | };
      |  ^
cc1plus: all warnings being treated as errors
ninja: build stopped: cannot make progress due to previous errors.

Copy link
Member Author

Choose a reason for hiding this comment

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

If the gcc version in this file needs to be kept in sync with the gcc version ci.yml it would be helpful to have a comment both places stating this.

Thanks! Updated.

Copy link
Collaborator

Choose a reason for hiding this comment

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

re: #196 (comment)

Thanks for providing the errors. It appears the reason for hardcoding gcc14 is that if you don't hardcode it, netbsd uses much older versions of gcc that don't recognize c++20 or fail with -Werror=pedantic due to a trailing semicolon.

I guess my next question would be why use gcc14 instead of another version of GCC? Was the choice based on trial and error, or any particular reasoning?

I think my suggestion would be to add a comment to netbsd.bash explaining the need for hardcoding and the choice of hardcoded version. For example, "Hardcode GCC 14, since default GCC versions installed by netbsd are older and may not be compatible with libmultiprocess. GCC 14 was chosen because it's the latest compiler available on all versions of netbsd that we test. Note that the GCC version specified here must match the version specified in pkg_add in ci.yml." I don't know if this comment is accurate, but whatever version of this comment that would be accurate would be helpful so we know how this needs to be maintained going forward.

Copy link
Collaborator

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK 47a5d47. Thanks for providing all the additional error information. That was really helpful and cleared up most of my confusion. I still think it would be good to add more comments here explaining the reasons behind the configuration so the files can be updated less confusion and guesswork. I suggested two comments below, but would be happy to merge the PR as-is if that would be better or more convenient.

Comment on lines 40 to 49
cvs -danoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P \
pkgsrc/devel/capnproto \
pkgsrc/devel/libtool-base \
pkgsrc/devel/pkgconf \
pkgsrc/devel/zlib \
pkgsrc/lang/gcc15 \
pkgsrc/mk \
pkgsrc/pkgtools \
pkgsrc/security/openssl \
pkgsrc/sysutils/install-sh/files
Copy link
Collaborator

Choose a reason for hiding this comment

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

re: #196 (comment)

I guess my question is literally where did this list of dependencies come from originally? Did you look at netbsd package information at a web url? Look at cvs sources? Have an LLM generate it? Just arrive at it by trial and error? It would be helpful to know more so we can know how to maintain this.

And thanks for explaining gcc15 dependency and providing the error. It would be good to have a comment explaining discrepancy with gcc 14 like: "gcc15 is referenced here because the pkgsrc framework requires lang/gcc15/version.mk to exist during the "make install" step below, even though we compile our project with gcc14."

CI_DESC="CI config for NetBSD"
CI_DIR=build-netbsd
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
export CXX="/usr/pkg/gcc14/bin/g++"
Copy link
Collaborator

Choose a reason for hiding this comment

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

re: #196 (comment)

Thanks for providing the errors. It appears the reason for hardcoding gcc14 is that if you don't hardcode it, netbsd uses much older versions of gcc that don't recognize c++20 or fail with -Werror=pedantic due to a trailing semicolon.

I guess my next question would be why use gcc14 instead of another version of GCC? Was the choice based on trial and error, or any particular reasoning?

I think my suggestion would be to add a comment to netbsd.bash explaining the need for hardcoding and the choice of hardcoded version. For example, "Hardcode GCC 14, since default GCC versions installed by netbsd are older and may not be compatible with libmultiprocess. GCC 14 was chosen because it's the latest compiler available on all versions of netbsd that we test. Note that the GCC version specified here must match the version specified in pkg_add in ci.yml." I don't know if this comment is accurate, but whatever version of this comment that would be accurate would be helpful so we know how this needs to be maintained going forward.

@hebasto
Copy link
Member Author

hebasto commented Jan 9, 2026

@ryanofsky

Thanks for the suggested comments, which were gratefully incorporated.

Copy link
Collaborator

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK 861da39. Thanks for your persistence debugging issues here and answering all my questions

pkgsrc/devel/libtool-base \
pkgsrc/devel/pkgconf \
pkgsrc/devel/zlib \
`# gcc15 is referenced here because the pkgsrc framework requires lang/gcc15/version.mk to exist` \
Copy link
Collaborator

Choose a reason for hiding this comment

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

In commit "ci: Add NetBSD job" (861da39)

Interesting, have not seen `# comment` used before in bash, but makes sense here

@ryanofsky ryanofsky merged commit d0fc108 into bitcoin-core:master Jan 9, 2026
10 checks passed
@hebasto hebasto deleted the 250823-ci-netbsd branch January 9, 2026 16:15
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jan 21, 2026
…8f7d

1fc65008f7d Merge bitcoin-core/libmultiprocess#237: Made SpawnProcess() behavior safe post fork()
5205a87cd90 test: check SpawnProcess post-fork safety
69652f0edfa Precompute argv before fork in SpawnProcess
30a8681de62 SpawnProcess: avoid fd leak on close failure
d0fc1081d09 Merge bitcoin-core/libmultiprocess#196: ci: Add NetBSD job
7b171f45bfc Merge bitcoin-core/libmultiprocess#234: doc: Fix typos and grammar in documentation and comments
861da39cae9 ci: Add NetBSD job
458745e3940 Fix various typos, spelling mistakes, and grammatical errors in design.md and source code comments.
585decc8561 Merge bitcoin-core/libmultiprocess#236: ci: Install binary package `capnproto` on OpenBSD instead of building it
14e926a3ff3 refactor: extract MakeArgv helper
1ee909393f4 ci: Install binary package `capnproto` on OpenBSD instead of building it
470fc518d4b Merge bitcoin-core/libmultiprocess#230: cmake: add ONLY_CAPNP target_capnp_sources option
2d8886f26c4 Merge bitcoin-core/libmultiprocess#228: Add versions.md and version.h files describing version branches and tags
c1838be565d Merge bitcoin-core/libmultiprocess#225: Improve and document act support
a173f1704ce Merge bitcoin-core/libmultiprocess#223: ci: Replace nix-shell with equivalent nix develop command
625eaca42fb Merge bitcoin-core/libmultiprocess#229: Design Documentation Update
cc234be73a6 Design doc update
81c652687b8 cmake: add ONLY_CAPNP target_capnp_sources option
6e01d2d766e Add versions.md and version.h files describing version branches and tags
4e3f8fa0d2c doc: add instructions for using act
81712ff6bbf ci: disable KVM and sandbox inside act containers
18a2237a8ef ci: Replace nix-shell with equivalent nix develop command

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 1fc65008f7d64161e84c08cbd93109a23dd6a1e9
fanquake added a commit to bitcoin/bitcoin that referenced this pull request Jan 21, 2026
…misc.py timeout

7562e2a Squashed 'src/ipc/libmultiprocess/' changes from a4f92969649..1fc65008f7d (Ryan Ofsky)

Pull request description:

  Includes:

  - bitcoin-core/libmultiprocess#229
  - bitcoin-core/libmultiprocess#223
  - bitcoin-core/libmultiprocess#225
  - bitcoin-core/libmultiprocess#228
  - bitcoin-core/libmultiprocess#230
  - bitcoin-core/libmultiprocess#236
  - bitcoin-core/libmultiprocess#234
  - bitcoin-core/libmultiprocess#196
  - bitcoin-core/libmultiprocess#237

  The last change bitcoin-core/libmultiprocess#237 is expected to fix issue #34187 occasional `rpc_misc.py` test hang. The other changes are just documentation & ci updates.

  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:
  sedited:
    ACK 73d0fe6

Tree-SHA512: 82fb2973b8fb5e792dcff1adde0b158ac67cc6a9aeef4465e0bbdfbef88e41d44d9bad53b1d467be47bf594befa02bd8e7829c0a0bc67aaaeb4ca1e09b672a32
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.

5 participants