Skip to content

Fix bluespec-compiler for Ubuntu 24.04 to 26.04#497

Open
tmarkettos wants to merge 2 commits into
mainfrom
atm26-bluespec-fix
Open

Fix bluespec-compiler for Ubuntu 24.04 to 26.04#497
tmarkettos wants to merge 2 commits into
mainfrom
atm26-bluespec-fix

Conversation

@tmarkettos
Copy link
Copy Markdown
Contributor

This PR fixes the Haskell setup for building bluespec-compiler. It also corrects a dependency apt package name.

Tested on Ubuntu 24.04, 25.10 and 26.04.

def install(self, **kwargs):
try:
self.run_cmd("cabal", "v1-update")
self.run_cmd("cabal", "update")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, so v1-update has been removed but v1-install remains? I'd naively assume they'd go together

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that way - 'update; v1-install' is what the upstream Bluespec repo recommends.

I tried v2-install but ran into problems as it needs to do make GHC="ghc -package-env default" and I couldn't get that to work (I don't know if cheribuild was failing to escape that correctly, but even when I did it by hand it didn't work).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I assume this is also fine on 22.04, but could you please check that, given it's still supported and we have a bunch of machines (e.g. technos) on it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the cabal install worked on 22.04, but it won't build with the supplied ghc-8.8.4:

[165 of 227] Compiling RSchedule        ( RSchedule.hs, /home/atm26/cheri/bsc/src/comp/../../build/comp/RSchedule.o )

RSchedule.hs:51:10: error:
    • Illegal instance declaration for ‘PPrint RAT’
        (All instance types must be of the form (T t1 ... tn)
         where T is not a synonym.
         Use TypeSynonymInstances if you want to disable this.)
    • In the instance declaration for ‘PPrint RAT’
   |
51 | instance PPrint RAT where
   |          ^^^^^^^^^^

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now reported as B-Lang-org/bsc#963

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks; given it got that far the cabal side of things here is probably fine. Can you please squash the formatting commits into the second one, then we can merge this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread pycheribuild/projects/bluespec_compiler.py Outdated
@tmarkettos tmarkettos force-pushed the atm26-bluespec-fix branch from 35dba8d to 669bbb5 Compare June 2, 2026 14:45
Copy link
Copy Markdown
Member

@arichardson arichardson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if it works for you

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.

3 participants