GHC fails to build on Solaris 11
Hello, GHC HEAD fails to build on Solaris 11, the compilation fails in libraries/haskeline with:
"inplace/bin/hsc2hs" '--cc=/usr/bin/gcc' '--ld=/usr/bin/gcc' --cross-safe -I/opt/gmp-5.1.3/include/ --cflag=-U__i686 --cflag=-fno-stack-protector --cflag=-Di386_HOST_ARCH=1 --cflag=-Dsolaris2_HOST_OS=1 --cflag=-D__GLASGOW_HASKELL__=707 '--cflag=-U__i686' '--cflag=-fno-stack-protector' '--cflag=-Ilibraries/haskeline/includes' '--cflag=-DUSE_GHC_ENCODINGS' '--cflag=-DTERMINFO' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/directory/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/unix/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/time/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/containers/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/bytestring/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/base/include' '--cflag=-I/opt/gmp-5.1.3/include/' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/rts/dist/build' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/includes' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-sol-test/includes/dist-derivedconstants/header' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/transformers/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/terminfo/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/directory/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/unix/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/time/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/old-locale/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/filepath/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/containers/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/bytestring/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/deepseq/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/array/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/base/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/integer-gmp/dist-install/build' '--lflag=-L/opt/gmp-5.1.3/lib/' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/ghc-prim/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-sol-test/rts/dist/build' '--lflag=-lcurses' '--lflag=-ldl' '--lflag=-lgmp' '--lflag=-lm' '--lflag=-lrt' '--lflag=-ldl' --cflag=-Ilibraries/haskeline/dist-install/build/autogen --cflag=-include --cflag=libraries/haskeline/dist-install/build/autogen/cabal_macros.h libraries/haskeline/./System/Console/Haskeline/Backend/Posix.hsc -o libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Posix.hs
Posix.hsc: In function ‘main’:
Posix.hsc:74:5: error: invalid application of ‘sizeof’ to incomplete type ‘struct winsize’
Posix.hsc:76:5: error: ‘TIOCGWINSZ’ undeclared (first use in this function)
Posix.hsc:76:5: note: each undeclared identifier is reported only once for each function it appears in
Posix.hsc:77:5: error: invalid use of undefined type ‘struct winsize’
Posix.hsc:78:5: error: invalid use of undefined type ‘struct winsize’
compiling libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Posix_hsc_make.c failed (exit code 1)
command was: /usr/bin/gcc -c libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Posix_hsc_make.c -o libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Posix_hsc_make.o -I/opt/gmp-5.1.3/include/ -U__i686 -fno-stack-protector -Di386_HOST_ARCH=1 -Dsolaris2_HOST_OS=1 -D__GLASGOW_HASKELL__=707 -U__i686 -fno-stack-protector -Ilibraries/haskeline/includes -DUSE_GHC_ENCODINGS -DTERMINFO -I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/directory/include -I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/unix/include -I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/time/include -I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/containers/include -I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/bytestring/include -I/export/home/karel/vcs/ghc-src/ghc-sol-test/libraries/base/include -I/opt/gmp-5.1.3/include/ -I/export/home/karel/vcs/ghc-src/ghc-sol-test/rts/dist/build -I/export/home/karel/vcs/ghc-src/ghc-sol-test/includes -I/export/home/karel/vcs/ghc-src/ghc-sol-test/includes/dist-derivedconstants/header -Ilibraries/haskeline/dist-install/build/autogen -include libraries/haskeline/dist-install/build/autogen/cabal_macros.h -I/export/home/karel/vcs/ghc-src/ghc-sol-test/inplace/lib/include/
gmake[1]: *** [libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Posix.hs] Error 1
The reason for this can be tracked to the haskeline.cabal file code:
if os(solaris) {
cpp-options: -DUSE_TERMIOS_H
}
the cpp-options are not modified on Solaris although they should. The reason for this is a bug in Cabal which does not recognize Solaris from its i386-pc-solaris2.11 triple. The bug is reported with suggested patch here: https://github.com/haskell/cabal/issues/1641 The a little extended patch is already in Cabal HEAD and it is promised to be merged into 1.18 branch by Mikhail Glushenkov here: http://www.haskell.org/pipermail/ghc-devs/2014-January/003819.html Now, the question is if it is possible to get the fix into GHC HEAD before 7.8 RC.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries (other) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |