-
Notifications
You must be signed in to change notification settings - Fork 5
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 README.md for mac osx users #2
Conversation
I required `libxt` and `cairo` to be installed, as well as modifying `PATH`, `LDFLAGS`, `CPPFLAGS`, and `PKG_CONFIG_PATH` as all the dependencies installed by those requested. I used regex and some find and replace to generate the export statements from the brew install output, so these could be combined into single statements per environment variable: ``` export PATH="/usr/local/opt/expat/bin:$PATH" export LDFLAGS="-L/usr/local/opt/expat/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/expat/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export LDFLAGS="-L/usr/local/opt/expat/lib" export CPPFLAGS="-I/usr/local/opt/expat/include" export PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig" export C_INCLUDE_PATH="/opt/X11/include:${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export LDFLAGS="-L/usr/local/opt/libffi/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/libffi/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export PATH="/usr/local/opt/openssl@1.1/bin:$PATH" export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export PATH="/usr/local/opt/sqlite/bin:$PATH" export LDFLAGS="-L/usr/local/opt/sqlite/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/sqlite/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export PATH="/usr/local/opt/python@3.8/bin:$PATH" export PKG_CONFIG_PATH="/usr/local/opt/python@3.8/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export PATH="/usr/local/opt/icu4c/bin:$PATH" export PATH="/usr/local/opt/icu4c/sbin:$PATH" export LDFLAGS="-L/usr/local/opt/icu4c/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/icu4c/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export LDFLAGS="-L/usr/local/opt/libffi/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/libffi/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export PATH="/usr/local/opt/openssl@1.1/bin:$PATH" export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export PATH="/usr/local/opt/sqlite/bin:$PATH" export LDFLAGS="-L/usr/local/opt/sqlite/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/sqlite/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export PATH="/usr/local/opt/python@3.8/bin:$PATH" export PKG_CONFIG_PATH="/usr/local/opt/python@3.8/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" export PATH="/usr/local/opt/icu4c/bin:$PATH" export PATH="/usr/local/opt/icu4c/sbin:$PATH" export LDFLAGS="-L/usr/local/opt/icu4c/lib${LDFLAGS:+ }${LDFLAGS}" export CPPFLAGS="-I/usr/local/opt/icu4c/include${CPPFLAGS:+ }${CPPFLAGS}" export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" ```
Hey @SgtPooki, thanks for the Mac OS updates and also the long env setup reference. I'm thinking of a way to reference this content on the readme as well. As you already described very well here, I think that just to reference this pull request on the readme would be nice, what do you think? PS: I can do it myself, I just want to know if you agree this is a good option :) |
I just did, thank you! |
awesome :) Thanks |
Hi, configure: error: "liblzma library and headers are required" despite having xz installed (which has now replaced liblzma) |
@noahgaertner I am having the same issue, did you ever come across a solution? |
Nope, I ended up just installing it from brew directly @Nathaniel-Haines |
@noahgaertner fell upon a solution today! I think the problem was that the compiler could not locate lzma. After installing xz/lzma through:
the following worked for me:
|
@hyiltiz i imagine not. Especially not assuming homebrew is installed on every machine. CFLAGS can vary in location by system, and it’s pretty common for compiler flags to require consumer intervention and manual config, because the locations and flags can vary widely and need customization/overriding for various reasons Idk if there’s a good library out there for automatic CFLAG settings for users who are only using a tool and not developing it, but there might be. A switch on os/platform/arch with some sane defaults and guiding error messages could be a good middleground 🤷 |
There may be a confusion here; I am asking if we should also check for those paths before setting the variables CFLAGS etc., without assuming the existence of homebrew. I think one of the problems the build system could solve is to check for the existence of libraries etc. under various highly-likely paths in the system, and set appropriate defaults. The user could still override if they so wish by mechanisms such as manual configs or environment variables etc. |
I required
libxt
andcairo
to be installed, as well as modifyingPATH
,LDFLAGS
,CPPFLAGS
, andPKG_CONFIG_PATH
as all the dependencies installed by those requested. I used regex and some find and replace to generate the export statements from the brew install output, so these could be combined into single statements per environment variable: