[MacPorts] #65815: ffcall @2.4+universal: error: redefinition of '_OSSwapInt16' (was: ffcall @2.4: fails to build on M1)

MacPorts noreply at macports.org
Sat Sep 10 19:07:51 UTC 2022


#65815: ffcall @2.4+universal: error: redefinition of '_OSSwapInt16'
------------------------+--------------------
  Reporter:  andrewcox  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:  arm64
      Port:  ffcall     |
------------------------+--------------------

Comment (by ryandesign):

 Our automated build system shows
 [https://ports.macports.org/port/ffcall/details/ successful builds of
 ffcall on all macOS versions] when building non-universal, but I see
 you're building with the universal variant, and I assume that is the cause
 of the problem. If you don't need the universal variant, clean the port
 and reattempt your installation without the universal variant. If you do
 need the universal variant, read on.

 Your config.log shows failures determining some of the most basic things,
 like the existence of the `size_t` type:

 {{{
 configure:21844: checking for size_t
 configure:21844: /usr/bin/clang -c -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch arm64
 -arch x86_64 -I/opt/mports/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk conftest.c
 >&5
 In file included from conftest.c:60:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/stdlib.h:66:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/wait.h:186:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/machine/endian.h:35:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/i386/endian.h:101:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/_endian.h:130:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/_OSByteOrder.h:80:
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/arm/OSByteOrder.h:15:1:
 error: redefinition of '_OSSwapInt16'
 _OSSwapInt16(
 ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/i386/_OSByteOrder.h:46:1:
 note: previous definition is here
 _OSSwapInt16(
 ^
 In file included from conftest.c:60:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/stdlib.h:66:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/wait.h:186:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/machine/endian.h:35:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/i386/endian.h:101:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/_endian.h:130:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/_OSByteOrder.h:80:
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/arm/OSByteOrder.h:25:1:
 error: redefinition of '_OSSwapInt32'
 _OSSwapInt32(
 ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/i386/_OSByteOrder.h:55:1:
 note: previous definition is here
 _OSSwapInt32(
 ^
 In file included from conftest.c:60:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/stdlib.h:66:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/wait.h:186:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/machine/endian.h:35:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/i386/endian.h:101:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/_endian.h:130:
 In file included from
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/_OSByteOrder.h:80:
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/arm/OSByteOrder.h:41:1:
 error: redefinition of '_OSSwapInt64'
 _OSSwapInt64(
 ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/libkern/i386/_OSByteOrder.h:70:1:
 note: previous definition is here
 _OSSwapInt64(
 ^
 3 errors generated.
 }}}

 We've seen the same problem when using the universal variant in several
 other ports; see #62013 (gtime), #62822 (gmake), #64135 (grep), #61858
 (libunistring). We worked around the problem for gmake by making it use
 the muniversal portgroup, and that could potentially work for the other
 ports as well, though the muniversal portgroup brings with it the
 possibility for different problems.

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


More information about the macports-tickets mailing list