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

Cabal file specifies incorrect build type #197

Closed
peti opened this issue Mar 27, 2015 · 4 comments
Closed

Cabal file specifies incorrect build type #197

peti opened this issue Mar 27, 2015 · 4 comments

Comments

@peti
Copy link

peti commented Mar 27, 2015

cryptol has a non-standard Setup.hs file. This means that the build-type must be set to custom rather than simple, otherwise Cabal cannot compile the package correctly:

$ runhaskell Setup.hs configure 
Warning: cryptol.cabal: Unknown fields: license-files (line 6)
Fields allowed in this section:
name, version, cabal-version, build-type, license, license-file,
copyright, maintainer, build-depends, stability, homepage,
package-url, bug-reports, synopsis, description, category, author,
tested-with, data-files, data-dir, extra-source-files,
extra-tmp-files, extra-doc-files
Configuring cryptol-2.2.1...
Setup.hs: configure script not found.

Also, note the warning about license-files, which is not a valid field. Furthermore, cabal-install warns:

$ cabal check
These warnings may cause trouble when distributing the package:
* 'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit
and not just imposing longer compile times on your users.

* 'ghc-prof-options: -auto-all' is fine during development, but not
recommended in a distributed package.
@peti
Copy link
Author

peti commented Mar 27, 2015

After further testing, it turns out that the problem is the Setup.hs file, really: the proper build type is "simple", but the package ships a non-trivial Setup.hs file!

@acfoltzer
Copy link
Contributor

Good catch, we used to have a Configure build type, but I forgot to go back to a simpler Setup.hs when we moved away from that. However, I have not run into an issue where it complained about a missing configure script. Is it possible you're on an older version of cabal-install? That would also explain the complaint about the license-files field which was added in 1.20. For reference, we build using 1.22.

@peti
Copy link
Author

peti commented Mar 27, 2015

Is it possible you're on an older version of cabal-install?

I don't use cabal-install at all. I build with GHC 7.8.4 and Setup.hs. Note the command line I pasted.

@acfoltzer
Copy link
Contributor

Sorry, I should have said "cabal-install and the Cabal library". I can run the same command line without problems using Cabal-1.22.0.0. However, this is not a way of building that we can officially support, due to the fact that (unless something has changed recently) it precludes the use of sandboxes.

acfoltzer pushed a commit that referenced this issue Apr 10, 2015
Remove the autoconf hooks from Setup.hs and bump cabal version
requirement so that `license-files` is supported
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