Opened 22 months ago
Last modified 22 months ago
#66888 assigned defect
graphene @1.10.8_0+universal: arm64/x86_64 fails due to conflicting pkgconfig files
Reported by: | kencu (Ken) | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | graphene |
Description
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...)
Change History (2)
comment:1 Changed 22 months ago by kencu (Ken)
comment:2 Changed 22 months ago by kencu (Ken)
I stripped out all the SSE and NEON stuff from the pkgconfig files, and that gets past those errors of course. So disabling all the SIMD optimizations is one way to unify the pkgconfig files.. not a very ideal way, but one way.
The universal build of gtk4 then fails for other, unrelated reasons.
well, unfortunately not going to be so simple.
I built graphene +universal without trouble by telling muniversal to not diff the pkgconfig files:
and then replaced them with these:
but during the build of the arm64 slice, the compiler errors out on one of the sse flags after all:
so that approach is not going to work, like that at least...