depends: Issue cross compiling for macOS on Debian Buster #16052

issue fanquake openend this issue on May 20, 2019
  1. fanquake commented at 6:43 am on May 20, 2019: member

    Using a debian:buster-slim Docker container, available here, doing a depends build for x86_64-apple-darwin14, cctools bombs out with the following in config.log:

     0configure:3616: checking for x86_64-pc-linux-gnu-gcc
     1configure:3643: result: /bitcoin/depends/work/build/x86_64-apple-darwin14/native_cctools/807d6fd1be5d2224872e381870c0a75387fe05e6-3e0a7ea9e07/toolchain/bin/clang
     2configure:3912: checking for C compiler version
     3configure:3921: /bitcoin/depends/work/build/x86_64-apple-darwin14/native_cctools/807d6fd1be5d2224872e381870c0a75387fe05e6-3e0a7ea9e07/toolchain/bin/clang --version >&5
     4clang version 3.7.1 (tags/RELEASE_371/final)
     5Target: x86_64-unknown-linux-gnu
     6Thread model: posix
     7configure:3932: $? = 0
     8configure:3921: /bitcoin/depends/work/build/x86_64-apple-darwin14/native_cctools/807d6fd1be5d2224872e381870c0a75387fe05e6-3e0a7ea9e07/toolchain/bin/clang -v >&5
     9clang version 3.7.1 (tags/RELEASE_371/final)
    10Target: x86_64-unknown-linux-gnu
    11Thread model: posix
    12configure:3932: $? = 0
    13configure:3921: /bitcoin/depends/work/build/x86_64-apple-darwin14/native_cctools/807d6fd1be5d2224872e381870c0a75387fe05e6-3e0a7ea9e07/toolchain/bin/clang -V >&5
    14clang-3.7: error: argument to '-V' is missing (expected 1 value)
    15clang-3.7: error: no input files
    16configure:3932: $? = 1
    17configure:3921: /bitcoin/depends/work/build/x86_64-apple-darwin14/native_cctools/807d6fd1be5d2224872e381870c0a75387fe05e6-3e0a7ea9e07/toolchain/bin/clang -qversion >&5
    18clang-3.7: error: unknown argument: '-qversion'
    19clang-3.7: error: no input files
    20configure:3932: $? = 1
    21configure:3952: checking whether the C compiler works
    22configure:3974: /bitcoin/depends/work/build/x86_64-apple-darwin14/native_cctools/807d6fd1be5d2224872e381870c0a75387fe05e6-3e0a7ea9e07/toolchain/bin/clang -O3 -I/bitcoin/depends/x86_64-apple-darwin14/native/include     -L/bitcoin/depends/x86_64-apple-darwin14/native/lib -Wl,-rpath=\$$ORIGIN/../lib     conftest.c  >&5
    23/usr/bin/ld: cannot find crtbegin.o: No such file or directory
    24/usr/bin/ld: cannot find -lgcc
    25/usr/bin/ld: cannot find -lgcc_s
    26clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)
    27configure:3978: $? = 1
    28configure:4016: result: no
    29configure: failed program was:
    30| /* confdefs.h */
    31| #define PACKAGE_NAME "cctools"
    32| #define PACKAGE_TARNAME "cctools"
    33| #define PACKAGE_VERSION "877.8"
    34| #define PACKAGE_STRING "cctools 877.8"
    35| #define PACKAGE_BUGREPORT "t.poechtrager@gmail.com"
    36| #define PACKAGE_URL ""
    37| /* end confdefs.h.  */
    38| 
    39| int
    40| main ()
    41| {
    42| 
    43|   ;
    44|   return 0;
    45| }
    46configure:4021: error: in `/bitcoin/depends/work/build/x86_64-apple-darwin14/native_cctools/807d6fd1be5d2224872e381870c0a75387fe05e6-3e0a7ea9e07/cctools':
    47configure:4023: error: C compiler cannot create executables
    48See `config.log' for more details
    

    Cross-compiling with a debian:stretch-slim container works file, so my assumption is a change in Busters newer GCC (8.3.0) has broken our older Clang (3.7.1).

    A a similar issue appeared in Clang previously, which produced similar output, and was resolved in LLVM here.

  2. fanquake added the label Build system on May 20, 2019
  3. fanquake referenced this in commit 8bb298cfeb on May 20, 2019
  4. MarcoFalke commented at 11:00 am on May 20, 2019: member
    Couldn’t the clang version be bumped to be closer to a version that is installed natively on macos? That way the released binaries are closer to the binaries that were tested by developers that compile on native mac.
  5. theuni commented at 5:01 pm on May 20, 2019: member

    Couldn’t the clang version be bumped to be closer to a version that is installed natively on macos? That way the released binaries are closer to the binaries that were tested by developers that compile on native mac.

    Yes. But in the process we should update cctools/ld64 as well as the SDK. In the past, we’ve tried to find combinations that were close to what Apple was supporting at the time. That avoids situations like new clang warnings from old SDK headers.

    Edit: To clarify, I think we should start by updating everything and see if that magically solves the problem. If not, go from there.

  6. MarcoFalke added the label macOS on May 20, 2019
  7. MarcoFalke added this to the milestone 0.19.0 on May 20, 2019
  8. fanquake removed this from the milestone 0.19.0 on Sep 11, 2019
  9. fanquake added this to the milestone 0.20.0 on Sep 11, 2019
  10. fanquake commented at 6:11 am on September 11, 2019: member
    Pushed to 0.20.0. We’ll fix this early in that cycle.
  11. afk11 commented at 7:02 pm on January 30, 2020: contributor
    Hi, looks like this issue affects Qubes’ Debian Buster images.
  12. laanwj closed this on Feb 5, 2020

  13. DrahtBot locked this on Feb 15, 2022

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-07-05 19:13 UTC

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