Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gi-glib-2.0.26] Cannot find GI repositories on Apple Silicon Mac brew #390

Open
yobson opened this issue Oct 15, 2022 · 1 comment
Open

Comments

@yobson
Copy link

yobson commented Oct 15, 2022

Hello!

The Problem

When building an empty project with gi-gtk and haskell-gi-base, on an apple silicon Mac, you will run into the following issue:

Linking /Users/jameshobson/Documents/Haskell/gtk4-elm/dist-newstyle/tmp/src-77102/gi-glib-2.0.26/dist/setup/setup ...
Did not find a GI repository for GLib-2.0 in ["/usr/local/share/gir-1.0","/usr/share/gir-1.0"].
CallStack (from HasCallStack):
  error, called at lib/Data/GI/GIR/Repository.hs:89:20 in hskll-g-0.26.1-bd0bfefb:Data.GI.GIR.Repository

This is because brew installs into /opt/homebrew on the apple silicon platforms. It used to install into /usr/local

Temporary Workaround

I have made a simple symlink with sudo ln -s /opt/homebrew/share/gir-1.0 /usr/local/share/. and it appears to be building fine. I'm sure there was a less hacky fix I could have done with an environment variable, but I didn't investigate into much!

garetxe pushed a commit that referenced this issue Oct 15, 2022
See #390 for the
justification.
@garetxe
Copy link
Collaborator

garetxe commented Oct 15, 2022

Thanks for the report!

I have added a workaround in e095096 for this. Do you think you could test that version (removing the symlinks you added) and see if that works for you? If so I'll upload a new version to hackage with the fix.

Many thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants