Summary: | lang/ghc: ghc cannot be installed because ghc is not installed | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Bertram Scharpf <software> |
Component: | Individual Port(s) | Assignee: | freebsd-haskell (Nobody) <haskell> |
Status: | Closed FIXED | ||
Severity: | Affects Many People | CC: | arrowd |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(haskell) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Bertram Scharpf
2020-05-28 08:14:01 UTC
Please, show output of # make showconfig Aarrrgh! It says: ====> Bootsrap using installed ghc BOOT=on: Use installed GHC for bootstrapping In this case, the bug is that the option does not read "Use installed GHC _if_ _installed_." Or at least a message should be shown that the option was turned on. The build is currently running and I'm optimistic. Thanks so far. Well, I find it obvious that you can't install GHC while you are building it. Then, why does the port try to do that and afterwards wants to make me believe it was my mistake? The port tries to use installed GHC, just as option's description says. It fails, because you did not provide GHC. It doesn't say that it will try to obtain GHC for you in some magic way. > The port tries to use installed GHC, just as option's description says. It
> fails, because you did not provide GHC. It doesn't say that it will try to
> obtain GHC for you in some magic way.
The port detects that ghc is not installed. It would be no more than one line
of code to inform the user that this clashes with the option that was selected.
There is no need to obtain it in this situation.
I cannot remember all 2k options I selected in any port since I first installed
FreeBSD. We have machines to do the things that we're not capable of, and we
have machines to do the things that are obvious and that are repetitive.
This behaviour is definitely a bug.
Makes sense. Would following change be helpful? Index: lang/ghc/Makefile =================================================================== --- lang/ghc/Makefile (revision 536651) +++ lang/ghc/Makefile (working copy) @@ -254,6 +254,11 @@ .if empty(PORT_OPTIONS:MBOOT) cd ${BOOT_DIR} && ${CONFIGURE_ENV} ${CONFIGURE_CMD} --prefix=${BOOT_DIR} cd ${BOOT_DIR} && PACKAGES='' ${MAKE_CMD} install +.else +# otherwise, make sure we have "ghc" in PATH + if ! ${WHICH} -s ghc ; then \ + echo "No 'ghc' executable is found in your PATH! Turn off BOOT option." ; false ; \ + fi .endif # If DOCS are set, install HsColour in-place .if ${PORT_OPTIONS:MDOCS} Works fine. Thanks! A commit references this bug: Author: arrowd Date: Thu May 28 12:58:56 UTC 2020 New revision: 536766 URL: https://svnweb.freebsd.org/changeset/ports/536766 Log: lang/ghc: Print a error message if BOOT option is enabled, but the user has no "ghc" in PATH. PR: 246800 Submitted by: software@bertram-scharpf.de Changes: head/lang/ghc/Makefile Thanks for bringing this up. |