Re: [gtk-osx-users] Changing from modulesets-stable to modulesets and universal architecture questions
- From: Dominik Reichardt <dominik reichardt de>
- To: "gtk-osx-users-list gnome org" <gtk-osx-users-list gnome org>
- Subject: Re: [gtk-osx-users] Changing from modulesets-stable to modulesets and universal architecture questions
- Date: Mon, 04 Apr 2022 21:19:21 +0000
------- Original Message -------
On Monday, April 4th, 2022 at 12:01 AM, john <jralls ceridwen us> wrote:
If you manage to get the cross-compiling and lipo-ing to work I'd like to know about it, in particular any special settings or environment variables you needed to make.
With only painstaking manual work I was able to glue everything together and have a working universal gtk-osx.
But that consists of 104 lines like this:
lipo -create -arch x86_64 /opt/gtk3x86/lib/libatk-1.0.0.dylib -arch arm64 /opt/gtk3arm/lib/libatk-1.0.0.dylib -output /opt/gtk/lib/libatk-1.0.0.dylib
I'm pretty sure someone could make a script out of this to automate this, I'm not good at this :)
And I've had to build both arches in /opt/gtk3 and then rename the prefixes so I wouldn't have to use install_name_tool.
But it works and I have a working build of Exult Studio for both arches now.
Btw. any idea why using strip on our binary breaks everything?
When I run it after using strip I get a lot of
Gtk-WARNING **: 23:12:04.835: Could not find signal handler *some of our function*. Did you compile with -rdynamic?
I thought of a possible way to do universal builds on gtk-osx.
Problem: cross-compilation is a pain and I have no idea how meson/ninja handle this (I have only experience in autotools and some cmake). If the package runs a lot of scripts to figure out what the system provides it really is no fun to mess with it. And the gtk-osx packages fall into this category.
So my idea would only work on an M1 machine and only as long as Rosetta2 is available (so not really future proof) as I understood from the mailing list that you can build the x86_64 arch on an M1 device.
when both arches are defined
- compile and install the packages first for x86_64 and set the prefix to prefix_x86_64,
- then the same for arm64 and set the prefix to prefix_arm64.
- Then run install_name_tool on the binaries of both arches to set the id and the linked libraries to the path of prefix (I think the project dylibbundler has extensive scripts for that).
- And eventually have a script that lipo glues the binaries and places them in the prefix.
- copy the non binary stuff from either arch prefix into the main prefix.
Sounds like a lot of work that is reliant on too many scripts and likely to break. Probably too much work for too little gain, only working on M1 devices, and will stop working as soon as Apple gets rid of Rosetta2.
People are better off to just do a build for each arch, I guess.
Take care,
Dom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]