[GH-ISSUE #44] [GithubActions] add an aarch64-apple-darwin build to releases #12

Closed
opened 2026-05-05 22:03:21 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @gllmAR on GitHub (Dec 9, 2023).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/44

Running chmod +x on lan-mouse-mac binary results in an error due to missing libadwaita-1.0.dylib.

brew install libadwaita didn't resolve the issue.

error log

./lan-mouse-mac ; exit;
dyld[64640]: Library not loaded: /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib
  Referenced from: <36688367-70BB-368D-A4AE-2B6CCD7E5D4A> /Users/gllm/Downloads/lan-mouse-mac
  Reason: tried: '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache)
zsh: abort      /Users/gllm/Downloads/lan-mouse-mac

Temporary Solution

when I compiled the source code after installing libadwaita via brew, I was able to run the locally compiled binary successfully.

This leads me to believe that the issue might be specific to the pre-compiled binary.

Originally created by @gllmAR on GitHub (Dec 9, 2023). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/44 Running chmod +x on lan-mouse-mac binary results in an error due to missing libadwaita-1.0.dylib. `brew install libadwaita` didn't resolve the issue. error log ``` ./lan-mouse-mac ; exit; dyld[64640]: Library not loaded: /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib Referenced from: <36688367-70BB-368D-A4AE-2B6CCD7E5D4A> /Users/gllm/Downloads/lan-mouse-mac Reason: tried: '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache) zsh: abort /Users/gllm/Downloads/lan-mouse-mac ``` Temporary Solution when I compiled the source code after installing libadwaita via brew, I was able to run the locally compiled binary successfully. This leads me to believe that the issue might be specific to the pre-compiled binary.
gitea-mirror 2026-05-05 22:03:21 -06:00
Author
Owner

@feschber commented on GitHub (Dec 10, 2023):

Could you give me the output of

ls /usr/local/lib | grep libadwaita

?

And did you try executing the downloaded lan-mouse-mac after compiling from source?
For me the provided binary works but I can only test on bigsur amd64 at the moment after having compiled everything.

The dependencies I installed are

brew install gtk4
brew install libadwaita
<!-- gh-comment-id:1849049764 --> @feschber commented on GitHub (Dec 10, 2023): Could you give me the output of ```sh ls /usr/local/lib | grep libadwaita ``` ? And did you try executing the downloaded `lan-mouse-mac` _after_ compiling from source? For me the provided binary works but I can only test on bigsur amd64 at the moment after having compiled everything. The dependencies I installed are ```sh brew install gtk4 brew install libadwaita ```
Author
Owner

@gllmAR commented on GitHub (Dec 11, 2023):

the output of ls /usr/local/lib | grep libadwaita result nothing

output of ls /usr/local/lib show some lib but no libadwaita

libe131.1.dylib		libe131.la		libndi_licenses.txt
libe131.a		libndi.4.dylib
libe131.dylib		libndi.dylib

a system wide search with find / -name 'libadwaita*' 2>/dev/null result these finds ( I hidden some since there was a bunch of less meaningfull result)

/System/Volumes/Data/opt/homebrew/include/libadwaita-1
/System/Volumes/Data/opt/homebrew/var/homebrew/linked/libadwaita
/System/Volumes/Data/opt/homebrew/lib/pkgconfig/libadwaita-1.pc
/System/Volumes/Data/opt/homebrew/lib/libadwaita-1.dylib
/System/Volumes/Data/opt/homebrew/lib/libadwaita-1.0.dylib
/System/Volumes/Data/opt/homebrew/opt/libadwaita
/System/Volumes/Data/opt/homebrew/Cellar/libadwaita
/System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/.brew/libadwaita.rb
/System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/include/libadwaita-1
/System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/lib/pkgconfig/libadwaita-1.pc
/System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.dylib
/System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib
[...]
/opt/homebrew/include/libadwaita-1
/opt/homebrew/var/homebrew/linked/libadwaita
/opt/homebrew/lib/pkgconfig/libadwaita-1.pc
/opt/homebrew/lib/libadwaita-1.dylib
/opt/homebrew/lib/libadwaita-1.0.dylib
/opt/homebrew/opt/libadwaita
/opt/homebrew/Cellar/libadwaita
[...]

And did you try executing the downloaded lan-mouse-mac after compiling from source?

yes i did but it was still not working (same error message)

dyld[93302]: Library not loaded: /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib
  Referenced from: <36688367-70BB-368D-A4AE-2B6CCD7E5D4A> /Users/gllm/Downloads/lan-mouse-mac
  Reason: tried: '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache)
zsh: abort      /Users/gllm/Downloads/lan-mouse-mac

as a temporary workaround, I create a symbolic link from the libadwaita to it's expected place

mkdir -p /usr/local/opt/libadwaita/lib
ln -s /opt/homebrew/lib/libadwaita-1.0.dylib /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib

Running the release get me the following error message indicating that I try to run it on the wrong architecture (m1) which is progress but probably another issue.

dyld[95118]: Library not loaded: /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib
  Referenced from: <36688367-70BB-368D-A4AE-2B6CCD7E5D4A>  lan-mouse-mac
  Reason: tried: '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (no such file), '/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache)
zsh: abort    lan-mouse-mac
<!-- gh-comment-id:1850563613 --> @gllmAR commented on GitHub (Dec 11, 2023): the output of `ls /usr/local/lib | grep libadwaita` result nothing output of `ls /usr/local/lib` show some lib but no libadwaita ``` libe131.1.dylib libe131.la libndi_licenses.txt libe131.a libndi.4.dylib libe131.dylib libndi.dylib ``` a system wide search with `find / -name 'libadwaita*' 2>/dev/null` result these finds ( I hidden some since there was a bunch of less meaningfull result) ``` /System/Volumes/Data/opt/homebrew/include/libadwaita-1 /System/Volumes/Data/opt/homebrew/var/homebrew/linked/libadwaita /System/Volumes/Data/opt/homebrew/lib/pkgconfig/libadwaita-1.pc /System/Volumes/Data/opt/homebrew/lib/libadwaita-1.dylib /System/Volumes/Data/opt/homebrew/lib/libadwaita-1.0.dylib /System/Volumes/Data/opt/homebrew/opt/libadwaita /System/Volumes/Data/opt/homebrew/Cellar/libadwaita /System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/.brew/libadwaita.rb /System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/include/libadwaita-1 /System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/lib/pkgconfig/libadwaita-1.pc /System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.dylib /System/Volumes/Data/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib [...] /opt/homebrew/include/libadwaita-1 /opt/homebrew/var/homebrew/linked/libadwaita /opt/homebrew/lib/pkgconfig/libadwaita-1.pc /opt/homebrew/lib/libadwaita-1.dylib /opt/homebrew/lib/libadwaita-1.0.dylib /opt/homebrew/opt/libadwaita /opt/homebrew/Cellar/libadwaita [...] ``` >And did you try executing the downloaded lan-mouse-mac after compiling from source? yes i did but it was still not working (same error message) ``` dyld[93302]: Library not loaded: /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib Referenced from: <36688367-70BB-368D-A4AE-2B6CCD7E5D4A> /Users/gllm/Downloads/lan-mouse-mac Reason: tried: '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache) zsh: abort /Users/gllm/Downloads/lan-mouse-mac ``` as a temporary workaround, I create a symbolic link from the libadwaita to it's expected place ``` mkdir -p /usr/local/opt/libadwaita/lib ln -s /opt/homebrew/lib/libadwaita-1.0.dylib /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib ``` Running the release get me the following error message indicating that I try to run it on the wrong architecture (m1) which is progress but probably another issue. ``` dyld[95118]: Library not loaded: /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib Referenced from: <36688367-70BB-368D-A4AE-2B6CCD7E5D4A> lan-mouse-mac Reason: tried: '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (no such file), '/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache) zsh: abort lan-mouse-mac ```
Author
Owner

