Skip to content

Commit 043895e

Browse files
rustyrussellendothermicdev
authored andcommitted
build: fix rust parallel build race.
plugins/Makefile has target/${RUST_PROFILE}/cln-grpc depend on the generated files via $(MSGGEN_GENALL), but cln-rpc/Makefile adds to that variable, so needs to be included first. Here's an example build error: ``` Combining schemas from /home/rusty/lightning-ltest/doc/schemas into /home/rusty/lightning-ltest/contrib/msggen/msggen/schema.json Created /home/rusty/lightning-ltest/contrib/msggen/msggen/schema.json from 2 files error: failed to run custom build command for `cln-grpc v0.3.0 (/home/rusty/lightning-ltest/cln-grpc)` Caused by: process didn't exit successfully: `/home/rusty/lightning-ltest/target/debug/build/cln-grpc-95489e3ba33c0ab3/build-script-build` (exit status: 101) --- stdout cargo:rerun-if-changed=proto/node.proto cargo:rerun-if-changed=proto --- stderr thread 'main' panicked at cln-grpc/build.rs:7:10: called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: node.proto:134:52: \"AskreneageResponse\" is not defined.\nnode.proto:135:23: \"GetroutesRequest\" is not defined.\nnode.proto:135:50: \"GetroutesResponse\" is not defined.\nnode.proto:136:32: \"AskrenedisablenodeRequest\" is not defined.\nnode.proto:136:68: \"AskrenedisablenodeResponse\" is not defined.\nnode.proto:137:34: \"AskreneinformchannelRequest\" is not defined.\nnode.proto:137:72: \"AskreneinformchannelResponse\" is not defined.\nnode.proto:138:34: \"AskrenecreatechannelRequest\" is not defined.\nnode.proto:138:72: \"AskrenecreatechannelResponse\" is not defined.\nnode.proto:139:34: \"AskreneupdatechannelRequest\" is not defined.\nnode.proto:139:72: \"AskreneupdatechannelResponse\" is not defined.\nnode.proto:140:32: \"AskrenebiaschannelRequest\" is not defined.\nnode.proto:140:68: \"AskrenebiaschannelResponse\" is not defined.\nnode.proto:141:37: \"AskrenelistreservationsRequest\" is not defined.\nnode.proto:141:78: \"AskrenelistreservationsResponse\" is not defined.\nnode.proto:142:32: \"InjectpaymentonionRequest\" is not defined.\nnode.proto:142:68: \"InjectpaymentonionResponse\" is not defined.\nnode.proto:143:18: \"XpayRequest\" is not defined.\nnode.proto:143:40: \"XpayResponse\" is not defined.\nnode.proto:145:33: \"StreamBlockAddedRequest\" is not defined.\nnode.proto:145:74: \"BlockAddedNotification\" is not defined.\nnode.proto:146:40: \"StreamChannelOpenFailedRequest\" is not defined.\nnode.proto:146:88: \"ChannelOpenFailedNotification\" is not defined.\nnode.proto:147:36: \"StreamChannelOpenedRequest\" is not defined.\nnode.proto:147:80: \"ChannelOpenedNotification\" is not defined.\nnode.proto:148:30: \"StreamConnectRequest\" is not defined.\nnode.proto:148:68: \"PeerConnectNotification\" is not defined.\nnode.proto:149:32: \"StreamCustomMsgRequest\" is not defined.\nnode.proto:149:72: \"CustomMsgNotification\" is not defined.\n" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace make: *** [plugins/Makefile:305: target/debug/cln-grpc] Error 101 make: *** Waiting for unfinished jobs.... ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 0e2f457 commit 043895e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,17 +369,15 @@ include doc/Makefile
369369
include contrib/msggen/Makefile
370370
include devtools/Makefile
371371
include tools/Makefile
372+
ifneq ($(RUST),0)
373+
include cln-rpc/Makefile
374+
endif
372375
include plugins/Makefile
373376
include tests/plugins/Makefile
374377

375378
ifneq ($(FUZZING),0)
376379
include tests/fuzz/Makefile
377380
endif
378-
ifneq ($(RUST),0)
379-
include cln-rpc/Makefile
380-
include plugins/rest-plugin/Makefile
381-
endif
382-
include cln-grpc/Makefile
383381

384382
ifneq ($V,1)
385383
MSGGEN_ARGS := -s

plugins/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ target/${RUST_PROFILE}/clnrest: ${CLN_REST_PLUGIN_SRC}
307307
cargo build ${CARGO_OPTS} --bin clnrest
308308

309309
ifneq ($(RUST),0)
310+
include plugins/rest-plugin/Makefile
310311
DEFAULT_TARGETS += $(CLN_PLUGIN_EXAMPLES) plugins/cln-grpc plugins/clnrest
311312
endif
312313

0 commit comments

Comments
 (0)