Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depends: Avoid using the -ffile-prefix-map compiler option #31800

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Feb 5, 2025

This PR is similar to #31337 and applies analogous changes to all dependency packages.

The issue was recently noticed when -ffile-prefix-map was added to the libevent package, which is built in OSS-Fuzz.

This PR replaces -ffile-prefix-map in all packages for consistency.

Fixes #31770.

The `-ffile-prefix-map` compiler option implicitly enables
`-fprofile-prefix-map` in GCC or `-fcoverage-prefix-map` in Clang, which
can cause issues with coverage builds.

This change ensures that only the options necessary for build
reproducibility are applied.
@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 5, 2025

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31800.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK davidgumberg

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:

  • #31802 (Add bitcoin-{node,gui} to release binaries for IPC by Sjors)
  • #31741 (multiprocess: Add libmultiprocess git subtree by ryanofsky)
  • #30975 (ci: build multiprocess on most jobs by Sjors)

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 Feb 5, 2025

My Guix build:

aarch64
4ec7b4c22a31fa78161d7f826390e04a5ef50f04eba7c5e7eb5394166d613a16  guix-build-407062f2ac93/output/aarch64-linux-gnu/SHA256SUMS.part
7577f1d0847ab472e60b1d6e14e28ed442c36db190d1c214d41013b296581447  guix-build-407062f2ac93/output/aarch64-linux-gnu/bitcoin-407062f2ac93-aarch64-linux-gnu-debug.tar.gz
911518a3f02677a6a2ad0110c6b40b0e6f9789f30fa0f69229d39de54f565dfa  guix-build-407062f2ac93/output/aarch64-linux-gnu/bitcoin-407062f2ac93-aarch64-linux-gnu.tar.gz
95858bf5b8445c87a8c1dabe8c313433898c2285cb4fb4e00ab034c6114d4881  guix-build-407062f2ac93/output/arm-linux-gnueabihf/SHA256SUMS.part
6cee8237469d7a38f5c57ed869fed46d238762bbe634c71cb4379cf4d04af07a  guix-build-407062f2ac93/output/arm-linux-gnueabihf/bitcoin-407062f2ac93-arm-linux-gnueabihf-debug.tar.gz
140314842ec063b19df94963351c6d8ea381ad302a0a741ea1228ea55edf1607  guix-build-407062f2ac93/output/arm-linux-gnueabihf/bitcoin-407062f2ac93-arm-linux-gnueabihf.tar.gz
3cf1a0b18c06b484dae9e2b32597b70d7d0e82f7ab7bd49419429f890c2c6166  guix-build-407062f2ac93/output/arm64-apple-darwin/SHA256SUMS.part
48c1e3374c775eb8c352fb7c352dc993dcc0cb31df6d0bee9b4191122052b9cf  guix-build-407062f2ac93/output/arm64-apple-darwin/bitcoin-407062f2ac93-arm64-apple-darwin-unsigned.tar.gz
a92b2002b444309599edb2ce3e70978cebb7570deeee814ac4c123c0b17c981a  guix-build-407062f2ac93/output/arm64-apple-darwin/bitcoin-407062f2ac93-arm64-apple-darwin-unsigned.zip
79623d028293a7bbe38c4ce6ed28e5844e6cb307318ed40a27b2fc407562f52b  guix-build-407062f2ac93/output/arm64-apple-darwin/bitcoin-407062f2ac93-arm64-apple-darwin.tar.gz
7286cf2f60bcda77013968965eed78ad4e75ee3a2b1f37bbf997dd18f4a20d2c  guix-build-407062f2ac93/output/dist-archive/bitcoin-407062f2ac93.tar.gz
0b3cf93084bc1b141949718271908ff2a03d617b3611465b730b626d1c5bbfb4  guix-build-407062f2ac93/output/powerpc64-linux-gnu/SHA256SUMS.part
aca234bdb7efea5345cdf565b128230dacefdbf07f691d965c27aac9c623a110  guix-build-407062f2ac93/output/powerpc64-linux-gnu/bitcoin-407062f2ac93-powerpc64-linux-gnu-debug.tar.gz
bd1665d98c791e4c9867f39430122f8e530c64bd5e435cf088d83574051f8e28  guix-build-407062f2ac93/output/powerpc64-linux-gnu/bitcoin-407062f2ac93-powerpc64-linux-gnu.tar.gz
41990f691e12f9f121ecd58f7860c9dad6f09d364dd5a11240dc9fa40e08d93b  guix-build-407062f2ac93/output/riscv64-linux-gnu/SHA256SUMS.part
36c4a974ee41c102073ab0c3e565835756d45dff22b2fe13ef7f07675a7c428e  guix-build-407062f2ac93/output/riscv64-linux-gnu/bitcoin-407062f2ac93-riscv64-linux-gnu-debug.tar.gz
7b24b2953a0b9ed12f7b16a2acb9b1b522e2e7122f9a417b7d5359219f0ee6c2  guix-build-407062f2ac93/output/riscv64-linux-gnu/bitcoin-407062f2ac93-riscv64-linux-gnu.tar.gz
be1090b8fd64a0fe35c291f11018538bab3129546e04c0cfa5092c5a0374f9d3  guix-build-407062f2ac93/output/x86_64-apple-darwin/SHA256SUMS.part
a870a16f6b480c5696f7557d11a4856bbf1d73d750fc0b431acc06a551eb3c03  guix-build-407062f2ac93/output/x86_64-apple-darwin/bitcoin-407062f2ac93-x86_64-apple-darwin-unsigned.tar.gz
6cc34b8181f534a691ba604d0e5dea7f831ffd37d31bbe5e2e5bd31f9b6438c4  guix-build-407062f2ac93/output/x86_64-apple-darwin/bitcoin-407062f2ac93-x86_64-apple-darwin-unsigned.zip
24a97148b6aa3a8dbeb6b43c07e2ad04ab590d70dbf90b860934721f20456588  guix-build-407062f2ac93/output/x86_64-apple-darwin/bitcoin-407062f2ac93-x86_64-apple-darwin.tar.gz
57d440a300e042edde441e88260297d7c2543fd0fb750dc3fb95ff854f544367  guix-build-407062f2ac93/output/x86_64-linux-gnu/SHA256SUMS.part
e4fc3e83481ce3628f0d880da7d3d87676f03c7ed731da4dba419d3bb084f07c  guix-build-407062f2ac93/output/x86_64-linux-gnu/bitcoin-407062f2ac93-x86_64-linux-gnu-debug.tar.gz
2b02a234caf4d17d6e8fa35d2c79945923ddf3f1a736dad23c8852d05343dc87  guix-build-407062f2ac93/output/x86_64-linux-gnu/bitcoin-407062f2ac93-x86_64-linux-gnu.tar.gz
38ecc4bd1603fb6249767218906a2c2fa16db4b1fdc47797c78a30ac113e5dfa  guix-build-407062f2ac93/output/x86_64-w64-mingw32/SHA256SUMS.part
35ce564f085cc93fe0533e14848a954ccbff3e583cba3a88713d7ffd2b2103f4  guix-build-407062f2ac93/output/x86_64-w64-mingw32/bitcoin-407062f2ac93-win64-debug.zip
b4df22361b34d6d5c1a4f8f15917db04b0895c3d07fc1cf8fe9c76e2058a1637  guix-build-407062f2ac93/output/x86_64-w64-mingw32/bitcoin-407062f2ac93-win64-setup-unsigned.exe
713c9e0b662851fefe262839362600d604b4bfbc9e0b7af72a360c3069be0d52  guix-build-407062f2ac93/output/x86_64-w64-mingw32/bitcoin-407062f2ac93-win64-unsigned.tar.gz
251d115fce6ac930573264078f0c7d6b5b506e9185a418cffc9d358c9ed95602  guix-build-407062f2ac93/output/x86_64-w64-mingw32/bitcoin-407062f2ac93-win64.zip