@feschber commented on GitHub (Dec 11, 2023):

It seems like on M1 / Apple Silicon the libraries are installed in /opt/homebrew/lib instead of /usr/local/lib (as is the case with intel macs).

The binary uploaded for the releases is compiled for Intel Macs so it would be expected that it does not work. You would need to run it via rosetta (2?) in this case.

I can not personally test this right now but from what I've read it would be something along the lines of

arch -x86_64 lan-mouse-mac

I only briefly got a chance to test on an actual M1 mac and had some rendering issues with libadwaita (only a black box was displayed instead of the actual window). For that reason I did not want to publish a binary for M1 Macs yet.

You mentioned that you got it to work when compiling from source: Did you run into the same issue or did the window get displayed correctly?

If it works on your end, I would update the GitHub-Actions runner to produce a lan-mouse-mac-arm64 for Apple Silicon.

<!-- gh-comment-id:1850655279 --> @feschber commented on GitHub (Dec 11, 2023): It seems like on M1 / Apple Silicon the libraries are installed in `/opt/homebrew/lib` instead of `/usr/local/lib` (as is the case with intel macs). The binary uploaded for the releases is compiled for Intel Macs so it would be expected that it does not work. You would need to run it via rosetta (2?) in this case. I can not personally test this right now but from what I've read it would be something along the lines of ```sh arch -x86_64 lan-mouse-mac ``` I only briefly got a chance to test on an actual M1 mac and had some rendering issues with libadwaita (only a black box was displayed instead of the actual window). For that reason I did not want to publish a binary for M1 Macs yet. You mentioned that you got it to work when compiling from source: Did you run into the same issue or did the window get displayed correctly? If it works on your end, I would update the GitHub-Actions runner to produce a `lan-mouse-mac-arm64` for Apple Silicon.
Author
Owner

