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

Homebrew Installation No Longer Working (Without Manually Linking) #22

Closed
retrobit opened this issue Sep 15, 2024 · 8 comments
Closed
Assignees

Comments

@retrobit
Copy link

Updated my packages via brew update && brew upgrade the other day and it broke igir installation. I believe it's probably related to this recent commit.

I tried uninstalling and re-installing and it still doesn't work before and after brew cleanup. Here is the output of brew doctor:

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  igir

Warning: Broken symlinks were found. Remove them with `brew cleanup`:
  /opt/homebrew/opt/igir

After calling brew link igir, it works, seemingly linking the keg to the symlink in /opt/homebrew/opt/igir, and brew doctor returns clean.

I'm running macOS Sonoma 14.6.1 (23G93)

@emmercm
Copy link
Owner

emmercm commented Sep 15, 2024

Yeah you're right, something is wrong. I was hoping #18 fixed it, but instead, I papered over some root issue with that HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1. I'm hoping whatever is wrong with the library linkage is also causing your issue.

I spent some more time on this and I couldn't figure it out, I opened up a request for help here: https://github.com/orgs/Homebrew/discussions/5605

@emmercm emmercm self-assigned this Sep 15, 2024
@retrobit
Copy link
Author

No problem, I'm here to help. Let me know if you need someone to test. I saw some of the changes may be related to Apple Silicon and I'm running an M2 Max.

At least it's working with manual linking.

I've wanted to dabble in Homebrew formulae and Ruby but I'm not very helpful in that regard right now.

Love your work.

@emmercm
Copy link
Owner

emmercm commented Sep 15, 2024

@retrobit thank you very much! To be honest I put this repo together while waiting on a delayed flight, I'm a beginner with taps/formulas as well. Any and all input is very appreciated.

I suspect I'm running into some undocumented behavior with Homebrew that may require changes to how chdman-js and maxcso-js distribute binaries.

@retrobit
Copy link
Author

retrobit commented Sep 16, 2024

I'm also unfamiliar with Node, but I did have a look at the thread going on over at the Homebrew repo.

If I understand correctly it seems npm install might download/install all prebuilt binaries of igir for multiple architectures and be trying to link only the relevant one and that might be confusing Homebrew?

In the Node package, if you could add a check for the current system and make that the only binary copied/installed, that might fix the issue (if it's not being done already).

Understanding and thinking more, I'm also wondering if all compiled dependencies (that are tightly-coupled and not done through Homebrew) must be/are expected to target /opt/homebrew/ as well and Homebrew checks for that. These would be the two packages you mentioned.

You can most likely add build targets to your build kit (make?). Using this you can build from source the dependency packages to target the /opt/homebrew/ directory if installed via Homebrew (or have pre-built Homebrew-friendly binaries as well). Not sure how to layer that in with npm, but there's probably options for npm install that allow different behavior/targets without creating a separate package altogether just for Homebrew support.

Finally, you might just make Homebrew formulae for your other dependent packages and then add them as Homebrew dependencies and that should work nicely.

Running on conjecture and limited understanding here, but hopefully the outside perspective helps 😄

@emmercm
Copy link
Owner

emmercm commented Sep 21, 2024

If I understand correctly it seems npm install might download/install all prebuilt binaries of igir for multiple architectures and be trying to link only the relevant one and that might be confusing Homebrew?

That's exactly right about chdman-js and maxcso-js, I didn't break those up into sub-packages, so every binary was being downloaded somewhat wastefully.

In the Node package, if you could add a check for the current system and make that the only binary copied/installed, that might fix the issue (if it's not being done already).

I effectively did this by using a combination of npm optionalDependencies and OS/CPU constraints. It took nearly the entire day today, but I think it's working (at least on my M2 Air)!

@retrobit can you give this a try?

brew upgrade igir

@retrobit
Copy link
Author

retrobit commented Sep 21, 2024

It works! Upgrading igir through brew as well as uninstalling and reinstalling both work without needing to manually link.

@emmercm
Copy link
Owner

emmercm commented Sep 21, 2024

This is great news! And now I know for future binaries I might add such as dolphin-tool 🙂.

@emmercm emmercm closed this as completed Sep 21, 2024
@retrobit
Copy link
Author

Awesome! I'm glad I could help, man 😝

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