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
  1. Eunovo commented at 7:50 am on September 3, 2025: contributor
    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.
  2. DrahtBot commented at 7:50 am on September 3, 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.

    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.

  3. 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.
    b6d3dc4419
  4. Eunovo force-pushed on Sep 3, 2025
  5. Eunovo renamed this:
    doc: correct the build instructions for example
    doc: correct the build instructions for the example
    on Sep 3, 2025
  6. 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

    0cmake -B build
    1make -C build mpexample
    2build/example/mpexample
    

    Eunovo commented at 7:59 am on September 3, 2025:

    I tried the cmake -B build approach as well, but this generates the warning kj/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 build pattern, so seems fine to stick to that.

    The following does build for me on macOS:

    0cmake -B build
    1cmake --build build --target mpexample
    

    But then the example itself won’t work:

    0% build/example/mpexample
    1execvp failed: No such file or directory
    2libc++abi: terminating due to uncaught exception of type std::runtime_error: IPC client method call interrupted by disconnect.
    3zsh: 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 mpexample target not mpexamples. mpexample is just the main example binary but it depends on mpcalculator and mpprinter. mpexamples is 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:

    0% build/example/mpexample
    1Enter the equation, or "exit" to quit: How much is the fish?
    2mpprinter: Wow How much is the fish?, that's a tough one.
    
  7. ismaelsadeeq commented at 7:55 am on September 3, 2025: member
    Concept ACK I also come across the issue yesterday while trying to build the example
  8. Sjors commented at 8:05 am on September 3, 2025: member
    ACK b6d3dc44194c62e6baab8315266c0c745f61036b
  9. DrahtBot requested review from ismaelsadeeq on Sep 3, 2025
  10. ismaelsadeeq commented at 8:10 am on September 3, 2025: member
    ACK b6d3dc44194c62e6baab8315266c0c745f61036b
  11. ryanofsky approved
  12. ryanofsky commented at 9:01 pm on September 3, 2025: collaborator
    Code review ACK b6d3dc44194c62e6baab8315266c0c745f61036b. Thanks for the fix!
  13. ryanofsky commented at 9:02 pm on September 3, 2025: collaborator
    Note: this documentation has been broken since #136 which renamed example target to mpexamples
  14. ryanofsky merged this on Sep 4, 2025
  15. ryanofsky closed this on Sep 4, 2025

  16. ryanofsky referenced this in commit a334bbe9b7 on Sep 5, 2025
  17. fanquake referenced this in commit 9c6fa07b12 on Sep 8, 2025
  18. Sjors referenced this in commit 132621fc01 on Sep 23, 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