The make target to build the example executable is "mpexample", not "example", so make example does nothing. This PR changes the documentation to use "mpexamples", because that builds the calculator, printer and example executables.
doc: correct the build instructions for the example #202
pull Eunovo wants to merge 1 commits into bitcoin-core:master from Eunovo:examples-doc-change changing 1 files +5 −2-
Eunovo commented at 7:50 AM on September 3, 2025: contributor
-
DrahtBot commented at 7:50 AM on September 3, 2025: none
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK Sjors, ismaelsadeeq, ryanofsky If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
b6d3dc4419
doc: correct the build instructions for example
The make target to build the example executable is "mpexample" not "example". This commit uses "mpexamples" in the doc, because that builds the calculator, printer and example executables.
- Eunovo force-pushed on Sep 3, 2025
- Eunovo renamed this:
doc: correct the build instructions for example
doc: correct the build instructions for the example
on Sep 3, 2025 -
in doc/usage.md:26 in b6d3dc4419
23 | -build/example/mpexample 24 | +mkdir build 25 | +cd build 26 | +cmake .. 27 | +make mpexamples 28 | +example/mpexample
ismaelsadeeq commented at 7:55 AM on September 3, 2025:I think we prefer
cmake -B build make -C build mpexample build/example/mpexample
Eunovo commented at 7:59 AM on September 3, 2025:I tried the
cmake -B buildapproach as well, but this generates the warningkj/filesystem-disk-unix.c++:1740: warning: PWD environment variable doesn't match current directory; pwd = <PATH_To_LOCAL_REPO>/libmultiprocess. This warning occurs because there's a mismatch between:- The PWD environment variable and
- The actual current directory.
It does not affect the output, but I prefer to avoid the warning entirely.
Sjors commented at 8:05 AM on September 3, 2025:The rest of this project follows the
mkdir build,cd buildpattern, so seems fine to stick to that.The following does build for me on macOS:
cmake -B build cmake --build build --target mpexampleBut then the example itself won't work:
% build/example/mpexample execvp failed: No such file or directory libc++abi: terminating due to uncaught exception of type std::runtime_error: IPC client method call interrupted by disconnect. zsh: abort build/example/mpexample
ryanofsky commented at 8:59 PM on September 3, 2025:In commit "doc: correct the build instructions for example" (b6d3dc44194c62e6baab8315266c0c745f61036b)
Hmm, this all seems ok, but the PWD thing seems like something that could be followed up later. Would want to understand where exactly the warning is coming from and avoid it, maybe by unsetting PWD. @Sjors I think probably the reason you saw that error was because you built the
mpexampletarget notmpexamples.mpexampleis just the main example binary but it depends onmpcalculatorandmpprinter.mpexamplesis a target that builds all 3 binaries. This could also deserve a followup to be less confusing.
Sjors commented at 7:24 AM on September 4, 2025:You're right,
--target mpexamples(with an "s") works:% build/example/mpexample Enter the equation, or "exit" to quit: How much is the fish? mpprinter: Wow How much is the fish?, that's a tough one.ismaelsadeeq commented at 7:55 AM on September 3, 2025: memberConcept ACK I also come across the issue yesterday while trying to build the example
Sjors commented at 8:05 AM on September 3, 2025: memberACK b6d3dc44194c62e6baab8315266c0c745f61036b
DrahtBot requested review from ismaelsadeeq on Sep 3, 2025ismaelsadeeq commented at 8:10 AM on September 3, 2025: memberACK b6d3dc44194c62e6baab8315266c0c745f61036b
ryanofsky approvedryanofsky commented at 9:01 PM on September 3, 2025: collaboratorCode review ACK b6d3dc44194c62e6baab8315266c0c745f61036b. Thanks for the fix!
ryanofsky merged this on Sep 4, 2025ryanofsky closed this on Sep 4, 2025ryanofsky referenced this in commit a334bbe9b7 on Sep 5, 2025fanquake referenced this in commit 9c6fa07b12 on Sep 8, 2025Sjors referenced this in commit 132621fc01 on Sep 23, 2025Contributors
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: 2026-04-20 17:30 UTC
More mirrored repositories can be found on mirror.b10c.me