Opened 6 years ago

Closed 5 years ago

#8829 closed bug (wontfix)

GHC HEAD/7.8 fails to build on Solaris 10

Reported by: kgardas Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.8.1-rc2
Keywords: Cc:
Operating System: Solaris Architecture: sparc
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Just to record this issue for further reference. Solaris 10 provides GCC 3.4.3 as a free compiler. Unfortunately compilation of GHC with this compiler fails with:

gmake -r --no-print-directory -f ghc.mk phase=final all
"inplace/bin/ghc-stage1" -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-DNOSMP -optc-DUSE_LIBFFI_FOR_ADJUSTORS -optc-fno-strict-aliasing -optc-fno-common -optc-O2 -optc-fomit-frame-pointer -optc-fno-omit-frame-pointer -optc-g -optc-O0 -optc-DRtsWay=\"rts_thr_debug\" -static -optc-DTHREADED_RTS -optc-DDEBUG  -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -optc-DNOSMP -dcmm-lint      -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen           -O2 -O0    -c rts/sm/GC.c -o rts/dist/build/sm/GC.thr_debug_o
/usr/ccs/bin/as: "/var/tmp//cclWYYHx.s", line 17827: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//cclWYYHx.s", line 17827: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//cclWYYHx.s", line 17827: error: statement syntax
gmake[1]: *** [rts/dist/build/sm/GC.thr_debug_o] Error 1
gmake: *** [all] Error 2

the problem analysis so far reveals that the problematic assembler code looks:

  17826  .byte 0x3
  17827  .word %r_tls_dtpoff32(gct)
  17828  .byte 0xe0

which seems to be kind of wrong. When I tested this with Solaris 11.1 GCC 4.5.2 I've not able to reproduce this error so I guess this is kind of miscompilation in GCC 3.4.3. Actually this is Solaris 10 update 11 distributed GCC:

$ gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

so that may serve as kind of known issue on sparc/solaris 10.

Change History (1)

comment:1 Changed 5 years ago by thomie

Resolution: wontfix
Status: newclosed

kgardas: I added a note to Building/Preparation/Solaris, saying to not use GCC 3.4.3, and a link back to this bug. That page recommends to use GCC 4.1.2.

Note: See TracTickets for help on using tickets.