-
Notifications
You must be signed in to change notification settings - Fork 843
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
Can't pass extra cabal parameters for readline on Mac OS X #2237
Comments
Are these config options sufficient? http://docs.haskellstack.org/en/stable/yaml_configuration/#extra-include-dirsextra-lib-dirs |
No,they are not. They are meant to be used when compiling my own package not for being part of the cabal dependencies in build-depends. |
Some new hooks may need to be exposed in order for build dependencies to be customized. |
These options go in your stack build configuration. |
I have them in my stack build configuration. They are not enough. Also Even if I add them to the yaml file directly, I'm still missing a way to
|
Yeah, that's tracked by #1438 which I've bumped to P1 |
@edyu See this stackoverflow answer. Say your are on OSX
Now you know where the library got installed you can set some environmental variables that
|
@aymanosman that actually works! thank you. |
So I've put the following in my extra-include-dirs:
- /usr/local/opt/readline/include
extra-lib-dirs:
- /usr/local/opt/readline/lib Alas readline still won't build. Do I need to put the environment variables somewhere? If so, how do I scope that to the build of readline specifically without going via the command line? |
My project needs readline, so I added a line under build-depends. However, on Mac OS X, readline needs the Gnu c readline to be installed and if I use homebrew to install it, cabal install would need the following extra flags: --extra-include-dirs=/usr/local/opt/readline/include --extra-lib-dirs=/usr/local/opt/readline/lib readline --configure-option=--with-readline-includes=/usr/local/opt/readline/include --configure-option=--with-readline-libraries=/usr/local/opt/readline/lib
How do I pass to Stack those extra flags in order to build readline for my project?
I get the following error if I don't supply those flags:
Linking /private/var/folders/pf/fjqk_sm161dc2_hnvqr99q280000gn/T/stack95780/readline-1.0.3.0/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup ...
Warning: defaultUserHooks in Setup script is deprecated.
Configuring readline-1.0.3.0...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... yes
checking for readline in -lreadline... yes
checking for rl_readline_version... yes
checking for rl_begin_undo_group... no
configure: error: readline not found, so this package cannot be built
See `config.log' for more details.
The text was updated successfully, but these errors were encountered: