Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions pycheribuild/projects/bluespec_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def check_system_dependencies(self):
self.check_required_system_tool("ghc", apt="ghc", homebrew="ghc")
self.check_required_system_tool("cabal", apt="cabal-install", homebrew="cabal-install")
self.check_required_system_tool("gperf", homebrew="gperf", apt="gperf")
self.check_required_pkg_config("tcl", apt="tcl", homebrew="tcl-tk")
self.check_required_pkg_config("tcl", apt="tcl-dev", homebrew="tcl-tk")
for i in ("autoconf", "bison", "flex"):
self.check_required_system_tool(i, homebrew=i)

Expand All @@ -64,8 +64,17 @@ def compile(self, **kwargs):

def install(self, **kwargs):
try:
self.run_cmd("cabal", "v1-update")
self.run_cmd("cabal", "v1-install", "regex-compat", "syb", "old-time", "split", cwd=self.source_dir)
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

self.run_cmd(
"cabal",
"v1-install",
"regex-compat",
"syb",
"old-time",
"split",
"strict-concurrency",
cwd=self.source_dir,
)
self.run_make("install-src", cwd=self.source_dir)
except Exception:
self.info(
Expand Down
Loading