@gllmAR commented on GitHub (Dec 11, 2023):

running arch -x86_64 lan-mouse-mac seem's to indicate that executable can't bind to arm64 libs installed with brew...

dyld[8526]: Library not loaded: /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib
  Referenced from: <36688367-70BB-368D-A4AE-2B6CCD7E5D4A> /Users/gllm/Downloads/lan-mouse-mac
  Reason: tried: '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (no such file), '/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache)
zsh: abort      arch -x86_64 ~/Downloads/lan-mouse-mac

running software from source result in proper display with no visible artifact on m1 hardware 👍

lan-mouse-m1mac

<!-- gh-comment-id:1850746971 --> @gllmAR commented on GitHub (Dec 11, 2023): running `arch -x86_64 lan-mouse-mac` seem's to indicate that executable can't bind to arm64 libs installed with brew... ``` dyld[8526]: Library not loaded: /usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib Referenced from: <36688367-70BB-368D-A4AE-2B6CCD7E5D4A> /Users/gllm/Downloads/lan-mouse-mac Reason: tried: '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (no such file), '/usr/local/opt/libadwaita/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (no such file), '/opt/homebrew/Cellar/libadwaita/1.4.2/lib/libadwaita-1.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libadwaita-1.0.dylib' (no such file), '/usr/lib/libadwaita-1.0.dylib' (no such file, not in dyld cache) zsh: abort arch -x86_64 ~/Downloads/lan-mouse-mac ``` running software from source result in proper display with no visible artifact on m1 hardware 👍 ![lan-mouse-m1mac](https://github.com/feschber/lan-mouse/assets/7544151/4b184e8c-1a7a-4e97-9105-c5441a134008)
Author
Owner

@feschber commented on GitHub (Dec 11, 2023):

Thats good news! I will update the release to include an Apple Silicon build then.
The issue above might be because of the symlink you created (it seems to be trying to load that library which will of course not work).

In order to install the correct x86_64 libraries you might need to install & run homebrew under rosetta as well.
But I guess there is no reason to do that if the native version works ;)

<!-- gh-comment-id:1850764478 --> @feschber commented on GitHub (Dec 11, 2023): Thats good news! I will update the release to include an Apple Silicon build then. The issue above might be because of the symlink you created (it seems to be trying to load that library which will of course not work). In order to install the correct x86_64 libraries you might need to install & run homebrew under rosetta as well. But I guess there is no reason to do that if the native version works ;)
Author
Owner

@feschber commented on GitHub (Dec 12, 2023):

Small update: The m1 hosted runners don't seem to be free of charge yet, so I need to setup a cross-compilation toolchain (still figuring out how to setup pkg-config for that).
Hopefully wont take too long :)

<!-- gh-comment-id:1851931687 --> @feschber commented on GitHub (Dec 12, 2023): Small update: The m1 hosted runners don't seem to be free of charge yet, so I need to setup a cross-compilation toolchain (still figuring out how to setup pkg-config for that). Hopefully wont take too long :)
Author
Owner
<!-- gh-comment-id:2012712909 --> @feschber commented on GitHub (Mar 21, 2024): Good news: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
Author
Owner

@feschber commented on GitHub (Mar 21, 2024):

closed in #45

<!-- gh-comment-id:2012841773 --> @feschber commented on GitHub (Mar 21, 2024): closed in #45
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#12
No description provided.