yousseb / meld

Meld for macOS
https://yousseb.github.io/meld/
GNU General Public License v2.0
2.29k stars 120 forks source link

M1 build fixes #148

Open matthiasdiener opened 11 months ago

matthiasdiener commented 11 months ago

With the changes in this PR, meld builds successfully on M1 for me!

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

DamianoP commented 11 months ago

With the changes in this PR, meld builds successfully on M1 for me!

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

this version always asks me for permission to access the files every time it compares a folder Generally, once permission is given, it should not be asked every time (over and over again)

Damecek commented 11 months ago

With the changes in this PR, meld builds successfully on M1 for me!

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

getting this on M2

See the py2app website for debugging launch issues

dusanscensny commented 11 months ago

With the changes in this PR, meld builds successfully on M1 for me!

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

Thanks for build @matthiasdiener. Build works nice also on Mac M2 . Thanks a lot. I would appreciate to get this official on Meld. I had just to uncheck "use system font settings" as text was not readable.

unilock commented 11 months ago

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

This build works great on my M2 machine! Just had to run xattr -rc /Applications/Meld.app to shut up Gatekeeper. ^u^

fadeopolis commented 10 months ago

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

The dmg seems to depend on some libraries from homebrew. It seems to die because it cannot find libpng on a machine without homebrew:

** (process:97829): WARNING **: 22:45:16.820: Failed to load shared library '@executable_path/../Frameworks/libpango-1.0.0.dylib' referenced by the typelib: dlopen(@executable_path/../Frameworks/libpango-1.0.0.dylib, 0x0009): Library not loaded: /opt/homebrew/opt/libpng/lib/libpng16.16.dylib
  Referenced from: <18E08805-971F-3010-A09C-B33FCA63EE36> .../Downloads/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
  Reason: tried: '/opt/homebrew/opt/libpng/lib/libpng16.16.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libpng/lib/libpng16.16.dylib' (no such file), '/opt/homebrew/opt/libpng/lib/libpng16.16.dylib' (no such file)
...
  File ".../Meld.app/Contents/Resources/lib/python3.11/gi/overrides/Pango.py", line 41, in <module>
    FontDescription = override(FontDescription)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../Meld.app/Contents/Resources/lib/python3.11/gi/overrides/__init__.py", line 195, in override
    assert g_type != TYPE_NONE
           ^^^^^^^^^^^^^^^^^^^
AssertionError
kf6kjg commented 10 months ago

Echoing what @fadeopolis posted, though in my case homebrew IS installed, but the paths are not standard on my system due to having an installation that I've just kept nursing since my user was on an x86_64 CPU...

$ ll /usr/local/opt/libpng*
lrwxr-xr-x  1 x  x  23 Nov 20 10:53 /usr/local/opt/libpng@ -> ../Cellar/libpng/1.6.40

$ ll /opt/homebrew/opt     
total 0
drwxrwxr-x   2 x  x    64 Jan  6  2022 ./
drwxr-xr-x  32 x  x  1024 Jan  6  2022 ../

Edit: Re-installing homebrew and then installing brew install pango brotli makes it work. Now I have the care and feeding of two homebrew installations: one arm64 brew and one x86_64, aliased as ibrew. Fun times :P

Alfystar commented 10 months ago

With the changes in this PR, meld builds successfully on M1 for me!

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

This solution work for me! And, for what I see, to a lot of other people, when do you integrate it on brew package manager? I love MELD! ❤️

jerryOnlyZRJ commented 10 months ago

It doesn't work on my M3 machine.I need to find an alternative solution.

rsireland commented 10 months ago

It does not work on my MacBookPro running Sonoma.

meld_crash.log

alvarogonzalez-packlink commented 9 months ago

Seems like there's a path problem while importing libraries. It looks for libpng16.16.dylib and libbrotlidec.1.dylib in the homebrew path, even when they're included in the package.

It looks for them in /opt/homebrew/opt/libpng/lib/libpng16.16.dylib and /opt/homebrew/opt/brotli/lib/libbrotlidec.1.dylib but they're located in ./Meld.app/Contents/Frameworks/.

So I did a couple of soft links and it started working:

sudo mkdir -p /opt/homebrew/opt/libpng/lib/
sudo ln -s /YOURPATH/Meld.app/Contents/Frameworks/libpng16.16.dylib /opt/homebrew/opt/libpng/lib/
sudo mkdir -p /opt/homebrew/opt/brotli/lib/
sudo ln -s /YOURPATH/Meld.app/Contents/Frameworks/libbrotlidec.1.dylib /opt/homebrew/opt/brotli/lib/

Substitute YOURPATH for the path to Meld location.

ramonotsu commented 9 months ago

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

Funciona en M1 con Sonoma 14.1.2 (23B92)

Muchas gracias.

ilyagr commented 9 months ago

Update: The best solution at the moment is described in a gist linked from https://github.com/yousseb/meld/issues/151#issuecomment-1849188969. It involves installing a prerelease (not the homebrew nor the Nix version) and running a couple of commands to patch it.

I wanted to share a couple of imperfect workarounds, adding on to the workaround in https://github.com/yousseb/meld/pull/148#issuecomment-1800158447 (that I haven't tried).

