build issue: * Missing header file: HsBase.h

Hello, I'm trying to recover my opensolaris builder machine after disk crash, but after reinstall I'm not able to build any GHC there. I'm trying head and now also 6.12.3 as a reference (as I'm able to build it on my workstation with the same OS). The problem I see here is when I invoke `gmake' then the process continues up to configuration of base library which fails with: checking value of ETIMEDOUT... 145 checking value of ETOOMANYREFS... 144 checking value of ETXTBSY... 26 checking value of EUSERS... 94 checking value of EWOULDBLOCK... 11 checking value of EXDEV... 18 checking value of ENOCIGAR... -1 checking value of SIGINT... 2 checking value of O_BINARY... 0 checking for library containing iconv... none required configure: creating ./config.status config.status: creating base.buildinfo config.status: creating include/HsBaseConfig.h configure: WARNING: unrecognized options: --with-compiler ghc-cabal: Missing dependency on a foreign library: * Missing header file: HsBase.h This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. gmake[1]: *** [libraries/base/dist-install/package-data.mk] Error 1 gmake: *** [all] Error 2 The problem is HsBase.h is where it is on my reference build tree on workstation: -bash-4.0$ find . -name 'HsBase.h' ./libraries/base/include/HsBase.h -bash-4.0$ I suppose some external library might be missing, but here the error is quite misleading and I cannot find which one might be the culprit of this error. Do you have any idea what to install in order to proceed? Thanks! Karel

On 10/12/2010 16:49, Karel Gardas wrote:
Hello,
I'm trying to recover my opensolaris builder machine after disk crash, but after reinstall I'm not able to build any GHC there. I'm trying head and now also 6.12.3 as a reference (as I'm able to build it on my workstation with the same OS). The problem I see here is when I invoke `gmake' then the process continues up to configuration of base library which fails with:
checking value of ETIMEDOUT... 145 checking value of ETOOMANYREFS... 144 checking value of ETXTBSY... 26 checking value of EUSERS... 94 checking value of EWOULDBLOCK... 11 checking value of EXDEV... 18 checking value of ENOCIGAR... -1 checking value of SIGINT... 2 checking value of O_BINARY... 0 checking for library containing iconv... none required configure: creating ./config.status config.status: creating base.buildinfo config.status: creating include/HsBaseConfig.h configure: WARNING: unrecognized options: --with-compiler ghc-cabal: Missing dependency on a foreign library: * Missing header file: HsBase.h This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. gmake[1]: *** [libraries/base/dist-install/package-data.mk] Error 1 gmake: *** [all] Error 2
The problem is HsBase.h is where it is on my reference build tree on workstation:
-bash-4.0$ find . -name 'HsBase.h' ./libraries/base/include/HsBase.h -bash-4.0$
I suppose some external library might be missing, but here the error is quite misleading and I cannot find which one might be the culprit of this error.
Do you have any idea what to install in order to proceed?
I don't know what's going on here, I'm afraid. Looks like Cabal tried to find HsBase.h and couldn't find it - so either it wasn't there (but you say it was), or Cabal was looking in the wrong place. Maybe follow up the latter hypothesis? Cheers, Simon

On 16 December 2010 10:02, Simon Marlow
ghc-cabal: Missing dependency on a foreign library: * Missing header file: HsBase.h This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is.
The problem is HsBase.h is where it is on my reference build tree on workstation:
-bash-4.0$ find . -name 'HsBase.h' ./libraries/base/include/HsBase.h
I suppose some external library might be missing, but here the error is quite misleading and I cannot find which one might be the culprit of this error.
Do you have any idea what to install in order to proceed?
I don't know what's going on here, I'm afraid. Looks like Cabal tried to find HsBase.h and couldn't find it - so either it wasn't there (but you say it was), or Cabal was looking in the wrong place. Maybe follow up the latter hypothesis?
Cabal will report this error when it cannot compile HsBase.h, that usually means it is missing, but it's also possible that something just does not compile. This is like the check that ./configure scripts do. It's rather hard from the exit code of gcc to work out if it's genuinely missing, or fails to compile (though we could try doing cpp and cc phases separately). One can run with -v3 to see the error that gcc reports. Duncan

Duncan and Simon, thank you very much for dealing with this. After adding -v3 to the ghc-cabal invocation it reported gcc error on HsBase.h due to missing math.h file, i.e. system/library/math/header-math package was not installed yet. Thanks! Karel On 12/16/10 11:16 AM, Duncan Coutts wrote:
Do you have any idea what to install in order to proceed?
I don't know what's going on here, I'm afraid. Looks like Cabal tried to find HsBase.h and couldn't find it - so either it wasn't there (but you say it was), or Cabal was looking in the wrong place. Maybe follow up the latter hypothesis?
Cabal will report this error when it cannot compile HsBase.h, that usually means it is missing, but it's also possible that something just does not compile. This is like the check that ./configure scripts do. It's rather hard from the exit code of gcc to work out if it's genuinely missing, or fails to compile (though we could try doing cpp and cc phases separately).
One can run with -v3 to see the error that gcc reports.
Duncan
participants (3)
-
Duncan Coutts
-
Karel Gardas
-
Simon Marlow