Skip to content

c-sources cannot have cmm files #495

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

Closed
Kleidukos opened this issue Nov 21, 2023 · 7 comments
Closed

c-sources cannot have cmm files #495

Kleidukos opened this issue Nov 21, 2023 · 7 comments

Comments

@Kleidukos
Copy link

'sup, cabal team here.

You have a problem when you generate cabal files:

        [ "      c-sources:" ] ++
        indent3 [ "libraries/ghc-heap/cbits/HeapPrim.cmm" ] ++

This cannot possibly work, was giving the appearance of normality, but ultimately this is the wrong stanza. cmm-sources must be used.

Cheers

@vaibhavsagar
Copy link

When I patched this in my own project, I also had to change the cabal-version (and also the license field) to one that supported this stanza.

@shayne-fletcher
Copy link
Contributor

this was in fact updated last month (#492) to read

        [ "    if impl(ghc >= 9.2.2) "] ++ -- cabal >= 3.6.0
        [ "      cmm-sources:" ] ++
        indent3 [ "libraries/ghc-heap/cbits/HeapPrim.cmm" ] ++
        [ "    else" ] ++
        [ "      c-sources:" ] ++
        indent3 [ "libraries/ghc-heap/cbits/HeapPrim.cmm" ] ++

@Kleidukos does that look ok?

@Kleidukos
Copy link
Author

@cho-m Which compiler did you use with ghc-lib-parser-9.8.1.20231009/ghc-lib-parser-9.6.2.20230523 ?

@shayne-fletcher
Copy link
Contributor

shayne-fletcher commented Nov 21, 2023

i see that ghc-lib-parser-9.8.1-9.8.1.20231009 on hackage is still using cabal-version 2.0 and doesn't have that switching logic so that .cmm files are listed in c-sources. i assume this is causing issues - i'll put a new version up!

@cho-m
Copy link

cho-m commented Nov 21, 2023

Confirmed locally that new ghc-lib-parser-9.8.1.20231121 works with cabal-install == 3.10.2.1.

@shayne-fletcher
Copy link
Contributor

have pushed ghc-lib-9.8.1.20231121, ghc-lib-9.6.3.20231121 and ghc-lib-9.6.2.20231121 to hackage.

@shayne-fletcher
Copy link
Contributor

@garyverhaegen-da i think this issue is good to close now

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

5 participants