The Nix meld package does seem to run on Mac OS Sonoma on Apple Silicon. It does not run perfectly; there are some graphical glitches, but seems usable. I posted a few more instructions at https://gitlab.gnome.org/GNOME/meld/-/issues/804#note_1953154.

As another option, you can run XQuartz and lima, and install the Linux version of meld inside the VM (sudo apt install meld). Make sure to add the following to the lima YAML config file:

ssh:
  forwardX11: true

I think I got it to work, if a bit slowly. The QEMU emulation is better for graphical acceleration. I'm not sure whether there are additional necessary steps I forgot; I might update this post if I remember something.

RoganDawes commented 8 months ago

With the changes in this PR, meld builds successfully on M1 for me!

A built dmg can be found here: https://uofi.box.com/s/o2ci9nk9qit9jatv3pzjv3dybbp94dqr

This version works successfully for me on my M1 Mac. The version available from brew, as well as the most recent version available for download on this repo only showed the title bar for me.

ASCine commented 5 months ago

@matthiasdiener is your PR still running? I just downloaded the provided PR from your box, but I get a Launch Error ?

matthiasdiener commented 4 months ago

@matthiasdiener is your PR still running? I just downloaded the provided PR from your box, but I get a Launch Error ?

It runs fine for me, what is the error you get?

ASCine commented 4 months ago

It runs fine for me, what is the error you get?

Bildschirmfoto 2024-05-10 um 20 39 26

what do I have to do with this message?

ilyagr commented 4 months ago

I've seen similar-looking errors when I used the system-installed python on Mac OS instead of the homebrew python.

ASCine commented 4 months ago

I've seen similar-looking errors when I used the system-installed python on Mac OS instead of the homebrew python.

I run 3.12.3 from brew...

ASCine commented 4 months ago

@matthiasdiener

this is the terminal output: % /Applications/Meld.app/Contents/MacOS/Meld /Applications/Meld.app/Contents/Resources/boot.py:118: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

(process:11394): WARNING : 15:21:27.844: Failed to load shared library '@executable_path/../Frameworks/libpango-1.0.0.dylib' referenced by the typelib: dlopen(@executable_path/../Frameworks/libpango-1.0.0.dylib, 0x0009): Library not loaded: /opt/homebrew/opt/libpng/lib/libpng16.16.dylib Referenced from: <18E08805-971F-3010-A09C-B33FCA63EE36> /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib Reason: tried: '/opt/homebrew/opt/libpng/lib/libpng16.16.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libpng/lib/libpng16.16.dylib' (no such file), '/opt/homebrew/opt/libpng/lib/libpng16.16.dylib' (no such file) Traceback (most recent call last): File "/Applications/Meld.app/Contents/Resources/boot.py", line 163, in _run() File "/Applications/Meld.app/Contents/Resources/boot.py", line 86, in _run exec(compile(source, path, "exec"), globals(), globals()) File "/Applications/Meld.app/Contents/Resources/meld", line 517, in sys.exit(main()) ^^^^^^ File "/Applications/Meld.app/Contents/Resources/meld", line 508, in main check_requirements() File "/Applications/Meld.app/Contents/Resources/meld", line 276, in check_requirements r.check() File "/Applications/Meld.app/Contents/Resources/meld", line 243, in check mod = importlib.import_module(module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "importlib/init.pyc", line 126, in import_module File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 674, in _load_unlocked File "", line 634, in _load_backward_compatible File "/Applications/Meld.app/Contents/Resources/lib/python3.11/gi/importer.py", line 149, in load_module importlib.import_module('gi.repository.' + dep.split("-")[0]) File "importlib/init.pyc", line 126, in import_module File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 674, in _load_unlocked File "", line 634, in _load_backward_compatible File "/Applications/Meld.app/Contents/Resources/lib/python3.11/gi/importer.py", line 149, in load_module importlib.import_module('gi.repository.' + dep.split("-")[0]) File "importlib/init.pyc", line 126, in import_module File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 674, in _load_unlocked File "", line 634, in _load_backward_compatible File "/Applications/Meld.app/Contents/Resources/lib/python3.11/gi/importer.py", line 150, in load_module dynamic_module = load_overrides(introspection_module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Applications/Meld.app/Contents/Resources/lib/python3.11/gi/overrides/init.py", line 118, in load_overrides override_mod = importlib.import_module(override_package_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "importlib/init.pyc", line 126, in import_module File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/Applications/Meld.app/Contents/Resources/lib/python3.11/gi/overrides/Pango.py", line 41, in FontDescription = override(FontDescription) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Applications/Meld.app/Contents/Resources/lib/python3.11/gi/overrides/init.py", line 195, in override assert g_type != TYPE_NONE ^^^^^^^^^^^^^^^^^^^ AssertionError 2024-05-13 15:21:27.912 Meld[11394:212273] Launch error 2024-05-13 15:21:27.912 Meld[11394:212273] Launch error See the py2app website for debugging launch issues

alexreg commented 3 months ago

Any update on this? Would be super useful to have an M1 release! And also bring it into line with the upstream GNOME version.