[MacPorts] #62822: gmake @4.3_0+universal: build error on BigSur arm64 (was: gmake 4.3_0+universal: build error on BigSur arm64)

MacPorts noreply at macports.org
Wed May 12 05:53:31 UTC 2021


#62822: gmake @4.3_0+universal: build error on BigSur arm64
---------------------+--------------------
  Reporter:  kode54  |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:  2.6.4
Resolution:          |   Keywords:
      Port:  gmake   |
---------------------+--------------------
Changes (by ryandesign):

 * cc: ryandesign (added)


Comment:

 I can reproduce this on macOS 11.0.1 Intel with Xcode 12.4 when building
 universal, but not when building non-universal.

 Where things seem to start to go wrong in config.log is that several
 tests, such as whether the system has something basic like `ssize_t`, are
 failing because:

 {{{
 In file included from conftest.c:83:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/types.h:81:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/machine/endian.h:35:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/i386/endian.h:99:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_endian.h:130:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/_OSByteOrder.h:80:
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/arm/OSByteOrder.h:15:1:
 error: redefinition of '_OSSwapInt16'
 _OSSwapInt16(
 ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/i386/_OSByteOrder.h:46:1:
 note: previous definition is here
 _OSSwapInt16(
 ^
 In file included from conftest.c:83:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/types.h:81:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/machine/endian.h:35:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/i386/endian.h:99:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_endian.h:130:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/_OSByteOrder.h:80:
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/arm/OSByteOrder.h:25:1:
 error: redefinition of '_OSSwapInt32'
 _OSSwapInt32(
 ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/i386/_OSByteOrder.h:55:1:
 note: previous definition is here
 _OSSwapInt32(
 ^
 In file included from conftest.c:83:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/types.h:81:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/machine/endian.h:35:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/i386/endian.h:99:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/sys/_endian.h:130:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/_OSByteOrder.h:80:
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/arm/OSByteOrder.h:41:1:
 error: redefinition of '_OSSwapInt64'
 _OSSwapInt64(
 ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/libkern/i386/_OSByteOrder.h:70:1:
 note: previous definition is here
 _OSSwapInt64(
 ^
 3 errors generated.
 }}}

 And because it thinks we don't have `ssize_t` it defines its own which
 causes everything that follows to be wrong.

 Those errors look... terrible? I mean start with machine/endian.h which
 includes i386/endian.h if building for Intel ''or'' arm/endian.h if
 building for ARM with no consideration for what should happen if we want
 to build for both. Fortunately those files are are identical. But then we
 come to libkern/_OSByteOrder.h which includes libkern/i386/_OSByteOrder.h
 if building for Intel ''and'' libkern/arm/OSByteOrder.h if building for
 ARM, and they both try to define the same functions, so of course that
 can't work. I don't understand why the system headers appear to be
 designed to create conflicting definitions of OSSwapInt* when building
 universal. Given this problem that seems to occur just by including the
 ubiquitous <sys/types.h>, I don't understand how we're able to build
 anything universal on macOS 11 at all, without resorting to using
 muniversal for everything.

-- 
Ticket URL: <https://trac.macports.org/ticket/62822#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list