Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Dec 4, 2021

On master (d1e4265):

$ ./autogen.sh && ./configure --without-gui --disable-wallet && make clean
$ make 2>&1 | grep LD | grep -v .la
  CXXLD    bitcoind
  CXXLD    bitcoin-cli
  CXXLD    bitcoin-tx
  CXXLD    bitcoin-util
  CXXLD    test/test_bitcoin
  CXXLD    bench/bench_bitcoin
  CXXLD    minisketch/test
  CXXLD    test/fuzz/fuzz
  CXXLD    univalue/test/object
  CXXLD    univalue/test/unitester
$ make check 2>&1 | grep LD
  CCLD     exhaustive_tests
  CCLD     tests

With this PR:

$ ./autogen.sh && ./configure --without-gui --disable-wallet && make clean
$ make 2>&1 | grep LD | grep -v .la
  CXXLD    bitcoind
  CXXLD    bitcoin-cli
  CXXLD    bitcoin-tx
  CXXLD    bitcoin-util
  CXXLD    test/test_bitcoin
  CXXLD    bench/bench_bitcoin
  CXXLD    test/fuzz/fuzz
  CXXLD    univalue/test/object
  CXXLD    univalue/test/unitester
$ make check 2>&1 | grep LD
  CXXLD    minisketch/test
  CCLD     exhaustive_tests
  CCLD     tests

In fact, this PR restores behavior that was before #22646, and that behavior looks more optimal.

As an outcome, the contrib/guix/libexec/build.sh does not spend resources to build binaries which are not a part of the release package.

@hebasto hebasto marked this pull request as draft December 4, 2021 15:36
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Concept ACK modulo Win64 issue. Same result as pull description using debian 5.15.5-1 (2021-11-26), clang 14.

master

(master)$ make 2>&1 | grep LD
  CXXLD    libunivalue.la
  CCLD     libsecp256k1.la
  CXXLD    bitcoind
  CXXLD    bitcoin-cli
  CXXLD    bitcoin-tx
  CXXLD    bitcoin-util
  CXXLD    test/test_bitcoin
  CXXLD    bench/bench_bitcoin
  CXXLD    minisketch/test
  CXXLD    test/fuzz/fuzz
  CXXLD    univalue/test/object
  CXXLD    univalue/test/unitester
  CXXLD    univalue/test/no_nul
  CXXLD    libbitcoinconsensus.la
(master)$ make check 2>&1 | grep LD
  CCLD     tests
  CCLD     valgrind_ctime_test
  CCLD     exhaustive_tests

this branch

((HEAD detached from origin/pr/23670))$ make 2>&1 | grep LD
  CXXLD    libunivalue.la
  CCLD     libsecp256k1.la
  CXXLD    bitcoind
  CXXLD    bitcoin-cli
  CXXLD    bitcoin-tx
  CXXLD    bitcoin-util
  CXXLD    test/test_bitcoin
  CXXLD    bench/bench_bitcoin
  CXXLD    test/fuzz/fuzz
  CXXLD    libbitcoinconsensus.la
((HEAD detached from origin/pr/23670))$ make check 2>&1 | grep LD
  CXXLD    minisketch/test
  CXXLD    univalue/test/object
  CXXLD    univalue/test/unitester
  CXXLD    univalue/test/no_nul
  CCLD     tests
  CCLD     valgrind_ctime_test
  CCLD     exhaustive_tests

@laanwj
Copy link
Member

laanwj commented Dec 13, 2021

I think there's a slight value in always building all binaries (that are enabled by configure).

But as src/test/test_bitcoin bench/bench_bitcoin and test/fuzz/fuzz are still always built, and you're only referring to test binaries of included dependencies, I'm ok with this change.

@jamesob
Copy link
Contributor

jamesob commented Dec 15, 2021

Concept ACK given, as @laanwj said, this is only omitting dependency-test compilation during make.

@hebasto
Copy link
Member Author

hebasto commented Dec 27, 2021

Closing. Seeing no straightforward way to integrate this PR into our CI setup.

@hebasto hebasto closed this Dec 27, 2021
@hebasto hebasto reopened this Jan 2, 2022
@hebasto hebasto force-pushed the 211204-check branch 2 times, most recently from ff3f93a to c39c553 Compare January 2, 2022 09:10
@hebasto hebasto marked this pull request as ready for review January 2, 2022 09:12
@hebasto
Copy link
Member Author

hebasto commented Jan 2, 2022

Concept ACK modulo Win64 issue.

Fixed.

@hebasto
Copy link
Member Author

hebasto commented Feb 2, 2022

Rebased c39c553 -> 1593837 (pr23670.03 -> pr23670.04) due to the conflict with #24212.

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 12, 2022

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 TheCharlatan
Concept ACK jonatack, jamesob, kristapsk
Stale ACK fanquake

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #25797 (build: Add CMake-based build system by hebasto)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@hebasto
Copy link
Member Author

hebasto commented Apr 28, 2022

Rebased 1593837 -> e9fa9ac (pr23670.04 -> pr23670.05) due to the conflict with #24322.

