Commit Graph

1214 Commits

Author SHA1 Message Date
Andrew Chow
8f5ffef6b4 Merge bitcoin/bitcoin#27172: guix: switch to some minimal versions of packages in our manifest
2c9eb4afe1f583aafa552b2711b149f17ef8320f guix: use cmake-minimal over cmake (fanquake)
1475515312856afe3f19a95f2c32bc80c7c54484 guix: use coreutils-minimal over coreutils (fanquake)
444562141504ff7f0bb071d6e7bf7f511517e372 guix: use bash-minimal over bash (fanquake)

Pull request description:

  Minimal versions of the same packages, that should still be sufficient for our use:

  > (define-public bash-minimal
    ;; A stripped-down Bash for non-interactive use.

  > (define-public coreutils-minimal
    ;; Coreutils without its optional dependencies.

  > ;;; This minimal variant of CMake does not include the documentation.  It is
  ;;; used by the cmake-build-system.
  (define-public cmake-minimal

ACKs for top commit:
  TheCharlatan:
    ACK 2c9eb4afe1f5
  Sjors:
    tACK 2c9eb4afe1f583aafa552b2711b149f17ef8320f
  achow101:
    ACK 2c9eb4afe1f583aafa552b2711b149f17ef8320f
  hebasto:
    ACK 2c9eb4afe1f583aafa552b2711b149f17ef8320f,

Tree-SHA512: f91ca9e088b8346b20c2affc80870c31640de3aedcfcc0fb98a5e82c77ef64537870b88552f26759d31d8d0956b1fd685e6c25d5acbc92f5feaececd1a7dd37e
2023-06-10 17:40:23 -05:00
fanquake
14e18f8501 Merge bitcoin/bitcoin#27361: guix: use python-minimal (3.9)
d0e571ebb187d7c4c2821f1334cb2dd4222dd8ce guix: use python-minimal (3.9) (fanquake)

Pull request description:

  This further minifies the Guix release build environment.

ACKs for top commit:
  TheCharlatan:
    ACK d0e571ebb187
  hebasto:
    ACK d0e571ebb187d7c4c2821f1334cb2dd4222dd8ce

Tree-SHA512: 0a8aa9ae861107f106c3b9c41f78ffbaf0e71e3c61f6d96e5c82415b4570b8ac85d6578d37cd0df0ec315c1c9f35fc90b281f139271ccfd15a1495ba76166789
2023-06-10 17:40:23 -05:00
Wladimir J. van der Laan
487395c8f1 Merge #20906: contrib: embed C++11 patch in install_db4.sh
92370033a2606ee88f4d080193e0bf6da481dc2e contrib: embed C++11 patch in install_db4.sh (jackielove4u)

Pull request description:

  This is a continuation of https://github.com/bitcoin/bitcoin/pull/20665.

  Closes #20722.

ACKs for top commit:
  laanwj:
    ACK 92370033a2606ee88f4d080193e0bf6da481dc2e
  fanquake:
    ACK 92370033a2606ee88f4d080193e0bf6da481dc2e.

Tree-SHA512: ebfd16f5301158de1acc1b8eeca43b3d94f0a6d438832133a30648e5e8a88268b4af983be0bb57f3018e3af8459f32f0de676c1b4e8942e199a4497c776631c5
2023-06-10 17:40:23 -05:00
Kittywhiskers Van Gogh
3c8088f2e8 merge bitcoin#26075: remove 32bit linux code from release scripts 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
ecb9ff8062 merge bitcoin#25458: parallelize LIEF build 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
e91a62be3c merge bitcoin#24561: use LIEF 0.12.0 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
77539574a7 merge bitcoin#20422: mac deployment unification 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
f2a5b472fd merge bitcoin#23148: Fix guix linker-loader path and add check_ELF_interpreter 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
e39a1de731 merge bitcoin#23839: build with and test for control flow instrumentation on x86_64 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
38c3bd0b61 merge bitcoin#23838: make security checks architecture independent 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
bd2135fbd5 merge bitcoin#23811: match on EXE_FORMATS rather than name string 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
1e9278ea11 merge bitcoin#23535: check for control flow instrumentation 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
110dbf82e8 merge bitcoin#22392: use LIEF for ELF security & symbol checks 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
cdedbea0b4 merge bitcoin#21889: check for control flow instrumentation 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
853583019b fix: add exception for 32-bit ARM builds which need glibc 2.28
note: focal uses glibc 2.31, which is used by gitian, so our build
      environment has support for a version of glibc that far exceeds
      our maximum supported version (2.28). this could be remedied by
      switching to debian buster (oldstable) which uses 2.28.
2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
24a6642b6f partial bitcoin#22381: Test security-check sanity before performing them (with macOS)
excludes:
- d6ef3543ae16847d5a91fa9271acee9bd2164b32
2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
d4a8d49e56 merge bitcoin#21428: Cleanup in test-{security,symbol}-check.py 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
1be3afd82c merge bitcoin#21255: run test-symbol-check for RISC-V 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
ef65f610bb merge bitcoin#21871: add checks for minimum required OS versions 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
067d4a4541 merge bitcoin#20608: add symbol check test for PE binaries 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
ef9300ad63 merge bitcoin#21664: use LIEF for macOS and Windows symbol & security checks 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
994fb5739c merge bitcoin#18434: add a test-security target and run it in CI 2023-06-07 14:40:37 +05:30
fanquake
50cac39d9d Merge #19669: contrib: Fixup valgrind suppressions file
fa5288cf5c50d014f046b7741f6da69529037933 contrib: Fixup valgrind suppressions file (MarcoFalke)

Pull request description:

  I am observing this one on bionic with system boost::fs:

  ```
  {
     <insert_a_suppression_name_here>
     Memcheck:Cond
     fun:__wcsnlen_avx2
     fun:wcsnrtombs
     fun:_ZNKSt7codecvtIwc11__mbstate_tE6do_outERS0_PKwS4_RS4_PcS6_RS6_
     fun:_ZN5boost10filesystem11path_traits7convertEPKwS3_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt7codecvtIwc11__mbstate_tE
     fun:_ZN5boost10filesystem6detail11unique_pathERKNS0_4pathEPNS_6system10error_codeE
  ...

ACKs for top commit:
  practicalswift:
    ACK fa5288cf5c50d014f046b7741f6da69529037933 -- patch looks correct

Tree-SHA512: 067e10e932a7f5b13e516134e0cfd3030265c1b582cdfde1cea97042e31399aa40c4590710a39429854c68ad703a0ae9f0b06e9af4cdd81e3cacb042939a84b6
2023-06-07 01:50:18 -05:00
fanquake
316f6b1895 Merge #19159: test: Make valgrind.supp work on aarch64
fab7d954b261d74b369fe2a3c1785540c4f056b4 test: Make valgrind.supp work on aarch64 (MarcoFalke)

Pull request description:

  Was easy to fix by simply removing a line

ACKs for top commit:
  practicalswift:
    ACK fab7d954b261d74b369fe2a3c1785540c4f056b4 -- diff looks correct

Tree-SHA512: d2d7c6cac453a3177c20e256ec50a03066f8dbf5ae45299077ccf4a2b45a3a40252b1b5fcaf9224a59bb5c3df5bd90ac58af27eb0f47dc87c2640df5b2b460ca
2023-06-07 01:50:18 -05:00
MarcoFalke
86094b631e Merge #17725: ci: Add valgrind run
facb416ad5ba47b01ee52c273a5c5e3709f06f07 ci: Add valgrind run (MarcoFalke)

Pull request description:

  Fixes #17460

ACKs for top commit:
  practicalswift:
    ACK facb416ad5ba47b01ee52c273a5c5e3709f06f07

Tree-SHA512: 55396e548a76f976d7b7170b68bc5f93cfd44656162267172f66db7eb549699a2a22d3b1bb0d5f180fe0697931939e652c8cdb86b435e81e7ce572485798009d
2023-06-07 01:50:18 -05:00
Kittywhiskers Van Gogh
772ec4c536 merge bitcoin#22305: Avoid fcntl64@GLIBC_2.28 in libsqlite3.a 2023-05-31 11:06:40 -05:00
Kittywhiskers Van Gogh
0fcc90cd3a partial bitcoin#20963: Build binaries for 64-bit POWER
excludes changes to gitian-linux that would make POWER64
a target platform for builds
2023-05-31 11:06:40 -05:00
Kittywhiskers Van Gogh
4c1a00e012 merge bitcoin#24639: Drop code for the unsupported i686-linux-gnu host 2023-05-31 11:06:40 -05:00
Kittywhiskers Van Gogh
8eab21bd33 contrib: add symbols and libraries used by dash 2023-05-31 11:06:40 -05:00
Kittywhiskers Van Gogh
729c6259dd contrib: update install_db4 to integrate previous backport contents
contains portions of:
- 1ac454a384
- 3352da8da1
- fac86ac7b3
- 8c9b8a3668

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-05-27 23:15:24 +05:30
Kittywhiskers Van Gogh
7a2e27f0a9 merge bitcoin#16086: use newer config.guess & config.sub in install_db4.sh 2023-05-27 23:15:24 +05:30
Kittywhiskers Van Gogh
d561e63cf9 merge bitcoin#14883: add --retry 5 to curl opts in install_db4.sh 2023-05-27 23:15:24 +05:30
Kittywhiskers Van Gogh
e0ffea36d7 merge bitcoin#11943: fix typo in install_db4.sh help message 2023-05-27 23:15:24 +05:30
Kittywhiskers Van Gogh
9be6231cff merge bitcoin#12095: Use BDB_LIBS/CFLAGS and pass --disable-replication 2023-05-27 23:15:24 +05:30
Kittywhiskers Van Gogh
47fe7335c0 merge bitcoin#11945: Improve BSD compatibility of contrib/install_db4.sh 2023-05-27 23:15:05 +05:30
Kittywhiskers Van Gogh
cb5ac0d292 merge bitcoin#11702: Add a script for installing db4 2023-05-27 23:15:05 +05:30
Kittywhiskers Van Gogh
4963660b15
ci: build TSan with clang 15 and add -Werror=thread-safety, fix-up stacktraces (#5375)
## Description

Pull request was inspired by the need to debug lock problems when
working on https://github.com/dashpay/dash/pull/5352.

As far as I'm aware, only macOS has `-Werror=thread-safety` as part of
its default `CXXFLAGS` despite the capability being present on Linux as
well. This PR introduces thread safety checks for that into our thread
sanitizer build.

Additionally, since we're using Clang, something that on first glimpse,
appears to be something that `stacktraces.cpp` isn't happy with, due to
`-Wl,-wrap` being available only on GCC, that no longer seems to be the
case, since the version of Clang with comes with `focal`, its `lld`
_does_ have support for `-wrap` (see [man page for `lld` on
`focal`](https://manpages.ubuntu.com/manpages/focal/en/man1/lld.1.html)).

The current `stable` version of Clang/LLVM is 15, at the time of this
pull request (see https://apt.llvm.org/) but `focal` ships with an older
version, requiring us to use the official LLVM APT repository. I feel we
should be testing with recent compilers alongside the ones shipped by
LTS distributions.

Certain bugs are only made apparent when testing on rolling release
distros or distros that have faster update cycles, like Fedora (see
https://github.com/dashpay/dash/pull/5295 for an illustration of that),
which ship with more recent compilers. Until we overhaul our CI systems
to test using those distros directly (our current infrastructure is
centered around using a "development image" with an LTS distro as the
base), this is the best we can do.

A similar pull request testing against the latest GCC stable will be
welcome as that is currently outside the scope of this PR as the changes
made were to make sure that builds were operating as expected on
Clang/LLVM 15.

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-05-26 13:49:29 -05:00
Konstantin Akimov
b8b37f314b Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex
e09c701e0110350f78366fb837308c086b6503c0 scripted-diff: Bump copyright of files changed in 2020 (MarcoFalke)
6cbe6209646db8914b87bf6edbc18c6031a16f1e scripted-diff: Replace CCriticalSection with RecursiveMutex (MarcoFalke)

Pull request description:

  `RecursiveMutex` better clarifies that the mutex is recursive, see also the standard library naming: https://en.cppreference.com/w/cpp/thread/recursive_mutex

  For that reason, and to avoid different people asking me the same question repeatedly (e.g. https://github.com/bitcoin/bitcoin/pull/15932#pullrequestreview-339175124 ), remove the outdated alias `CCriticalSection` with a scripted-diff
2023-05-24 12:43:57 -05:00
PastaPastaPasta
16187c7670
ci: implement guix build by label request in CI (#5368)
## Issue being fixed or feature implemented
Automated guix builds in CI when specifically requested 

## What was done?
Any PR with the `build-guix` label added will automatically have the
Guix build ran and the hashes placed in the CI output to compare against


## How Has This Been Tested?
This PR

## Breaking Changes
None

## Checklist:
_Go over all the following points, and put an `x` in all the boxes that
apply._
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-05-15 22:15:34 -05:00
thephez
490f32c8d1
chore: update dash_hash install and instructions (#5291)
## Issue being fixed or feature implemented
Install of dash_hash will change once
https://github.com/dashpay/dash_hash/pull/17/ is merged

## What was done?
- Changed install instructions to match new install in dash_hash README
- Updated Dockerfile to install correctly

## How Has This Been Tested?
N/A

## Breaking Changes
None

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [x] I have made corresponding changes to the documentation
2023-05-11 20:19:45 -05:00
Kittywhiskers Van Gogh
a287a51b39 ci: update documentation to use focal instead of bionic 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
8b054d49c7 ci: harmonize parent images, use focal consistently 2023-05-11 09:18:48 -05:00
UdjinM6
6542ea53eb
ci: clone dash_hash at a specific tag (#5369)
## Issue being fixed or feature implemented
should fix ci failures like
https://gitlab.com/dashpay/dash/-/jobs/4261565118 in #5291

## What was done?
Use the exact dash_hash version/tag instead of simply using `master`.
Bumping `DASH_HASH_VERSION` invalidates docker cache.

## How Has This Been Tested?
Ran it in my gitlab ci

## Breaking Changes
n/a


## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-05-11 12:26:07 +03:00
fanquake
a778ddd62f Merge #16477: build: skip deploying plugins we dont use in macdeployqtplus
1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f scripts: filter more qt plugins we don't use in macdeployqtplus (fanquake)
57cdd0697d5c8fdae4a4c1da1cfa092916be87e7 scripts: misc cleanups in macdeployqtplus (fanquake)
51729a4dfacb5b8d3945d39fa581eaaa9ac9603d scripts: use format() in macdeployqtplus (fanquake)
1c37e81694efb08fea889d9f5151c91dbb74d025 scripts: add type annotations to macdeployqtplus (fanquake)

Pull request description:

  I frequently run `make deploy` while testing on macOS to get a properly light themed .app. With a brew installed Qt, this currently results in a pretty bloated executable:

  | branch | .app size | .dmg size | `make deploy` time |
  | ------- | --------- | --------- | --------------------- |
  | master (febf3a856bcfb8fef2cb4ddcb8d1e0cab8a22580) | 235mb | 86mb | 38s |
  | This PR (da98f6d470d236c027b7eb8b5f5552fdca04e803) | 51mb | 21mb | 22s |

  Similar change to dd367ff8c9.

  ```diff
                           'QtGui.framework'],
    'pluginPath': '/usr/local/opt/qt/plugins',
    'qtPath': '/usr/local/opt/qt'}
  -[('platforminputcontexts', 'libqtvirtualkeyboardplugin.dylib'),
  - ('geoservices', 'libqtgeoservices_esri.dylib'),
  - ('geoservices', 'libqtgeoservices_mapboxgl.dylib'),
  - ('geoservices', 'libqtgeoservices_nokia.dylib'),
  - ('geoservices', 'libqtgeoservices_itemsoverlay.dylib'),
  - ('geoservices', 'libqtgeoservices_osm.dylib'),
  - ('geoservices', 'libqtgeoservices_mapbox.dylib'),
  - ('sceneparsers', 'libgltfsceneexport.dylib'),
  - ('sceneparsers', 'libgltfsceneimport.dylib'),
  - ('platforms', 'libqwebgl.dylib'),
  +[('platforms', 'libqwebgl.dylib'),
    ('platforms', 'libqoffscreen.dylib'),
    ('platforms', 'libqminimal.dylib'),
    ('platforms', 'libqcocoa.dylib'),
    ('platformthemes', 'libqxdgdesktopportal.dylib'),
  - ('printsupport', 'libcocoaprintersupport.dylib'),
  - ('webview', 'libqtwebview_webengine.dylib'),
  - ('webview', 'libqtwebview_darwin.dylib'),
  - ('geometryloaders', 'libdefaultgeometryloader.dylib'),
  - ('geometryloaders', 'libgltfgeometryloader.dylib'),
    ('styles', 'libqmacstyle.dylib'),
  - ('canbus', 'libqttinycanbus.dylib'),
  - ('canbus', 'libqtpassthrucanbus.dylib'),
  - ('canbus', 'libqtvirtualcanbus.dylib'),
  - ('canbus', 'libqtpeakcanbus.dylib'),
    ('bearer', 'libqgenericbearer.dylib'),
  - ('imageformats', 'libqgif.dylib'),
  - ('imageformats', 'libqwbmp.dylib'),
  - ('imageformats', 'libqwebp.dylib'),
  - ('imageformats', 'libqico.dylib'),
  - ('imageformats', 'libqmacheif.dylib'),
  - ('imageformats', 'libqjpeg.dylib'),
  - ('imageformats', 'libqtiff.dylib'),
  - ('imageformats', 'libqicns.dylib'),
  - ('imageformats', 'libqtga.dylib'),
  - ('imageformats', 'libqmacjp2.dylib'),
  - ('texttospeech', 'libqtexttospeech_speechosx.dylib'),
  - ('generic', 'libqtuiotouchplugin.dylib'),
  - ('renderplugins', 'libscene2d.dylib'),
  - ('gamepads', 'libdarwingamepad.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_thai.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_openwnn.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_hangul.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_pinyin.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_tcime.dylib')]
  + ('generic', 'libqtuiotouchplugin.dylib')]
  ```

ACKs for top commit:
  laanwj:
    ACK 1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f (purely Python code review and the fact that this passes travis, cannot run this on a mac)
  dongcarl:
    tested ACK 1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f

Tree-SHA512: 5974eeaf7229bb5bde2b283c1331ec57ee87f624db146401f6b77dee4ee5502e0bd669958a46205f10398a371f8e6c91ddacb9f0e1943f9f7d042fb6de7957a8
2023-04-25 23:41:20 -05:00
MarcoFalke
83a7235c09 Merge #17801: doc: Update license year range to 2020
8dc9aa90c3c7990dd5b491937ddc0e39bc929d1c doc: Update license year range to 2020 (Emil Engler)

Pull request description:

  See #15061
  The same procedure as every year. Happy new year to all of you :)

Top commit has no ACKs.

Tree-SHA512: f2d924a739f6becc050a22cd0e37d97653ac1ef78ec645c98b5647ae2e65b9668851e24090d3ab3585503235113e1c48ea20580c35538afac5043026589bf830
2023-04-25 23:14:25 +03:00
fanquake
d65ac30e77 Merge bitcoin/bitcoin#24129: build: Fix xargs warnings for Guix builds
c73415bc10c1baa7988e1c55a0e9201df73a6c22 build: Fix xargs warnings for Guix builds (Hennadii Stepanov)

Pull request description:

  On master (e3ce019667fba2ec50a59814a26566fb67fa9125) there are warnings in `./contrib/guix/guix-build` logs:
  ```
  xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
  ```

  This PR fixes such warnings.

ACKs for top commit:
  prusnak:
    utACK c73415b

Tree-SHA512: a7b55f59afbb19b78f795cea64acacf29903cfcd5fd7c37a771b073c1f2ff54555a26f3d00c1c73a8ef588396217ddf598e32b2ae961559042cc051b0aad162a
2023-04-17 11:17:34 -05:00
PastaPastaPasta
026d3f5fd5
build: add --hardened-runtime for macos detached signature creation to enable notarization (#5332)
## Issue being fixed or feature implemented
Slightly changes the detached signature creation code 

## What was done?
Investigated what exactly needed to be done for notarization (docs to
come), tried it again, then when it failed as expected trying to figure
it out, then figuring it out :) simple change in the end.

## How Has This Been Tested?
created macOS detached sigs and notarized 19.0.0-rc.10 binaries and
ensured that all worked as expected. See binary attached here (sha256
3829e863831b05c3d76785540183bee556c4bab03dac98f5872df06668b9cb20)

[dashcore-19.0.0-rc.10-osx.dmg.zip](https://github.com/dashpay/dash/files/11246273/dashcore-19.0.0-rc.10-osx.dmg.zip).
You can also do a signed gitian-build for rc.10 and should replicate
these hashes.


## Breaking Changes
Should be none; I would like to backport this to 19 as a 19.0.1

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-04-17 11:12:21 -05:00
W. J. van der Laan
8ca3005a91 Merge bitcoin/bitcoin#22645: scripts: prevent GCC optimising test symbols in test-symbol-check
5449d44e37982fcd5251fd47873c5f7d34c39fc9 scripts: prevent GCC optimising test symbols in test-symbol-check (fanquake)

Pull request description:

  I noticed in #22381 that when the test-symbol-check target was being built with Clang and run in the CI it would fail due to using a too-new version of `pow` (used [here](d67330d112/contrib/devtools/test-symbol-check.py (L85))). Our CIs use Focal (glibc 2.31) and the version of `pow` was the optimized version introduced in [glibc 2.29](https://lwn.net/Articles/778286/):
  ```bash
  * Optimized generic exp, exp2, log, log2, pow, sinf, cosf, sincosf and tanf.
  ```
  This made sense, except for that if it was failing when built using Clang, why hadn't it also been failing when being built with GCC?

  Turns out GCC is optimizing away that call to `pow` at all optimization levels, including `-O0`, see: https://godbolt.org/z/53MhzMxT7, and this has been the case forever, or at least since GCC 5.x. Clang on the other hand, will only optimize away the `pow` call at `-O1` and `-O2`, not `-O0`: https://godbolt.org/z/Wbnqj3q6c. Thus when this test was built with Clang (we don't pass `-O` so we default to `-O0`) it was failing in the CI environment, because it would actually have a call to the "new" `pow`.

  Avoid this issue by using a symbol that won't be optimized away, or that we are unlikely to ever have versioning issues with.

ACKs for top commit:
  laanwj:
    ACK 5449d44e37982fcd5251fd47873c5f7d34c39fc9

Tree-SHA512: 3a26c5c3a5f2905fd0dd90892470e241ba625c0af3be2629d06d5da3a97534c1d6a55b796bbdd41e2e6a26a8fab7d981b98c45d4238565b0eb7edf3c5da02007
2023-04-16 23:40:59 +03:00
PastaPastaPasta
770eefcd08
ci: upgrade cppcheck to 2.10; fix / suppress reported issues (#5328)
## Issue being fixed or feature implemented
Upgraded version of cppcheck

## What was done?

## How Has This Been Tested?
Ran cppcheck

## Breaking Changes
None

## Checklist:
_Go over all the following points, and put an `x` in all the boxes that
apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-04-16 12:08:33 -05:00
fanquake
e4a6ea6032 Merge bitcoin/bitcoin#25861: guix: use --build={arch}-guix-linux-gnu in cross toolchain
56e79fe683d36c1944e52326fae3bcc4cb7deec7 guix: use --build={arch}-guix-linux-gnu in cross toolchain (fanquake)

Pull request description:

  Technically we are always cross-compiling when Guix building, so make that explicit. `{arch}-guix-linux-gnu` is not a triplet that should be used in any other capacity, but here it serves the purpose of ensuring, that by setting `--build` to something other than `--host/--target`, we are always cross-compiling (in the eyes of autoconf etc) when building our cross toolchains. It looks like `x86_64-linux-gnu` on `x86_64-linux-gnu` currently works because of the triplet canonicalisation, i.e `x86_64-linux-gnu` becomes `x86_64-pc-linux-gnu`, and GCCs configure thinking it's cross-compiling, whereas the same canonicalisation doesn't happen for `aarch64-linux-gnu` so we don't get a cross-compile when building on aarch64.

  Fixes: #22458.

  Guix Build (x86_64):
  ```bash
  e590e67d2b151e7d079f50393c61cacf9e65f5e3fdddc10bffd5dbb59cd9f5e3  guix-build-56e79fe683d3/output/aarch64-linux-gnu/SHA256SUMS.part
  9222a733209dc73168722ee0f290831d1723f7ed55abc1e243dd3892ef9733f1  guix-build-56e79fe683d3/output/aarch64-linux-gnu/bitcoin-56e79fe683d3-aarch64-linux-gnu-debug.tar.gz
  a4ec01411195412e9a483397554d98b2db161a6be8aceee2dac78f0015f2a8e5  guix-build-56e79fe683d3/output/aarch64-linux-gnu/bitcoin-56e79fe683d3-aarch64-linux-gnu.tar.gz
  a4ff8f2538c1b3a63a3e7c92699c18164b2c4954ebd72c4a854bf7844e6131b6  guix-build-56e79fe683d3/output/arm-linux-gnueabihf/SHA256SUMS.part
  ac6e4dffcf6f49dac73d3677f3fe5edb08ee1127648bc7ec24b217f48a3a4d21  guix-build-56e79fe683d3/output/arm-linux-gnueabihf/bitcoin-56e79fe683d3-arm-linux-gnueabihf-debug.tar.gz
  ab26467fce9732596b1713179618eee20c2bd44875dc1c39f9afd68f135e8ce4  guix-build-56e79fe683d3/output/arm-linux-gnueabihf/bitcoin-56e79fe683d3-arm-linux-gnueabihf.tar.gz
  f44108d818d53ee7e70b44361cb3cc6841b7aecbe4fade1fa289263718620824  guix-build-56e79fe683d3/output/arm64-apple-darwin/SHA256SUMS.part
  29adfb2d575be8b5a7092b2aff888af2084ad5783bdc74ae3de4b2dd84da7a26  guix-build-56e79fe683d3/output/arm64-apple-darwin/bitcoin-56e79fe683d3-arm64-apple-darwin-unsigned.dmg
  3d7640f604bd27cb1ae47853d70378a7631aa436b5c027eae31fa06d4dd20d4a  guix-build-56e79fe683d3/output/arm64-apple-darwin/bitcoin-56e79fe683d3-arm64-apple-darwin-unsigned.tar.gz
  3f8d8fc49cf722a7a13640872762d045c14efd610fba908f0acc99a99032b903  guix-build-56e79fe683d3/output/arm64-apple-darwin/bitcoin-56e79fe683d3-arm64-apple-darwin.tar.gz
  b8df097e10e7acded8556a5681da2b0132c0d509b200792f5584c186b8dcaf24  guix-build-56e79fe683d3/output/dist-archive/bitcoin-56e79fe683d3.tar.gz
  1a605c563038107b88e8d859fa045ca3087241340264eb7125e97b3af36874db  guix-build-56e79fe683d3/output/powerpc64-linux-gnu/SHA256SUMS.part
  d10be89a816ee2f47bf778ef4aaa8a7b548403c123a4b4b3aa0470ee7b9472d2  guix-build-56e79fe683d3/output/powerpc64-linux-gnu/bitcoin-56e79fe683d3-powerpc64-linux-gnu-debug.tar.gz
  839dd079d677c87a91ccc28f6c423657d98212350d3693ae2facb92082d10c88  guix-build-56e79fe683d3/output/powerpc64-linux-gnu/bitcoin-56e79fe683d3-powerpc64-linux-gnu.tar.gz
  200d7a72a7901b6788e70aa1c6fbbe16144e9dac29beb06242a9dcfe1e88acbe  guix-build-56e79fe683d3/output/powerpc64le-linux-gnu/SHA256SUMS.part
  3d207bb57dc45f234d804a9ee615001aa28ac4b59b530a1e7d16d0a72c2ea514  guix-build-56e79fe683d3/output/powerpc64le-linux-gnu/bitcoin-56e79fe683d3-powerpc64le-linux-gnu-debug.tar.gz
  16a789c98409d36bd6b69a5ca38cd8886979f50f845265dc0b005c92286a3e4f  guix-build-56e79fe683d3/output/powerpc64le-linux-gnu/bitcoin-56e79fe683d3-powerpc64le-linux-gnu.tar.gz
  e48f6fae9c2ffeb2bf02ffc073ac69648b2ce4ba87e0ad7a3a5059abf33b8ce2  guix-build-56e79fe683d3/output/riscv64-linux-gnu/SHA256SUMS.part
  fa8d66af5f202e0c8968114af4dcd6d88099eb91d197dfaaa0144f8ae6b12f4a  guix-build-56e79fe683d3/output/riscv64-linux-gnu/bitcoin-56e79fe683d3-riscv64-linux-gnu-debug.tar.gz
  86cffa62687f4272c899897ff6c1a86e1a7bdbbb7ab09a085b7b1122d3a1f1b2  guix-build-56e79fe683d3/output/riscv64-linux-gnu/bitcoin-56e79fe683d3-riscv64-linux-gnu.tar.gz
  e42a7c33da6ea4be5d0826df097bdc7e919c9fd6642e7d59fe3d45a97d9009fa  guix-build-56e79fe683d3/output/x86_64-apple-darwin/SHA256SUMS.part
  2f9faa88fa0025b9bfade83177b1f50833dc6c3be1ef26c4d5881aa165bcc537  guix-build-56e79fe683d3/output/x86_64-apple-darwin/bitcoin-56e79fe683d3-x86_64-apple-darwin-unsigned.dmg
  fdfe560968c85500dc886d4e12b851cd27a76de860b8cbf1fb6aac95ccd0582e  guix-build-56e79fe683d3/output/x86_64-apple-darwin/bitcoin-56e79fe683d3-x86_64-apple-darwin-unsigned.tar.gz
  c3c75560befd72a9f13f5626ddf39c63ad25fb9753a4d941e48830b7e06f143e  guix-build-56e79fe683d3/output/x86_64-apple-darwin/bitcoin-56e79fe683d3-x86_64-apple-darwin.tar.gz
  38100946ec1469fdd31aa8ea9e471b317dc278c298c106289c119016c2c0caa0  guix-build-56e79fe683d3/output/x86_64-linux-gnu/SHA256SUMS.part
  67890771aad89dc0d20b8dcdc6b29bd838ace310e8bcbbc0d16d7afc87d3a474  guix-build-56e79fe683d3/output/x86_64-linux-gnu/bitcoin-56e79fe683d3-x86_64-linux-gnu-debug.tar.gz
  a9772b40c8b9d3c1a0bf9c9db2a60050415bf6a9bd4a19cfd8a038f4a1e712e3  guix-build-56e79fe683d3/output/x86_64-linux-gnu/bitcoin-56e79fe683d3-x86_64-linux-gnu.tar.gz
  01da0561f2c3a268c28615b1573dfdecb6346bf3f8eba7a052488191234ac1d6  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/SHA256SUMS.part
  71324ac0f6fc8163e41031b2fd2d38d2e15bfd5ef4efe4cb45d7974fad474394  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/bitcoin-56e79fe683d3-win64-debug.zip
  219b58281d3c79b2ed7e9085b1e15d7e021fd3899ef07a6ad747058b43d64443  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/bitcoin-56e79fe683d3-win64-setup-unsigned.exe
  fe838d32587c2f942fcd9f9a0b3735611b686a867e2d2040cf3a8aa6a43d09fe  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/bitcoin-56e79fe683d3-win64-unsigned.tar.gz
  13b537217a13293b93afd7c588b3733955c3188f79a3249b363fb4e885b74b32  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/bitcoin-56e79fe683d3-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  e590e67d2b151e7d079f50393c61cacf9e65f5e3fdddc10bffd5dbb59cd9f5e3  guix-build-56e79fe683d3/output/aarch64-linux-gnu/SHA256SUMS.part
  9222a733209dc73168722ee0f290831d1723f7ed55abc1e243dd3892ef9733f1  guix-build-56e79fe683d3/output/aarch64-linux-gnu/bitcoin-56e79fe683d3-aarch64-linux-gnu-debug.tar.gz
  a4ec01411195412e9a483397554d98b2db161a6be8aceee2dac78f0015f2a8e5  guix-build-56e79fe683d3/output/aarch64-linux-gnu/bitcoin-56e79fe683d3-aarch64-linux-gnu.tar.gz
  a4ff8f2538c1b3a63a3e7c92699c18164b2c4954ebd72c4a854bf7844e6131b6  guix-build-56e79fe683d3/output/arm-linux-gnueabihf/SHA256SUMS.part
  ac6e4dffcf6f49dac73d3677f3fe5edb08ee1127648bc7ec24b217f48a3a4d21  guix-build-56e79fe683d3/output/arm-linux-gnueabihf/bitcoin-56e79fe683d3-arm-linux-gnueabihf-debug.tar.gz
  ab26467fce9732596b1713179618eee20c2bd44875dc1c39f9afd68f135e8ce4  guix-build-56e79fe683d3/output/arm-linux-gnueabihf/bitcoin-56e79fe683d3-arm-linux-gnueabihf.tar.gz
  f44108d818d53ee7e70b44361cb3cc6841b7aecbe4fade1fa289263718620824  guix-build-56e79fe683d3/output/arm64-apple-darwin/SHA256SUMS.part
  29adfb2d575be8b5a7092b2aff888af2084ad5783bdc74ae3de4b2dd84da7a26  guix-build-56e79fe683d3/output/arm64-apple-darwin/bitcoin-56e79fe683d3-arm64-apple-darwin-unsigned.dmg
  3d7640f604bd27cb1ae47853d70378a7631aa436b5c027eae31fa06d4dd20d4a  guix-build-56e79fe683d3/output/arm64-apple-darwin/bitcoin-56e79fe683d3-arm64-apple-darwin-unsigned.tar.gz
  3f8d8fc49cf722a7a13640872762d045c14efd610fba908f0acc99a99032b903  guix-build-56e79fe683d3/output/arm64-apple-darwin/bitcoin-56e79fe683d3-arm64-apple-darwin.tar.gz
  b8df097e10e7acded8556a5681da2b0132c0d509b200792f5584c186b8dcaf24  guix-build-56e79fe683d3/output/dist-archive/bitcoin-56e79fe683d3.tar.gz
  1a605c563038107b88e8d859fa045ca3087241340264eb7125e97b3af36874db  guix-build-56e79fe683d3/output/powerpc64-linux-gnu/SHA256SUMS.part
  d10be89a816ee2f47bf778ef4aaa8a7b548403c123a4b4b3aa0470ee7b9472d2  guix-build-56e79fe683d3/output/powerpc64-linux-gnu/bitcoin-56e79fe683d3-powerpc64-linux-gnu-debug.tar.gz
  839dd079d677c87a91ccc28f6c423657d98212350d3693ae2facb92082d10c88  guix-build-56e79fe683d3/output/powerpc64-linux-gnu/bitcoin-56e79fe683d3-powerpc64-linux-gnu.tar.gz
  200d7a72a7901b6788e70aa1c6fbbe16144e9dac29beb06242a9dcfe1e88acbe  guix-build-56e79fe683d3/output/powerpc64le-linux-gnu/SHA256SUMS.part
  3d207bb57dc45f234d804a9ee615001aa28ac4b59b530a1e7d16d0a72c2ea514  guix-build-56e79fe683d3/output/powerpc64le-linux-gnu/bitcoin-56e79fe683d3-powerpc64le-linux-gnu-debug.tar.gz
  16a789c98409d36bd6b69a5ca38cd8886979f50f845265dc0b005c92286a3e4f  guix-build-56e79fe683d3/output/powerpc64le-linux-gnu/bitcoin-56e79fe683d3-powerpc64le-linux-gnu.tar.gz
  e48f6fae9c2ffeb2bf02ffc073ac69648b2ce4ba87e0ad7a3a5059abf33b8ce2  guix-build-56e79fe683d3/output/riscv64-linux-gnu/SHA256SUMS.part
  fa8d66af5f202e0c8968114af4dcd6d88099eb91d197dfaaa0144f8ae6b12f4a  guix-build-56e79fe683d3/output/riscv64-linux-gnu/bitcoin-56e79fe683d3-riscv64-linux-gnu-debug.tar.gz
  86cffa62687f4272c899897ff6c1a86e1a7bdbbb7ab09a085b7b1122d3a1f1b2  guix-build-56e79fe683d3/output/riscv64-linux-gnu/bitcoin-56e79fe683d3-riscv64-linux-gnu.tar.gz
  e42a7c33da6ea4be5d0826df097bdc7e919c9fd6642e7d59fe3d45a97d9009fa  guix-build-56e79fe683d3/output/x86_64-apple-darwin/SHA256SUMS.part
  2f9faa88fa0025b9bfade83177b1f50833dc6c3be1ef26c4d5881aa165bcc537  guix-build-56e79fe683d3/output/x86_64-apple-darwin/bitcoin-56e79fe683d3-x86_64-apple-darwin-unsigned.dmg
  fdfe560968c85500dc886d4e12b851cd27a76de860b8cbf1fb6aac95ccd0582e  guix-build-56e79fe683d3/output/x86_64-apple-darwin/bitcoin-56e79fe683d3-x86_64-apple-darwin-unsigned.tar.gz
  c3c75560befd72a9f13f5626ddf39c63ad25fb9753a4d941e48830b7e06f143e  guix-build-56e79fe683d3/output/x86_64-apple-darwin/bitcoin-56e79fe683d3-x86_64-apple-darwin.tar.gz
  38100946ec1469fdd31aa8ea9e471b317dc278c298c106289c119016c2c0caa0  guix-build-56e79fe683d3/output/x86_64-linux-gnu/SHA256SUMS.part
  67890771aad89dc0d20b8dcdc6b29bd838ace310e8bcbbc0d16d7afc87d3a474  guix-build-56e79fe683d3/output/x86_64-linux-gnu/bitcoin-56e79fe683d3-x86_64-linux-gnu-debug.tar.gz
  a9772b40c8b9d3c1a0bf9c9db2a60050415bf6a9bd4a19cfd8a038f4a1e712e3  guix-build-56e79fe683d3/output/x86_64-linux-gnu/bitcoin-56e79fe683d3-x86_64-linux-gnu.tar.gz
  01da0561f2c3a268c28615b1573dfdecb6346bf3f8eba7a052488191234ac1d6  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/SHA256SUMS.part
  71324ac0f6fc8163e41031b2fd2d38d2e15bfd5ef4efe4cb45d7974fad474394  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/bitcoin-56e79fe683d3-win64-debug.zip
  219b58281d3c79b2ed7e9085b1e15d7e021fd3899ef07a6ad747058b43d64443  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/bitcoin-56e79fe683d3-win64-setup-unsigned.exe
  fe838d32587c2f942fcd9f9a0b3735611b686a867e2d2040cf3a8aa6a43d09fe  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/bitcoin-56e79fe683d3-win64-unsigned.tar.gz
  13b537217a13293b93afd7c588b3733955c3188f79a3249b363fb4e885b74b32  guix-build-56e79fe683d3/output/x86_64-w64-mingw32/bitcoin-56e79fe683d3-win64.zip
  ```

ACKs for top commit:
  hebasto:
    ACK 56e79fe683d36c1944e52326fae3bcc4cb7deec7

Tree-SHA512: 628ab6cda80069ad277107639bef21b44a8417198862e9ec89b45a2c41741d29aeb79aa58c5a90283fb96cf707494ae948ac790abde809bb18c86b14af999200
2023-04-16 12:07:09 -05:00