-
Notifications
You must be signed in to change notification settings - Fork 180
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
Update developer_setup.md #501
Conversation
iv1111
commented
Jul 29, 2022
- note about MacOS on silicon chip and Homebrew
- see Homebrew/brew#13481
@@ -41,6 +41,10 @@ | |||
| apt | `sudo apt -y install build-essential libffi-dev libpq-dev libxml2-dev libcurl4-openssl-dev cmake python libssh2-1-dev` | | |||
| brew | `brew install cmake libssh2` | | |||
|
|||
**Note**: Users with MacOS running on Apple M1 CPU might need to specify location of the `Homebrew` libraries explicitly. | |||
If build steps below fail for you then run `export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"`and retry the failing build step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and retry the failing build step.
Wonder if we should move this up before the brew install
steps so that people can avoid "try it, if it fails do this, then try it again"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
If this is similar to linux then this is only a temporary solution, would users also have to add this to a mac equivalent of a .bashrc file? Otherwise would this just be lost when the close the terminal/logout/reboot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if we should move this up before the
brew install
steps so that people can avoid "try it, if it fails do this, then try it again"
I'm fine with having this as a note afterwards as it is an exceptional case for now. Maybe including the "ld: library not found" error message would better" would help direct people to only apply this change if you're having such a problem. Additionally, exact error messages are what people search for so we want them to find this.
If apple CPUs become the most common mac platform for us and this is still not resolved by homebrew by then, then we can proactively make it a step to follow by default on macs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could check for this in bin/install ? If the platform is Darwin check if brew is in the library path.
I imagine M1 CPUs will become the predominant Mac architecture in a few years
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: installing the pg gem didnt work without including this export PATH=$PATH:/opt/homebrew/Cellar/postgresql@11/11.16/bin
in zsh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iv1111 did you have to update your PATH
as well to install the pg
gem or did you not get that far?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more succinct version of that would be export PATH=$PATH:$(brew --prefix postgresql@11)/bin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iv1111 did you have to update your
PATH
as well to install thepg
gem or did you not get that far?
I didn't have that problem (I didn't install it manually though. Just ran bin/update).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, can you run which pg_config
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agrare The result is: /opt/homebrew/opt/postgresql@11/bin/pg_config
Checked commits https://github.com/iv1111/guides/compare/c20dbefc8de37527d8b1b5289fe34bd90df84536~...455e1a6d5c4a90e2a5566ea6eb7e699ea3506fbf with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint |
Merging since it covers the issue at hand - we can cleanup or add more details in follow up PRs |