Parallel build does not work on OS X #7834

issue alexreg opened this issue on April 7, 2016
  1. alexreg commented at 6:19 PM on April 7, 2016: contributor

    I'm building via a MacPorts portfile, but it's no difference to building via the command line. Here's the full log.

    https://cloudup.com/co19esAfMhG

    Note that a non-parallel build works just fine.

  2. laanwj added the label Build system on Apr 7, 2016
  3. jonasschnelli commented at 6:40 PM on April 7, 2016: contributor

    I'm not familiar with the MacPorts portfile parallel building. But a simple ./autogen, ./configure, make -j5 works for me.

    You build log looks after a upstream issue.

  4. jonasschnelli added the label Mac on Apr 7, 2016
  5. paveljanik commented at 6:53 PM on April 7, 2016: contributor

    I can reproduce something similar on master:

    bitcoin-master$ make clean >/dev/null 2>&1; make -j8 -w all appbundle 2>&1 | grep error
      CXX      script/libbitcoinconsensus_la-script_error.lo
      CXX      script/libbitcoin_consensus_a-script_error.o
    libtool:   error: 'lib/libunivalue_la-univalue_read.lo' is not a valid libtool object
    bitcoin-master$ 
    
  6. alexreg commented at 6:57 PM on April 7, 2016: contributor

    Well, the error for me is rather mysterious and odd.

    :error:build Failed to build bitcoin: command execution failed
    :debug:build Error code: CHILDSTATUS 24589 2
    :debug:build Backtrace: command execution failed
    

    What does that even mean?

  7. jonasschnelli commented at 6:59 PM on April 7, 2016: contributor

    I had never seen that before. Very likely something from MacPorts.

  8. paveljanik commented at 7:02 PM on April 7, 2016: contributor

    Two lines before this:

    :info:build Exit code: 2
    :error:build Failed to build bitcoin: command execution failed
    

    Ie. make failed with error code 2. This is the same for me now on master now....

    bitcoin-master pavel$ make clean >/dev/null 2>&1; make -j8 -w all appbundle >/dev/null 2>&1; echo $?
    2
    bitcoin-master pavel$ 
    

    Without appbundle, it returns 0 here.

  9. alexreg commented at 7:04 PM on April 7, 2016: contributor

    Interesting. So it seems the appbundle target is the non-parallelisable bit.

    On 7 Apr 2016, at 20:03, paveljanik notifications@github.com wrote:

    Two lines before this:

    :info:build Exit code: 2 :error:build Failed to build bitcoin: command execution failed Ie. make failed with error code 2. This is the same for me now on master now....

    bitcoin-master pavel$ make clean >/dev/null 2>&1; make -j8 -w all appbundle >/dev/null 2>&1; echo $? 2 bitcoin-master pavel$ Without appbundle, it returns 0 here.

    — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub #7834 (comment)

  10. alexreg commented at 7:39 PM on April 7, 2016: contributor

    The parallel build seems to be non-deterministically succeeding/failing.

    On 7 Apr 2016, at 20:03, paveljanik notifications@github.com wrote:

    Two lines before this:

    :info:build Exit code: 2 :error:build Failed to build bitcoin: command execution failed Ie. make failed with error code 2. This is the same for me now on master now....

    bitcoin-master pavel$ make clean >/dev/null 2>&1; make -j8 -w all appbundle >/dev/null 2>&1; echo $? 2 bitcoin-master pavel$ Without appbundle, it returns 0 here.

    — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub #7834 (comment)

  11. paveljanik commented at 6:03 AM on April 8, 2016: contributor

    Looks like univalue is not parallel build safe when run from top level makefile with appbundle target. But it alone is parallel build safe here... @theuni Do you have any idea?

  12. theuni commented at 4:36 PM on April 8, 2016: member

    Interesting. I'm guessing we have overlapping recursive builds. I don't see anything that would lead to that though. @paveljanik: do you see the same problem running make -C src qt/bitcoin-qt from the top level?

  13. alexreg commented at 4:54 PM on April 8, 2016: contributor

    All this said, I’ve now gotten parallel builds running fine on OS X 10.11, using my MacPorts Portfile. Not sure exactly what I did though.

    On 8 Apr 2016, at 17:37, Cory Fields notifications@github.com wrote:

    Interesting. I'm guessing we have overlapping recursive builds. I don't see anything that would lead to that though.

    @paveljanik https://github.com/paveljanik: do you see the same problem running make -C src qt/bitcoin-qt from the top level?

    — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub #7834 (comment)

  14. theuni commented at 5:29 PM on April 8, 2016: member

    Ok, I see. I assumed that "-w all" was some make option for "warn all" that i didn't know. It's not..

    "-w" means "show curdir", and "all" is a target.

    So you're building with 2 targets: all and appbundle. In that case, yes, the recursive builds clash. There's not an easy fix for the problem because the command itself kinda doesn't make sense.

    To fix, just drop the "all".

  15. paveljanik commented at 5:46 PM on April 8, 2016: contributor

    Ah 8) Thanks for explanation :-)

  16. theuni commented at 6:02 PM on April 8, 2016: member

    I just took a look at the macports file. Change: build.args appbundle to: build.target appbundle

    That should allow parallel build to be re-enabled. Edit: It should also build much quicker.

  17. fanquake commented at 7:12 AM on June 22, 2016: member

    Looks like the changes to the MacPorts file were made here. Parallel build working and enabled. Can this issue now be closed?

  18. laanwj commented at 12:55 PM on June 22, 2016: member

    I don't know - can anyone try a parallel build (of master) on mac? I can't test this.

  19. fanquake commented at 11:44 AM on September 2, 2016: member

    Confirmed parallel builds of master work fine on OS X.

  20. fanquake closed this on Sep 2, 2016

  21. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me