UPD. Same hashes for x86_64.

@davidgumberg
Copy link
Contributor

Tested ACK 407062f.

The oss-fuzz coverage build failure described in #31770 that I am able to reproduce locally does not happen on this branch.

Steps to reproduce
# setup 
git clone --depth 1 https://github.com/google/oss-fuzz.git
git clone https://github.com/bitcoin/bitcoin oss-fuzz/bitcoin
git clone --depth 1 https://github.com/bitcoin-core/qa-assets oss-fuzz/bitcoin/assets
cd oss-fuzz
python infra/helper.py build_image bitcoin-core

# check out master and run fuzz coverage
cd bitcoin && git switch master && cd ..

python infra/helper.py build_fuzzers --sanitizer coverage bitcoin-core bitcoin/
python infra/helper.py coverage bitcoin-core --fuzz-target psbt # fails 

# check out branch and run fuzz coverage 
cd bitcoin && git fetch origin pull/31800/head:31800 && git checkout 407062f2ac93624f350e9e8a4f641c882a2aaf2f && cd ..

python infra/helper.py build_fuzzers --sanitizer coverage bitcoin-core bitcoin/
python infra/helper.py coverage bitcoin-core --fuzz-target psbt # succeeds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fuzz: oss-fuzz coverage build is failing
3 participants