[GHC] #8670: GHC fails to build on Solaris 11

GHC ghc-devs at haskell.org
Tue Jan 14 20:15:53 UTC 2014


#8670: GHC fails to build on Solaris 11
-------------------------------------+-------------------------------------
       Reporter:  kgardas            |             Owner:
           Type:  bug                |            Status:  new
       Priority:  normal             |         Milestone:
      Component:  libraries (other)  |           Version:  7.7
       Keywords:  Cabal              |  Operating System:  Solaris
   Architecture:  x86                |   Type of failure:  Building GHC
     Difficulty:  Easy (less than 1  |  failed
  hour)                              |         Test Case:
     Blocked By:                     |          Blocking:
Related Tickets:                     |
-------------------------------------+-------------------------------------
 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.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8670>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list