[MacPorts] #66888: graphene @1.10.8_0+universal: arm64/x86_64 fails due to conflicting pkgconfig files
MacPorts
noreply at macports.org
Sat Feb 11 02:52:41 UTC 2023
#66888: graphene @1.10.8_0+universal: arm64/x86_64 fails due to conflicting
pkgconfig files
--------------------+----------------------
Reporter: kencu | Owner: dbevans
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: graphene
--------------------+----------------------
when building graphene for arm64 and x86_64 universally, the two builds
are quite different and the pkgconfig files don't match.
The arm64 arch builds with neon active, and the x86_64 arch builds with
SSE2 and a number of enabling flags.
{{{
% diff -u ./destroot-intel/opt/local/lib/pkgconfig/ ./destroot-
arm64/opt/local/lib/pkgconfig/
diff -u ./destroot-intel/opt/local/lib/pkgconfig/graphene-1.0.pc
./destroot-arm64/opt/local/lib/pkgconfig/graphene-1.0.pc
--- ./destroot-intel/opt/local/lib/pkgconfig/graphene-1.0.pc 2023-02-10
18:07:50
+++ ./destroot-arm64/opt/local/lib/pkgconfig/graphene-1.0.pc 2023-02-10
18:07:47
@@ -2,9 +2,9 @@
includedir=${prefix}/include
libdir=${prefix}/lib
-graphene_has_sse2=1
+graphene_has_sse2=0
graphene_has_gcc=0
-graphene_has_neon=0
+graphene_has_neon=1
graphene_has_scalar=1
Name: Graphene
@@ -14,4 +14,4 @@
Requires.private: gobject-2.0 >= 2.30.0
Libs: -L${libdir} -lgraphene-1.0
Libs.private: -lm
-Cflags: -I${includedir}/graphene-1.0 -I${libdir}/graphene-1.0/include
-mfpmath=sse -msse -msse2
+Cflags: -I${includedir}/graphene-1.0 -I${libdir}/graphene-1.0/include
diff -u ./destroot-intel/opt/local/lib/pkgconfig/graphene-gobject-1.0.pc
./destroot-arm64/opt/local/lib/pkgconfig/graphene-gobject-1.0.pc
--- ./destroot-intel/opt/local/lib/pkgconfig/graphene-gobject-1.0.pc
2023-02-10 18:07:50
+++ ./destroot-arm64/opt/local/lib/pkgconfig/graphene-gobject-1.0.pc
2023-02-10 18:07:47
@@ -1,9 +1,9 @@
prefix=/opt/local
includedir=${prefix}/include
-graphene_has_sse2=1
+graphene_has_sse2=0
graphene_has_gcc=0
-graphene_has_neon=0
+graphene_has_neon=1
graphene_has_scalar=1
Name: Graphene-GObject
}}}
unfortunately pkgconfig still has no "-target" option or "-arch" option to
control the returned flags. According to the current muniversal PortGroup
functionality, we are expected to find a way to merge these meaningfully.
For the CFLAGS, it's easy. Clang will just ignore the flags that don't
apply to the arch it is building for, so sending SSE2 flags into an
arm64/neon build is no problem. So that part is easy enough to unify.
Then maybe we can get away with this? :
{{{
graphene_has_sse2=1
graphene_has_neon=1
...
}}}
I wonder what any software would use those pkgconfig items for anyway (if
they can even query them...)
--
Ticket URL: <https://trac.macports.org/ticket/66888>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list