-
Notifications
You must be signed in to change notification settings - Fork 90
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
Improve 'ghcup compile ghc' interface #846
Comments
Should probably also make hadrian default or detect whether a make build system exists. |
Is it possible to say "Use make for <9.6 and Hadrian for >= 9.6"? And fwiw I think 9.4 was the only series that officially supported both, although I also think Hadrian was pretty immature then. |
Currently, my idea is just to look for the hadrian files and if they're not there, assume make: The choice can be made explicit with |
I don't know that it's valuable to make it an option to users if 9.4 is the only version that officially supported both. <9.4, --hadrian might work but will be buggy (and the bugs will never get fixed); >=9.6, --make will fail. |
Yes, but GHC has made it extra hard to detect which version you're actually compiling: https://gitlab.haskell.org/ghc/ghc/-/issues/22322 The fix was backported, but I have no clear overview at the moment what versions work and which don't. As such I'm moving away from logic that depends on version numbers. If you try to compile 9.6.1 with make, that may fail. But maybe not, because you're using custom patched bindists, a different branch etc (remember you can already supply patches before the build... that's explicitly supported). Dynamic detection seems more flexible. What we probably want is a more descriptive error in case you try to build 9.6.1 with make: "The make build system has been removed since 9.6. You probably want to omit '--make'." |
And I'll probably support the |
What's missing now is the question on how to support additional arguments to If we compile, we have two configure phases:
It's not clear whether they support the exact same arguments. Or if you'd even want that. For |
EDIT: Sorry, i was running this with github actions and it seems github actions doesn't display a part of the logs. I'll look into it Hi, thanks again for so awesome tool, and your time. (i think my issues are related to this ticket) I'm trying to build a cross-compiler from host x86_64-macos to target aarch64-macos with I've tried multiple combinations of ghc target versions (8.10.7, 9.0.2, 9.2.8, 9.4.5, 9.6.2) (all with bootstrapping version 9.4.5), and additional flags (particularly --jobs), without any success. I am mostly asking if I should keep trying to build using ghcup or I just should try directly from ghc source. Here I leave some logs w/errors while trying to compile.
The error 00841 is:
(i didn't post examples with -j flag, but the error was something like "make no parse -j8". if its necessary ill look it up |
Regarding the hadrian flags, I figured out that the "binary-dist" target does work with the '--docs=none'. We already have a way to specify In addition the user might want to specify these
But it would be problematic if the user specifies these
Flags other than these are likely not relevant for compilation via ghcup. So perhaps it would be simpler if ghcup also supports All hadrian flags (from ghc 9.10.1)
|
For ghc-bignum, there is one flavour transformer |
The following flags are already handled by GHCup: Flags other than these may not be necessary to be specified by most of users. Note that for cross-compilation, most of the flags have to be specified at the build configure.
As I have mentioned above, and discussed here Ref: All bindist configure flags (from ghc 9.10.1)
|
And as the |
The main issues are:
Currently we support the first case via
--
longopts. But that can only cover one use case.This is particularly important for cross builds, which may need different than default settings.
@hsyl20
The text was updated successfully, but these errors were encountered: