[I sent this message about a week ago, but it has apparently disappeared into the
Internet aether...]
See the attached transcript. The GHC release in question is the precompiled HPPA
binary package.
The _INCLUDE_POSIX_SOURCE, etc. macro redefinition warnings arise because I predefine
all the _INCLUDE_* stuff in the gcc spec file when the -ansi flag is off.
--FC
P.S. The Glasgow mail server is driving me nutso!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I've had my messages returned so many times now with MIME-related problems that I
would almost rather put up with compiler problems than see yet another message from
[EMAIL PROTECTED] If this mail gets returned to me, I swear I'm going to take
a dive out our 8th floor window...!
--- snip, snip! ---
(hp3) /usr/local/src/t 510 $ LANG=C uname -a
HP-UX hp3 B.11.00 A 9000/782 2001211952 two-user license
(hp3) /usr/local/src/t 511 $ cat Main.hs
module Main where
import Time
import Locale
main = do t <- getClockTime
ct <- toCalendarTime t
putStr (show ct)
(hp3) /usr/local/src/t 512 $ ghc -v -o main Main.hs
The Glorious Glasgow Haskell Compilation System, version 4.03, patchlevel 0
Effective command line: -v -o main
Ineffective C pre-processor:
echo '{-# LINE 1 "Main.hs" -}' > /tmp/ghc2006.cpp && cat Main.hs >>
/tmp/ghc2006.cpp
real 0.0
user 0.0
sys 0.0
ghc:compile:Output file Main.o doesn't exist
ghc:compile:Interface file Main.hi doesn't exist
ghc:recompile:Input file Main.hs newer than Main.o
Haskell compiler:
/usr/local/lib/ghc-4.03/hsc ,-W ,/tmp/ghc2006.cpp -fignore-interface-pragmas
-fomit-interface-pragmas -fsimplify [ -ffloat-lets-exposing-whnf -ffloat-primops-ok
-fcase-of-case -fdo-case-elim -freuse-con -fpedantic-bottoms
-fmax-simplifier-iterations4 ] -fwarn-overlapping-patterns -fwarn-missing-methods
-fwarn-duplicate-exports -fhi-version=403 -static
-himap=.%.hi:/usr/local/lib/ghc-4.03/imports/std%.hi -v -hifile=/tmp/ghc2006.hi
-C=/tmp/ghc2006.hc -F=/tmp/ghc2006_stb.c -FH=/tmp/ghc2006_stb.h +RTS -H6000000
-K1000000
Glasgow Haskell Compiler, version 4.03, for Haskell 98
real 6.7
user 2.6
sys 0.3
Pin on Haskell consistency info:
echo 'static char ghc_hsc_ID[] = "@(#)hsc Main.hs 40.0,,";' >>
/tmp/ghc2006.hc
real 0.0
user 0.0
sys 0.0
*** New hi file follows...
__interface Main 403 where
import IO 1 :: putStr 1;
import PrelBase 1 :: Monad 1 Show 1 String 1 addr2Integer 1 foldr 1 zddmfail 1
zddmshow 1 zddmshowList 1 zddmshowsPrec 1 zddmzgzg 1 zdfMonadZMZN 1 zdfShowBool 1
zdfShowChar 1 zdfShowInt 1 zdfShowZ0T 1 zdfShowZMZN 1;
import PrelIOBase 1 :: IO 1 zdfMonadIO 1;
import PrelNum 1 :: zdfShowInteger 1;
import PrelNumExtra 1 :: zdfShowDouble 1;
import PrelPack 1 :: packCStringzh 1 unpackAppendCStringzh 1 unpackCStringzh 1
unpackFoldrCStringzh 1 unpackNByteszh 1;
import Time 1 :: CalendarTime 1 ClockTime 1 getClockTime 1 toCalendarTime 1
zdfShowCalendarTime 1 zdfShowClockTime 1;
__instimport IO ; __instimport PrelAddr ; __instimport PrelArr ; __instimport
PrelBounded ; __instimport PrelCCall ; __instimport PrelConc ; __instimport
PrelForeign ; __instimport PrelIOBase ; __instimport PrelNum ; __instimport
PrelNumExtra ; __instimport PrelStable ; __instimport PrelTup ;
__export Main main;
main :: PrelIOBase.IO PrelBase.Z0T ;
ghc: module version changed to 1; reason: no old .hi file
Replace .hi file, if changed:
cmp -s Main.hi /tmp/ghc2006.hi-new || ( rm -f Main.hi && cp
/tmp/ghc2006.hi-new Main.hi )
real 0.0
user 0.0
sys 0.0
C compiler:
gcc -v -D_HPUX_SOURCE -static -S -Wimplicit -O -I.
-I/usr/local/lib/ghc-4.03/includes -I/usr/local/lib/ghc-4.03/includes ghc2006.c >
/tmp/ghc2006.ccout 2>&1 && ( if [ ghc2006.s != /tmp/ghc2006_o.s ] ; then mv ghc2006.s
/tmp/ghc2006_o.s ; else exit 0 ; fi )
Reading specs from /usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/egcs-2.91.60/cpp -lang-c -v -I.
-I/usr/local/lib/ghc-4.03/includes -I/usr/local/lib/ghc-4.03/includes -undef
-D__GNUC__=2 -D__GNUC_MINOR__=91 -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB
-Dhpux -Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__
-D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix
-Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa) -D__OPTIMIZE__ -Wimplicit
-D__hp9000s700 -D_PA_RISC1_1 -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_POSIX_SOURCE
-D_INCLUDE_POSIX4_SOURCE -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_XOPEN_SOURCE_EXTENDED
-D_INCLUDE_HIUX_SOURCE -D__STDC_EXT__ -D_HPUX_SOURCE ghc2006.c /tmp/ccHxrWi2.i
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
.
/usr/local/lib/ghc-4.03/includes
/usr/local/include
/usr/local/hppa1.1-hp-hpux11.00/include
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/egcs-2.91.60/include
/usr/include
End of search list.
In file included from
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/egcs-2.91.60/include/stdlib.h:6,
/usr/include/sys/stdsyms.h:15: warning: `_INCLUDE_POSIX_SOURCE' redefined
*Initialization*:1: warning: this is the location of the previous definition
/usr/include/sys/stdsyms.h:18: warning: `_INCLUDE_POSIX4_SOURCE' redefined
*Initialization*:1: warning: this is the location of the previous definition
/usr/include/sys/stdsyms.h:19: warning: `_INCLUDE_XOPEN_SOURCE' redefined
*Initialization*:1: warning: this is the location of the previous definition
/usr/include/sys/stdsyms.h:20: warning: `_INCLUDE_XOPEN_SOURCE_EXTENDED' redefined
*Initialization*:1: warning: this is the location of the previous definition
/usr/include/sys/stdsyms.h:22: warning: `_INCLUDE_HPUX_SOURCE' redefined
*Initialization*:1: warning: this is the location of the previous definition
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/egcs-2.91.60/cc1 /tmp/ccHxrWi2.i -quiet
-dumpbase ghc2006.c -O -Wimplicit -version -o ghc2006.s
GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release) (hppa1.1-hp-hpux11.00)
compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
real 2.6
user 0.4
sys 0.1
Unix assembler:
gcc -o Main.o -c -I. -I/usr/local/lib/ghc-4.03/includes
-I/usr/local/lib/ghc-4.03/includes /tmp/ghc2006.s
real 0.3
user 0.0
sys 0.0
Linker:
gcc -v -u PrelMain_mainIO_closure -u PrelBase_Izh_static_info -u
PrelBase_Czh_static_info -u PrelBase_Fzh_static_info -u PrelBase_Dzh_static_info -u
PrelAddr_Azh_static_info -u PrelAddr_Wzh_static_info -u PrelAddr_I64zh_static_info -u
PrelAddr_W64zh_static_info -u PrelStable_StablePtr_static_info -u
PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelBase_Fzh_con_info -u
PrelBase_Dzh_con_info -u PrelAddr_Azh_con_info -u PrelAddr_Wzh_con_info -u
PrelAddr_I64zh_con_info -u PrelAddr_W64zh_con_info -u PrelStable_StablePtr_con_info -u
PrelBase_False_static_closure -u PrelBase_True_static_closure -u
PrelPack_unpackCString_closure -o main Main.o -L/usr/local/lib/ghc-4.03 -lHS
-lHS_cbits -lHSrts -lgmp -lm
Reading specs from /usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
/usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/egcs-2.91.60/collect2 -L/lib/pa1.1
-L/usr/lib/pa1.1 -z -u main -o main -u PrelMain_mainIO_closure -u
PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelBase_Fzh_static_info -u
PrelBase_Dzh_static_info -u PrelAddr_Azh_static_info -u PrelAddr_Wzh_static_info -u
PrelAddr_I64zh_static_info -u PrelAddr_W64zh_static_info -u
PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u
PrelBase_Fzh_con_info -u PrelBase_Dzh_con_info -u PrelAddr_Azh_con_info -u
PrelAddr_Wzh_con_info -u PrelAddr_I64zh_con_info -u PrelAddr_W64zh_con_info -u
PrelStable_StablePtr_con_info -u PrelBase_False_static_closure -u
PrelBase_True_static_closure -u PrelPack_unpackCString_closure /usr/ccs/lib/crt0.o
-L/usr/local/lib/ghc-4.03 -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/egcs-2.91.60
-L/usr/local/hppa1.1-hp-hpux11.00/lib -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib
Main.o -lHS -lHS_cbits -lHSrts -lgmp -lm -lgcc -lc -lgcc
real 3.9
user 0.8
sys 0.3
rm -f /tmp/ghc2006*
(hp3) /usr/local/src/t 513 $ main
Segmentation fault