Ticket #24 (new defect)

Opened 3 years ago

Last modified 4 months ago

Cabal shouldn't try to build GHCI libs on platforms without GHCI

Reported by: jgoerzen@complete.org Assigned to:
Priority: normal Milestone: Cabal-1.8
Component: Cabal library Version:
Severity: normal Keywords:
Cc: Difficulty: easy (<4 hours)
GHC Version: 6.2.1 Platform: Linux

Description

Cabal should not attempt to do anything relating to GHCI on archs that don't support it. It shouldn't try to build ghci libs, and it shouldn't pass --auto-ghci-libs to ghc-pkg.

More information here:

https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1364839&group_id=8032

Change History

11/28/05 11:57:50 changed by ijones

  • summary changed from Cabal installation failure on machines without GHCI to Cabal shouldn't try to build GHCI libs on platforms without GHCI.

clarification: newer cabal versions don't use --auto-ghci-libs and only try to build these libs during build time, not during compile time.

11/29/05 14:39:02 changed by anonymous

  • milestone set to Cabal-1.2.

12/10/05 13:14:39 changed by ijones

Here's what simon says about discovering whether we are on a platform with ghci:

  • copy the info from mk/config.mk.in in a GHC source tree. Problem: you need to keep it up to date.
  • try running ghci and see if it works.
  • try running 'ghc -e "return ()"' and see if it works (easier than previous).
  • look for presence of HSbase.o, by asking ghc-pkg where it should be

The 'ghc -e' method is the easiest, though it'll add a delay to the configure step (probably takes longer itself than a complete configure taskes right now).

12/11/05 12:13:14 changed by ijones

  • difficulty set to hard.

09/12/07 08:43:34 changed by duncan

  • platform set to Linux.
  • ghcversion set to 6.2.1.
  • milestone changed from Cabal-1.2 to Cabal-1.4.

ghc-6.8 has a flag that tells us various features about the ghc installation. I think that the ghci support is one of these things. So we could support this feature in ghc-6.8 and later.

If we do this, should we drop the existing --disable-library-for-ghci flag? We could keep it if we tried the ghc -e "return ()" suggestion.

12/30/07 03:37:40 changed by duncan

  • difficulty changed from hard to easy (<4 hours).

Implementing this just for ghc 6.8 and later should be easy since we can parse the output of ghc --info to find the:

 ,("Have interpreter","YES")

read the output of ghc --info at type :: [(String, String)] and lookup the key "Have interpreter" and check the corresponding value against "YES" / "NO".

That should be used to set the default of whether ghci libs are built or not. Perhaps if the user explicitly asks for them and they cannot be supported there should be a warning.

03/12/08 06:24:02 changed by duncan

  • milestone changed from Cabal-1.4 to Cabal-1.6.

This is pretty easy bug but it does not seem to bother anybody enough to fix it or even comment on it. Punting.

08/15/08 07:11:24 changed by duncan

  • milestone changed from Cabal-1.6 to Cabal-1.8.