Changes between Initial Version and Version 1 of Ticket #70790


Ignore:
Timestamp:
Sep 19, 2024, 1:01:55 AM (23 hours ago)
Author:
jmroot (Joshua Root)
Comment:

Something seems to be wrong with the SDK you have. On my system:

% ls -l /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/socket.h 
-r--r--r--  1 root  wheel  32534 13 Aug 14:03 /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/socket.h

Your machine/endian.h also seems to be including i386/endian.h when building for arm:

configure:17916: /usr/bin/clang -o conftest -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 conftest.c  >&5
In file included from conftest.c:155:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdlib.h:58:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdlib.h:66:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/wait.h:186:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/machine/endian.h:35:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/i386/endian.h:85:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/sys/_endian.h:131:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/libkern/_OSByteOrder.h:62:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/libkern/arm/_OSByteOrder.h:50:1: error: redefinition of '_OSSwapInt16'
   50 | _OSSwapInt16(
      | ^
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/libkern/i386/_OSByteOrder.h:50:1: note: previous definition is here
   50 | _OSSwapInt16(
      | ^

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #70790 – Description

    initial v1  
    11Building `m4` on Sequoia fails in the configure stage. The relevant lines are
    2 ```
     2{{{
    33| #include <sys/types.h>
    44|                    #include <sys/socket.h>
     
    1414| }
    1515configure:58033: error: Cannot find a type to use in place of socklen_t
    16 ```
     16}}}
    1717
    1818I believe the reason is the following. The compiler is invoked with
    19 ```
     19{{{
    2020configure:58023: /usr/bin/clang -c -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk conftest.c >&5
    21 ```
     21}}}
    2222but the file `sys/socket.h` is not located in this sysroot. Instead, it is found at `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/socket.h`.