-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|
||
def clean(self, **kwargs): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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... |
||
try: | ||
self.run_make("full_clean") | ||
except Exception: | ||
self.info("Cleaning failed, continuing anyway") | ||
|
||
def compile(self, **kwargs): | ||
try: | ||
self.run_make("all") | ||
# a full install includes documentation which drags in | ||
# lots of Latex dependencies, so just build the tools | ||
self.run_make("install-src") | ||
except Exception: | ||
self.info("Compilation failed. If it complains about missing packages try running:\n" | ||
"\tcabal install regex-compat syb old-time split\n" | ||
|
@@ -61,3 +70,6 @@ def compile(self, **kwargs): | |
self.info("Alternatively, try running:", | ||
self.source_dir / ".github/workflows/install_dependencies_ubuntu.sh") | ||
raise | ||
|
||
def install(self, **kwargs): | ||
pass # compile and install is a single target in toplevel GNUmakefile |
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: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 usegit 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?