#65710 closed defect (fixed)

graphene @1.10.8_0+universal: graphene-1.0.pc differs and cannot be merged

Reported by: thetrial (alabay) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: elcapitan legacy-os Cc: fhgwright (Fred Wright)
Port: graphene

Description

I have a strange error that seems to have do with architecture type.

:info:destroot fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: can't figure out the architecture type of: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-i386//opt/local/lib/pkgconfig/graphene-1.0.pc

Something does not fit:

:info:destroot error: /Library/Developer/CommandLineTools/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-i386//opt/local/lib/pkgconfig/graphene-1.0.pc is not an object file (not allowed in a library)
:info:destroot error: /Library/Developer/CommandLineTools/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-x86_64//opt/local/lib/pkgconfig/graphene-1.0.pc is not an object file (not allowed in a library)

and

:error:destroot Failed to destroot graphene: graphene-1.0.pc differs in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-i386//opt/local/lib/pkgconfig and /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-x86_64//opt/local/lib/pkgconfig and cannot be merged
:debug:destroot Error code: NONE

Logfile is attached.

Attachments (3)

main.log (194.7 KB) - added by thetrial (alabay) 21 months ago.
graphene-1.0.pc (431 bytes) - added by thetrial (alabay) 21 months ago.
Under destroot-i386
graphene-1.0.2.pc (457 bytes) - added by thetrial (alabay) 21 months ago.
Under destroot-x86_64

Download all attachments as: .zip

Change History (15)

Changed 21 months ago by thetrial (alabay)

Attachment: main.log added

comment:1 in reply to:  description Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to thetrial:

I have a strange error that seems to have do with architecture type.

:info:destroot fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: can't figure out the architecture type of: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-i386//opt/local/lib/pkgconfig/graphene-1.0.pc

Something does not fit:

:info:destroot error: /Library/Developer/CommandLineTools/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-i386//opt/local/lib/pkgconfig/graphene-1.0.pc is not an object file (not allowed in a library)
:info:destroot error: /Library/Developer/CommandLineTools/usr/bin/libtool: file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-x86_64//opt/local/lib/pkgconfig/graphene-1.0.pc is not an object file (not allowed in a library)

Ignore those.

and

:error:destroot Failed to destroot graphene: graphene-1.0.pc differs in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-i386//opt/local/lib/pkgconfig and /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/destroot-x86_64//opt/local/lib/pkgconfig and cannot be merged
:debug:destroot Error code: NONE

This is what's relevant. Please attach the two graphene-1.0.pc files so that we can see how they differ.

Changed 21 months ago by thetrial (alabay)

Attachment: graphene-1.0.pc added

Under destroot-i386

Changed 21 months ago by thetrial (alabay)

Attachment: graphene-1.0.2.pc added

Under destroot-x86_64

comment:2 Changed 21 months ago by thetrial (alabay)

Done. The names differ, but in real they are the same. And the diff is quite minimal … but interesting.

comment:3 Changed 20 months ago by fhgwright (Fred Wright)

Indeed this has the effect that graphene +universal can't be installed or upgraded. A second attempt without cleaning gets a different error, but still fails.

comment:4 Changed 20 months ago by fhgwright (Fred Wright)

Cc: fhgwright added

comment:5 Changed 20 months ago by WaywardHeart

Here's the relevant commit in the graphene repo. Apparently SSE2 in i386 graphene was causing issues with gtk in linux. It looks like this issue occurred before in #56737, where it was decided to force SSE2 on for all Intel archs, but if SSE2 being problematic in i386 isn't just a linux thing then I guess it should be forced off for universal builds.

comment:6 Changed 20 months ago by fhgwright (Fred Wright)

Does the SSE2 option affect the API in an incompatible way? I.e., would claiming SSE2 support without actually having it cause problems (other than lower-than-expected performance)? If not, then maybe it could build the X86_64 slice with SSE2 and the i386 slice without, while claiming SSE2 support in the .pc file.

comment:7 Changed 17 months ago by thetrial (alabay)

What happened to this? Any news or updates?

comment:8 Changed 16 months ago by thetrial (alabay)

Any idea, when graphene will be buildable again?! Abandoned?

comment:9 Changed 15 months ago by kencu (Ken)

SSE2 has been disabled for i386 builds for graphene by upstream, as mentioned above, apparently because on linux i386 there was not always 16 byte alignment for the variables, so there were segfaults.

Darwin/MacOS always guarantees at least 16byte alignment for malloc'd variables, so this cannot (should not) happen on Darwin.

For a number of years, since 2018, MacPorts built graphene with SSE2 support enabled in both the i386 and x86_64 builds. This happened because of the exact same issue with muniversal we are seeing in this ticket, and Marcus just disabled all the SSE2 special tests in graphene and let the compiler defines sort it out:

https://github.com/macports/macports-ports/commit/72c820b27ee817a55317ae20d8417a818a56af61

and this worked, it seemed, and everyone was happy.

(The test suite in graphene has never worked in MacPorts, so we could never prove it was OK, but nobody complained at least).

Recently Dave updated graphene and removed the disabler on this x86_64 test, so we are back at square one with the same exact problem building universal as before.

I would propose we again disable the x64_64 test in meson.build (10 seconds max, trivial to do, works to build universal) and let the __SSE2__ compiler define sort it out like it has all these past years for us.

That seems better to me that disabling the SIMD instruction set needlessly on these older CPUs that probably desperately need it, and we used the SIMD i386 instructions for years to support that idea.

Last edited 15 months ago by kencu (Ken) (previous) (diff)

comment:10 Changed 15 months ago by kencu (Ken)

here is one way to enable the tests in graphene to work:

 % git diff
diff --git a/graphics/graphene/Portfile b/graphics/graphene/Portfile
index c0b220c329b..7112e88c7f4 100644
--- a/graphics/graphene/Portfile
+++ b/graphics/graphene/Portfile
@@ -48,6 +48,16 @@ configure.args-append \
                     -Dtests=false \
                     -Dinstalled_tests=false
 
+test.run yes
+test.target test
+pre-configure {
+  system -W ${worksrcpath} "${prefix}/bin/meson subprojects update --reset"
+
+}
+configure.args-replace -Dtests=false -Dtests=true \
+                       -Dinstalled_tests=false -Dinstalled_tests=true
+
+
 # the original motivation for this somewhat unusual pattern of supported_archs being set
 # was here: https://github.com/macports/macports-ports/pull/2095#issuecomment-401559487
 

for a PR, that would have to wrapped up in the test variant block, of course. But with that, at least you can run the tests when building as i386...

comment:12 Changed 15 months ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 0c7e9fdbef9e3d0f4ce17c865cc785ad309025de/macports-ports (master):

graphene: allow SSE2 with i386 builds

SSE2 is disabled on i386 linux due to segfaults from memory
alignment issues, but these are not seen on MacOS.

allowing SSE2 on i386 fixes the universal i386/x86_64 build as then
the two build trees match

closes: #65710

Note: See TracTickets for help on using tickets.