Error building GHC: can't locate import `Package'

When building the current CVS HEAD with ghc-6.2.2 on Linux/x86, I get this error: [...] ==fptools== make boot - --no-print-directory -r; in /usr/local/src/ghc-current/ghc/utils/ghc-pkg -------------------------------------------------------------------- Creating Version.hs ... ghc-6.2.2 -M -optdep-f -optdep.depend -osuf o -optdep--exclude-module=Compat.RawSystem -optdep--exclude-module=Compat.Directory -optdep--exclude-module=Distribution.Compat.Error -optdep--exclude-module=Distribution.Compat.ReadP -optdep--exclude-module=Distribution.Extension -optdep--exclude-module=Distribution.InstalledPackageInfo -optdep--exclude-module=Distribution.License -optdep--exclude-module=Distribution.Package -optdep--exclude-module=Distribution.ParseUtils -optdep--exclude-module=Distribution.Setup -optdep--exclude-module=Distribution.Version -optdep--exclude-module=System.FilePath -H16m -O -optc-nopie -optc-fno-stack-protector-all -optc-fno-stack-protector -cpp -Wall -fno-warn-name-shadowing -fno-warn-unused-matches -i../../lib/compat Main.hs ParsePkgConfLite.hs Version.hs ParsePkgConfLite.hs: can't locate import `Package' It seems that ParsePkgConfLite.hs omits the "Distribution" part when importing Distribution.Package. Peter

Peter Simons wrote:
When building the current CVS HEAD with ghc-6.2.2 on Linux/x86, I get this error: [...] It seems that ParsePkgConfLite.hs omits the "Distribution" part when importing Distribution.Package.
Hmmm, there is no ParsePkgConfLite.hs in the HEAD anymore. Perhaps you have some old cruft lying around in your build directory? Cheers, S.

Sven Panne writes:
Hmmm, there is no ParsePkgConfLite.hs in the HEAD anymore. Perhaps you have some old cruft lying around in your build directory?
I deleted it and said "make" again, and now it seems to work (it's still building). Thank you. It might be good to remove the file in the "clean" or "distclean" targets, IMHO. I also noticed that ghc/utils/ghc-pkg/.cvsignore lists it as an ignorable file, which is why "cvs update" didn't show anything. Peter

Peter Simons wrote:
[...] It might be good to remove the file in the "clean" or "distclean" targets, IMHO. I also noticed that ghc/utils/ghc-pkg/.cvsignore lists it as an ignorable file, which is why "cvs update" didn't show anything.
Hmmm, removing countably infinite files which don't belong to the sources could take a little bit too long in general... :-) But I've removed the offending line from .cvsignore, so a "cvs up" should remove it when it is still there. Cheers, S.

I wrote:
I deleted it and said "make" again, and now it seems to work (it's still building).
As it turned out, the build does not succeed. It fails while
trying to build OpenAL:
| Sound/OpenAL/AL/BasicTypes.hs:63:15:
| Not in scope: type constructor or class `HTYPE_ALFLOAT'
|
| Sound/OpenAL/AL/BasicTypes.hs:66:16:
| Not in scope: type constructor or class `HTYPE_ALCLAMPF'
|
| Sound/OpenAL/AL/BasicTypes.hs:69:16:
| Not in scope: type constructor or class `HTYPE_ALDOUBLE'
|
| Sound/OpenAL/AL/BasicTypes.hs:72:16:
| Not in scope: type constructor or class `HTYPE_ALCLAMPD'
| <

In gmane.comp.lang.haskell.glasgow.user, you wrote:
It shouldn't even build OpenOL, however, because I ran ./configure with "--disable-openal".
I see the flag in "libraries/config.log", so it has been passed through alright. But ${SUBDIRS} contains the "OpenAL" directory nonetheless afterwards.
"" is neq to "no", so the Makefile tries to build it. Fix attached. Index: configure.ac =================================================================== RCS file: /home/cvs/root/fptools/libraries/OpenAL/configure.ac,v retrieving revision 1.8 diff -u -r1.8 configure.ac --- configure.ac 17 Dec 2004 00:09:08 -0000 1.8 +++ configure.ac 20 Dec 2004 16:42:20 -0000 @@ -10,10 +10,10 @@ # Shall we build this package at all? FP_ARG_OPENAL -if test x"$enable_openal" = xyes; then - # We set this to "yes" later when we have found OpenAL libs and headers. AL_BUILD_PACKAGE=no +if test x"$enable_openal" = xyes; then + AC_SUBST([AL_BUILD_PACKAGE]) # The following test for the OpenAL library is a bit of a hack, but gives nice -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME

In gmane.comp.lang.haskell.glasgow.user, you wrote:
Volker Stolz writes:
Fix attached.
Thank you! Is this patch gonna make it into CVS?
Done. Sven is probably on vacations. -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
participants (4)
-
Peter Simons
-
Sven Panne
-
Volker Stolz
-
Volker Stolz