@hebasto
Copy link
Member Author

hebasto commented Jul 20, 2022

Rebased e9fa9ac -> 04dae33 (pr23670.05 -> pr23670.06).

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

ACK 04dae33 - you could update the PR description to remove the no-longer-existant binaries.

@hebasto
Copy link
Member Author

hebasto commented Jul 20, 2022

@fanquake

you could update the PR description to remove the no-longer-existant binaries.

Thanks. The PR description has been updated.

@@ -374,7 +374,7 @@ endif

if ENABLE_TESTS
UNIVALUE_TESTS = univalue/test/object univalue/test/unitester
noinst_PROGRAMS += $(UNIVALUE_TESTS)
check_PROGRAMS += $(UNIVALUE_TESTS)
Copy link
Member

Choose a reason for hiding this comment

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

Isn't univalue no longer a dependency but now maintained in-tree?

Copy link
Member Author

Choose a reason for hiding this comment

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

@MarcoFalke Yes. it is. Why did you point at it?

Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to compile it at the same time that test_bitcoin is compiled?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why?

test_bitcoin is a part of the distributed package, but univalue tests are not. Why build them in contrib/guix/libexec/build.sh?

Copy link
Member

Choose a reason for hiding this comment

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

I wasn't aware this changes the guix build and the release tarball. Maybe mention it in the description?

Copy link
Member Author

@hebasto hebasto Jul 20, 2022

Choose a reason for hiding this comment

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

This PR does not change the release tarball.

Copy link
Member

Choose a reason for hiding this comment

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

I find it convenient to be notified of univalue build failures on make when developing univalue.

Copy link
Member Author

Choose a reason for hiding this comment

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

"univalue build failures" or "univalue tests build failures"?

Copy link
Member

Choose a reason for hiding this comment

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

Both.

Did you measure how many milliseconds this shaves off of the guix build? I'd bet it is far less than 0.1% of overall build time.

Unrelated: It may overall be more useful for devs to introduce a make check_quick to only run the bitcoin core unit tests (without any secp exhaustive_tests)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Updated.

@kristapsk
Copy link
Contributor

Concept ACK

@hebasto hebasto changed the title build: Build test binaries in make check, not in make build: Build minisketch test in make check, not in make Jul 21, 2022
@hebasto
Copy link
Member Author

hebasto commented Jul 21, 2022

Updated 04dae33 -> 6d58117 (pr23670.06 -> pr23670.07):

@DrahtBot DrahtBot mentioned this pull request Nov 12, 2022
16 tasks
@TheCharlatan
Copy link
Contributor

ACK 6d58117

@fanquake fanquake merged commit b5868f4 into bitcoin:master Jan 31, 2023
@hebasto hebasto deleted the 211204-check branch January 31, 2023 18:57
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 1, 2023
…t in `make`

6d58117 build: Build minisketch test in `make check`, not in `make` (Hennadii Stepanov)

Pull request description:

  On master (d1e4265):
  ```
  $ ./autogen.sh && ./configure --without-gui --disable-wallet && make clean
  $ make 2>&1 | grep LD | grep -v .la
    CXXLD    bitcoind
    CXXLD    bitcoin-cli
    CXXLD    bitcoin-tx
    CXXLD    bitcoin-util
    CXXLD    test/test_bitcoin
    CXXLD    bench/bench_bitcoin
    CXXLD    minisketch/test
    CXXLD    test/fuzz/fuzz
    CXXLD    univalue/test/object
    CXXLD    univalue/test/unitester
  $ make check 2>&1 | grep LD
    CCLD     exhaustive_tests
    CCLD     tests
  ```

  With this PR:
  ```
  $ ./autogen.sh && ./configure --without-gui --disable-wallet && make clean
  $ make 2>&1 | grep LD | grep -v .la
    CXXLD    bitcoind
    CXXLD    bitcoin-cli
    CXXLD    bitcoin-tx
    CXXLD    bitcoin-util
    CXXLD    test/test_bitcoin
    CXXLD    bench/bench_bitcoin
    CXXLD    test/fuzz/fuzz
    CXXLD    univalue/test/object
    CXXLD    univalue/test/unitester
  $ make check 2>&1 | grep LD
    CXXLD    minisketch/test
    CCLD     exhaustive_tests
    CCLD     tests
  ```

  In fact, this PR restores behavior that was before bitcoin#22646, and that behavior looks more optimal.

  As an outcome, the `contrib/guix/libexec/build.sh` does not spend resources to build binaries which are not a part of the release package.

ACKs for top commit:
  TheCharlatan:
    ACK 6d58117

Tree-SHA512: 4957c8f88a01aca005813bf4c1c26f433756bf68ea0c958481c638ead229fa8e23ecae3a8ac31ea555876ba6f2cc10ecd91caf2e2f664de5cb529ec05fb38fa7
@naumenkogs naumenkogs mentioned this pull request Oct 13, 2023
17 tasks
@bitcoin bitcoin locked and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants