Guix builds are affected by external environment #29754

issue hebasto openend this issue on March 28, 2024
  1. hebasto commented at 9:40 am on March 28, 2024: member

    Here is a demo branch.

    It is based on the master branch @ c8e3978114716bb8fb10695b9d187652f3ab4926 with the only diff applied on the top of it:

     0--- a/depends/hosts/darwin.mk
     1+++ b/depends/hosts/darwin.mk
     2@@ -95,7 +95,7 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
     3 
     4 darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacosx-version-min=$(OSX_MIN_VERSION)
     5 darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacosx-version-min=$(OSX_MIN_VERSION)
     6-darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
     7+# darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
     8 
     9 ifneq ($(build_os),darwin)
    10 darwin_CFLAGS += -mlinker-version=$(LD64_VERSION)
    

    One might expect that not passing the -Wl,-platform_version,macos flag to a linker will cause the check_MACHO_sdk in the symbol-check.py to fail.

    That’s true on Ubuntu 22.04 LTS:

     0...
     1Running symbol and dynamic library checks...
     2bitcoind: failed SDK
     3bitcoin-cli: failed SDK
     4bitcoin-tx: failed SDK
     5bitcoin-wallet: failed SDK
     6bitcoin-util: failed SDK
     7test/test_bitcoin: failed SDK
     8qt/bitcoin-qt: failed SDK
     9make: *** [Makefile:23004: check-symbols] Error 1
    10make: Leaving directory '/distsrc-base/distsrc-d9aae66b3efa-x86_64-apple-darwin/src'
    

    But all tests pass on Ubuntu 23.10:

    0x86_64
    1ce93a8c05df4d31fa1e33862ba63318a7350fb175a5f25eae771e24447fc3cda  guix-build-d9aae66b3efa/output/dist-archive/bitcoin-d9aae66b3efa.tar.gz
    2d7d821344fde3e5cedf937846f57cfd298e1b5ce8956d1e5c04e59bde2b23c8d  guix-build-d9aae66b3efa/output/x86_64-apple-darwin/SHA256SUMS.part
    31a9288baaa43a2ad0bfd339d41d0616d879bdd82323e1b17cddb32453f2b3733  guix-build-d9aae66b3efa/output/x86_64-apple-darwin/bitcoin-d9aae66b3efa-x86_64-apple-darwin-unsigned.tar.gz
    45b49447f9222161d48b6d435e5ff064132727e8f90f90a239738a29a3c0b9111  guix-build-d9aae66b3efa/output/x86_64-apple-darwin/bitcoin-d9aae66b3efa-x86_64-apple-darwin-unsigned.zip
    5af6c0a3db2cc0e046ff3c4c4f4fb3fce705e8b382aadb3b6cfbb153da55e60d3  guix-build-d9aae66b3efa/output/x86_64-apple-darwin/bitcoin-d9aae66b3efa-x86_64-apple-darwin.tar.gz
    
  2. hebasto added the label Build system on Mar 28, 2024
  3. fanquake commented at 9:30 am on May 31, 2024: member

    Using:

     0commit 76726e1131e15161ca1d9f90ffd2d337bb9aacdb (HEAD -> repro_29754)
     1Author: Your Name <you@example.com>
     2Date:   Fri May 31 09:16:25 2024 +0000
     3
     4    repro: 29754
     5
     6diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
     7index a64008d6aa..3cfe333264 100644
     8--- a/depends/hosts/darwin.mk
     9+++ b/depends/hosts/darwin.mk
    10@@ -107,7 +107,7 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
    11 
    12 darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacosx-version-min=$(OSX_MIN_VERSION)
    13 darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacosx-version-min=$(OSX_MIN_VERSION)
    14-darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
    15+#darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
    16 
    17 ifneq ($(build_os),darwin)
    18 darwin_CFLAGS += -mlinker-version=$(LD64_VERSION)
    

    I can’t repro this on Ubuntu 24.04:

     0# lsb_release -d
     1Description:	Ubuntu 24.04 LTS
     2HOSTS="arm64-apple-darwin" ./contrib/guix/guix-build
     3<snip>
     4Running symbol and dynamic library checks...
     5bitcoind: failed SDK
     6bitcoin-cli: failed SDK
     7bitcoin-tx: failed SDK
     8bitcoin-wallet: failed SDK
     9bitcoin-util: failed SDK
    10test/test_bitcoin: failed SDK
    11qt/bitcoin-qt: failed SDK
    12make: *** [Makefile:22450: check-symbols] Error 1
    13make: Leaving directory '/distsrc-base/distsrc-76726e1131e1-arm64-apple-darwin/src'
    

    Can you confirm this is still an issue / provide a new reproducer / confirm if it’s only happening on Ubuntu 23.10.

  4. hebasto commented at 1:05 pm on June 3, 2024: member

    Can you confirm this is still an issue / provide a new reproducer / confirm if it’s only happening on Ubuntu 23.10.

    I can confirm the issue on Ubuntu 23.10, ~but not able to test on Ubuntu 24.04 using the system’s guix package.~

    UPD. I’ve worked around Ubuntu’s bug and will provide results shortly.

  5. hebasto commented at 2:01 pm on June 3, 2024: member

    I can’t repro this on Ubuntu 24.04:

    I can reproduce the issue on a fresh Ubuntu 24.04 installation with the default guix package installed and apparmor package uninstalled.

    Using the master branch @ 80bdd4b6beb878c95478b5623c9f9ff0b948ad57 and the following commit on top of it:

     0commit 371a379235211504f81d10e55953f0de4b91a442 (HEAD -> 240603-test-29754.0)
     1Author: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
     2Date:   Mon Jun 3 14:40:05 2024 +0100
     3
     4    depends: Skip `darwin_LDFLAGS` setting. An error is expecting
     5
     6diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
     7index a64008d6aa..e956db5c2d 100644
     8--- a/depends/hosts/darwin.mk
     9+++ b/depends/hosts/darwin.mk
    10@@ -107,7 +107,7 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
    11 
    12 darwin_CFLAGS=-pipe -std=$(C_STANDARD) -mmacosx-version-min=$(OSX_MIN_VERSION)
    13 darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) -mmacosx-version-min=$(OSX_MIN_VERSION)
    14-darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
    15+# darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION)
    16 
    17 ifneq ($(build_os),darwin)
    18 darwin_CFLAGS += -mlinker-version=$(LD64_VERSION)
    
  6. fanquake commented at 2:03 pm on June 3, 2024: member
    Seems like this need more information then, for us to be able to do anything.
  7. maflcko commented at 2:07 pm on June 3, 2024: member
    Do the shasums for the 22 LTS result differ from the 24 LTS result?
  8. hebasto commented at 2:37 pm on June 3, 2024: member

    Do the shasums for the 22 LTS result differ from the 24 LTS result?

    Ubuntu 24.04, x86_64:

    07ee2be332a9c7221280fa37c5720ee93077d6aa3f1730b75d748b3fa74efea5c  guix-build-80bdd4b6beb8/output/arm64-apple-darwin/SHA256SUMS.part
    1bac5e4d4e4f823ce020ff82caf9fed0d00006204c3fd1207db3f6642db25306a  guix-build-80bdd4b6beb8/output/arm64-apple-darwin/bitcoin-80bdd4b6beb8-arm64-apple-darwin-unsigned.tar.gz
    2eba8ad10522dd1420436c4f1560bb8cc4c00a40db5af5cc1da782f8636603719  guix-build-80bdd4b6beb8/output/arm64-apple-darwin/bitcoin-80bdd4b6beb8-arm64-apple-darwin-unsigned.zip
    3ae757eb9efd26cabf82b4f0548ee6f4bc822ea82585444d2781088be01fde21a  guix-build-80bdd4b6beb8/output/arm64-apple-darwin/bitcoin-80bdd4b6beb8-arm64-apple-darwin.tar.gz
    4c2b2c4329a24e8b0a414012ac5dfe52359cc05a1c622b09e46e11f0243b4393a  guix-build-80bdd4b6beb8/output/dist-archive/bitcoin-80bdd4b6beb8.tar.gz
    529b29a9601a7774a56a4dc730c399e0e5feed536ac4936bfc82b8415e7be056b  guix-build-80bdd4b6beb8/output/x86_64-apple-darwin/SHA256SUMS.part
    67bc6ddd85253392114e91a832d4648ea0df951dd9dc8f52814bb74e9638b1c44  guix-build-80bdd4b6beb8/output/x86_64-apple-darwin/bitcoin-80bdd4b6beb8-x86_64-apple-darwin-unsigned.tar.gz
    7aa8df284c0239c54ed2fca4b6bf8ad21045a600aa5703b2fed1673d69863dffa  guix-build-80bdd4b6beb8/output/x86_64-apple-darwin/bitcoin-80bdd4b6beb8-x86_64-apple-darwin-unsigned.zip
    80de1ccb7e683f65e9853946054065497013f8c34a10ade8c87a1cf5518d0a7e3  guix-build-80bdd4b6beb8/output/x86_64-apple-darwin/bitcoin-80bdd4b6beb8-x86_64-apple-darwin.tar.gz
    

    Ubuntu 22.04, x86_64:

    07ee2be332a9c7221280fa37c5720ee93077d6aa3f1730b75d748b3fa74efea5c  guix-build-80bdd4b6beb8/output/arm64-apple-darwin/SHA256SUMS.part
    1bac5e4d4e4f823ce020ff82caf9fed0d00006204c3fd1207db3f6642db25306a  guix-build-80bdd4b6beb8/output/arm64-apple-darwin/bitcoin-80bdd4b6beb8-arm64-apple-darwin-unsigned.tar.gz
    2eba8ad10522dd1420436c4f1560bb8cc4c00a40db5af5cc1da782f8636603719  guix-build-80bdd4b6beb8/output/arm64-apple-darwin/bitcoin-80bdd4b6beb8-arm64-apple-darwin-unsigned.zip
    3ae757eb9efd26cabf82b4f0548ee6f4bc822ea82585444d2781088be01fde21a  guix-build-80bdd4b6beb8/output/arm64-apple-darwin/bitcoin-80bdd4b6beb8-arm64-apple-darwin.tar.gz
    4c2b2c4329a24e8b0a414012ac5dfe52359cc05a1c622b09e46e11f0243b4393a  guix-build-80bdd4b6beb8/output/dist-archive/bitcoin-80bdd4b6beb8.tar.gz
    529b29a9601a7774a56a4dc730c399e0e5feed536ac4936bfc82b8415e7be056b  guix-build-80bdd4b6beb8/output/x86_64-apple-darwin/SHA256SUMS.part
    67bc6ddd85253392114e91a832d4648ea0df951dd9dc8f52814bb74e9638b1c44  guix-build-80bdd4b6beb8/output/x86_64-apple-darwin/bitcoin-80bdd4b6beb8-x86_64-apple-darwin-unsigned.tar.gz
    7aa8df284c0239c54ed2fca4b6bf8ad21045a600aa5703b2fed1673d69863dffa  guix-build-80bdd4b6beb8/output/x86_64-apple-darwin/bitcoin-80bdd4b6beb8-x86_64-apple-darwin-unsigned.zip
    80de1ccb7e683f65e9853946054065497013f8c34a10ade8c87a1cf5518d0a7e3  guix-build-80bdd4b6beb8/output/x86_64-apple-darwin/bitcoin-80bdd4b6beb8-x86_64-apple-darwin.tar.gz
    
  9. hebasto commented at 2:49 pm on June 24, 2024: member

    One might expect that not passing the -Wl,-platform_version,macos flag to a linker will cause the check_MACHO_sdk in the symbol-check.py to fail.

    That’s true on Ubuntu 22.04 LTS:

    It’s weird, but I can’t longer reproduce it with the same commit.

    Closing.

  10. hebasto closed this on Jun 24, 2024


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: 2024-09-28 22:12 UTC

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