Broken --enable-suppress-external-warning for Apple Clang 15 on x86_64 #29174

issue hebasto openend this issue on January 4, 2024
  1. hebasto commented at 9:53 am on January 4, 2024: member

    Apple Clang 15 does not support -Xclang -internal-isystem anymore. On both x86_64 and arm64 platforms, the following check: https://github.com/bitcoin/bitcoin/blob/65c05db660b2ca1d0076b0d8573a6760b3228068/configure.ac#L742-L744 fails with error: unknown argument: '-internal-isystem/usr/local/include'.

    It makes the --enable-suppress-external-warnings option not working for dependency packages installed by Homebrew and linked to /usr/local, which happens for all non-keg packages on x86_64. There is no such an effect on arm64.

    For a related discussion refer to #29165 (review).

  2. maflcko added the label macOS on Jan 4, 2024
  3. maflcko added the label Build system on Jan 4, 2024
  4. fanquake commented at 11:51 am on January 4, 2024: member

    fails with error: unknown argument: ‘-internal-isystem/usr/local/include’

    Can this be investigated further. The -Xclang and -internal-isystem options still exist in Clang. Is the issue here just the concatenation? Maybe that worked previously, but no-longer does? What happens if you change -Xclang -internal-isystem/usr/local/include to -Xclang -internal-isystem /usr/local/include?

  5. hebasto commented at 4:53 pm on January 4, 2024: member

    Here are more details:

    1.

    0% clang -cc1 --help | grep -A 1 internal-isystem
    1  -internal-isystem <directory>
    2                          Add directory to the internal system include search path; these are assumed to not be user-provided and are used to model system and standard headers' paths.
    

    2.

    Is the issue here just the concatenation? Maybe that worked previously, but no-longer does? What happens if you change -Xclang -internal-isystem/usr/local/include to -Xclang -internal-isystem /usr/local/include?

    0% clang++ -Xclang -internal-isystem /usr/local/include hello.cpp       
    1ld: file cannot be mmap()ed, errno=22 path=/usr/local/include in '/usr/local/include'
    2clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
  6. hebasto commented at 11:20 am on January 7, 2024: member

    According to Wikipedia, the Apple clang version 15.0.0 (clang-1500.0.40.1) corresponds to LLVM clang 16.0.0.

    On Ubuntu 23.10:

    0$ clang++-16 -Xclang -internal-isystem/usr/local/include test.cpp 
    1error: unknown argument: '-internal-isystem/usr/local/include'  # Same for clang++-17.
    

    However,

    0$ clang++-15 -Xclang -internal-isystem/usr/local/include test.cpp  # Works.
    
  7. hebasto commented at 12:02 pm on January 7, 2024: member
    Fixed in #29195.
  8. fanquake closed this on Jan 9, 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-07-05 19:13 UTC

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