Opened 2 years ago

Last modified 2 years ago

#65815 new defect

ffcall @2.4+universal: error: redefinition of '_OSSwapInt16'

Reported by: andrewcox Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: arm64 Cc:
Port: ffcall

Description

Not 100% this is M1 related, but I am able to build this on my x86_64 mac, and not able to build on M1.

Failure happens in configure, and looks like this:

configure:23136: result: cannot detect
configure:23140: error: in `/opt/mports/var/macports/build/_opt_mports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4':
configure:23142: error: cannot make /usr/bin/clang report undeclared builtins
See `config.log' for more details

Full log here https://pastebin.com/88c2ztZy

Change History (2)

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Keywords: arm64 added
Port: ffcall added

comment:2 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: ffcall @2.4: fails to build on M1ffcall @2.4+universal: error: redefinition of '_OSSwapInt16'

Our automated build system shows 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.

Note: See TracTickets for help on using tickets.