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

Error building bundled fltkhs in custom Setup.hs #164

Open
ch1bo opened this issue Jun 18, 2020 · 1 comment
Open

Error building bundled fltkhs in custom Setup.hs #164

ch1bo opened this issue Jun 18, 2020 · 1 comment

Comments

@ch1bo
Copy link

ch1bo commented Jun 18, 2020

I have an issue with the custom Setup.hs when building:

Building bundled FLTK
Setup.hs:209:7-88: Non-exhaustive patterns in Flag prefixTemplate

Ran into this while building fltkhs using nix, but the essential problem is that the custom Setup.hs does depend on the fact that there a --libdir is passed to Cabal's configure. For example:

$ nix-shell -p ghc --run "runhaskell Setup.hs configure -fbundled"
Building bundled FLTK
Setup.hs:209:7-88: Non-exhaustive patterns in Flag prefixTemplate

while configuring like this works:

$ nix-shell -p ghc --run "runhaskell Setup.hs configure -fbundled --libdir /tmp/fltkhs/lib"
Building bundled FLTK
Archive:  fltk-master.zip
ee9ada967806dae72aa1b9ddad7b95b94f4dd2a3
   creating: fltk-master/
...

What's the rationale about a custom Setup.hs here?? AFAIK there are other packages which do have "in-tree" upstream c libraries which do use autoconf and a far simpler Setup.hs. One example would be integer-gmp in ghc itself.

@ch1bo
Copy link
Author

ch1bo commented Jun 18, 2020

With a case for both data constructors of Flag (https://hackage.haskell.org/package/Cabal-3.0.0.0/docs/Distribution-Simple-Setup.html#t:Flag), this could be caught and fixed.. but I have no idea what path to pick in the case none is given on configure. The current working directory?

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

1 participant