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

Remove includes from .cabal-file #582

Closed
wants to merge 2 commits into from
Closed

Remove includes from .cabal-file #582

wants to merge 2 commits into from

Conversation

sol
Copy link
Member

@sol sol commented Jun 25, 2024

This is useless at best, and a common source of confusion.

haskell/cabal#10145
sol/hpack#355

This is useless at best, and a common source of confusion.

haskell/cabal#10145
sol/hpack#355
@kazu-yamamoto
Copy link
Collaborator

I need to understand why CI fails on Windows.

@kazu-yamamoto kazu-yamamoto self-requested a review June 26, 2024 00:28
@kazu-yamamoto
Copy link
Collaborator

@sol With this patch, the following error occurs on Windows:

Error: cabal.exe: Bad header file: afunix_compat.h

@sol
Copy link
Member Author

sol commented Jun 26, 2024

@kazu-yamamoto that's interesting, let me investigate.

@sol
Copy link
Member Author

sol commented Jun 26, 2024

The full message is:

Bad header file: afunix_compat.h
The header file contains a compile error. You can re-run configure with the
verbosity flag -v3 to see the error messages from the C compiler.

Which is generated here: https://github.com/haskell/cabal/blob/bf6f26dc2c02cce24b0d0f429b1b0fdabaa14028/Cabal/src/Distribution/Simple/Errors.hs#L656-L658

Which I think originates from here: https://github.com/haskell/cabal/blob/bf6f26dc2c02cce24b0d0f429b1b0fdabaa14028/Cabal/src/Distribution/Simple/Configure.hs#L2546-L2569

@mpilgrem so it seems that while includes is effectively ignored and never passed to ghc nor gcc, Cabal still tries to "validate" those headers in some way, likely for historic reasons (some of the code is really old).

@sol
Copy link
Member Author

sol commented Jun 26, 2024

@kazu-yamamoto 6e0c76a fixes the windows build, but I just noticed that you already discovered that yourself in #583.

@kazu-yamamoto
Copy link
Collaborator

@sol Sorry. I did not notice your latest messages.
I reached the same conclusion and merged #582.
Let's close this.
Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

2 participants