Skip to content

Remove includes from .cabal-file - #582

Closed
sol wants to merge 2 commits into
haskell:masterfrom
sol:patch-1
Closed

Remove includes from .cabal-file#582
sol wants to merge 2 commits into
haskell:masterfrom
sol:patch-1

Conversation

@sol

@sol sol commented Jun 25, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Collaborator

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

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

@sol

sol commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

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

@sol

sol commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

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

sol commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

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

@kazu-yamamoto

Copy link
Copy Markdown
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!

@sol
sol deleted the patch-1 branch June 26, 2024 02:34
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