[MacPorts] #63467: opencv4: Add a universal variant
MacPorts
noreply at macports.org
Fri Sep 10 04:56:38 UTC 2021
#63467: opencv4: Add a universal variant
--------------------------+----------------------
Reporter: MarkCallow | Owner: stromnov
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: opencv4 |
--------------------------+----------------------
Comment (by MarkCallow):
I found the Portfile in my installation in
`/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/opencv4`
and changed `universal_variant no` to `universal_variant yes`. The
build fails while compiling gmake.
{{{
:info:build /usr/bin/clang -DHAVE_CONFIG_H -I. -I../src
-I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch arm64
-arch x86_64 -c -o fnmatch.o fnmatch.c
:info:build In file included from basename-lgpl.c:23:
:info:build In file included from ./string.h:41:
:info:build In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/string.h:152:
:info:build
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/sys/_types/_ssize_t.h:31:33:
error: cannot combine with previous 'type-name' declaration specifier
:info:build typedef __darwin_ssize_t ssize_t;
:info:build ^
:info:build ../src/config.h:1079:17: note: expanded from macro 'ssize_t'
:info:build #define ssize_t int
:info:build ^
:info:build In file included from fnmatch.c:34:
:info:build In file included from ./string.h:41:
:info:build In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/string.h:152:
:info:build
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/sys/_types/_ssize_t.h:31:33:
error: cannot combine with previous 'type-name' declaration specifier
:info:build typedef __darwin_ssize_t ssize_t;
:info:build ^
:info:build ../src/config.h:1079:17: note: expanded from macro 'ssize_t'
:info:build #define ssize_t int
:info:build ^
:info:build 1 error generated.
}}}
I am surprised because I expect gmake is a dependency of quite a few
ports. The issue most likely is that there is a config macro controlling
some cpu-specific behaviour but since both architectures are being
compiled in a single call to clang only one set of macros can be defined.
For universal builds to work cpu-specific behaviour needs to be controlled
using compiler pre-defined macros.
It looks like I will have to abandon plans for a universal build and make
2 cpu-specific builds instead.
--
Ticket URL: <https://trac.macports.org/ticket/63467#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list