-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix build for bluespec-compiler #293
Conversation
Upstream bsc have a new GNUmakefile which is substantially different from the kind that cheribuild expects. Adjust our build rules to suit. Currently we don't build the documentation since that implies lots of Latex dependencies, that aren't strictly necessary to use the bsc compiler
self.make_args.set(PREFIX=self.install_dir) | ||
|
||
def clean(self, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like latest version support out-of-source builds, if we can use that instead we can avoid changing clean()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no 'make clean' target in the upstream source - can we make sure that an out-of-source build won't try to call it?
Edit: correction, there is. Let me see why that wasn't working...
@@ -45,11 +45,20 @@ def __init__(self, config: CheriConfig): | |||
self.add_required_system_tool("cabal", apt="cabal-install", homebrew="cabal-install") | |||
for i in ("autoconf", "gperf", "bison", "flex"): | |||
self.add_required_system_tool(i, homebrew=i) | |||
self.add_required_system_header("tcl/tcl.h", apt="tcl-dev") | |||
self.make_args.set(PREFIX=self.install_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove build_in_source_dir = True
, the following might be sufficient:
self.make_args.set(PREFIX=self.install_dir) | |
self.make_args.set(PREFIX=self.install_dir, BUILDDIR=self.build_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out their out-of-tree build is broken. bsc/src/Libraries sets its own BUILDDIR, to be [sourcetree]/build/bsvlib, which is overriden by ours, and then Libraries' wildcarded calls to the 'install' command fail because they're trying to install directories (from the wrong place). I think that's fixable upstream but somewhat messy, so perhaps in-tree is good enough for now? In which case we need to prevent cheribuild calling 'make distclean'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should just remove the distclean
workaround and always use git clean
for in-source clean. For now using this seems fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it works if you set BUILDIR in the environment instead of on the make command line?
Is this still needed? |
The current version with recent changes is working for me, so closing this PR. |
Upstream bsc have a new GNUmakefile which is substantially different from
the kind that cheribuild expects. Adjust our build rules to suit.
Currently we don't build the documentation since that implies lots of Latex
dependencies, that aren't strictly necessary to use the bsc compiler
Fixes #291