I get many errors saying 'illegal external
declaration' when when I try to compile any haskell
program with ghc. I am doing this on Darwin / Mac OS
X.
As requested, I have used the '-v' option.
here is the output of the compiler:



[localhost:~/documents/test] thomasha% ghc -v test.hs
The Glorious Glasgow Haskell Compilation System,
version 4.08.1

Effective command line: -v

Ineffective C pre-processor:
        echo '{-# LINE 1 "test.hs" -}' >
/tmp/ghc8528.cpp && cat test.hs >> /tmp/ghc8528.cpp
ghc:compile:Output file test.o doesn't exist
ghc:compile:Interface file test.hi doesn't exist
ghc:recompile:Input file test.hs newer than test.o

Haskell compiler:
        /usr/local/ghc/lib/hsc /tmp/ghc8528.cpp 
-fignore-interface-pragmas -fomit-interface-pragmas
-fsimplify [ -fmax-simplifier-iterations4 ]  
-fwarn-overlapping-patterns -fwarn-missing-methods
-fwarn-missing-fields -fwarn-deprecations
-fwarn-duplicate-exports -fhi-version=408 -static
"-himap=.%.hi:/usr/local/ghc/lib/imports/std%.hi"
"-himap-sep=:"    -v -hifile=/tmp/ghc8528.hi -olang=C
-ofile=/tmp/ghc8528.hc -F=/tmp/ghc8528_stb.c
-FH=/tmp/ghc8528_stb.h +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.08, for Haskell
98, compiled by GHC version 4.08
/usr/local/ghc/lib/hsc /tmp/ghc8528.cpp
-fignore-interface-pragmas  -fsimplif  1.37s user
0.22s system 40% cpu 3.962 total

Pin on Haskell consistency info:
        echo 'static char ghc_hsc_ID[] = "@(#)hsc
test.hs       40.0,,";' >> /tmp/ghc8528.hc
*** New hi file follows...
__interface "Main" Main  where
__export Main main;
import PrelFloat 1 !;
import Prelude 1;
main :: PrelIOBase.IO PrelBase.Z0T ;


ghc: module version unchanged at 1

Replace .hi file, if changed:
        cmp -s Main.hi /tmp/ghc8528.hi-new || ( rm -f
Main.hi && cp /tmp/ghc8528.hi-new Main.hi )
cmp -s Main.hi /tmp/ghc8528.hi-new  0.02s user 0.02s
system 6896% cpu 0.001 total

C compiler:
        gcc -v  -S -Wimplicit -O
-finhibit-size-directive   -I.
-I/usr/local/ghc/lib/includes ghc8528.c >
/tmp/ghc8528.ccout 2>&1 && ( if [ ghc8528.s !=
/tmp/ghc8528_o.s ] ; then mv ghc8528.s
/tmp/ghc8528_o.s ; else exit 0 ; fi )
gcc -v -S -Wimplicit -O -finhibit-size-directive -I. 
ghc8528.c >  2>& 1  0.79s user 0.16s system 45% cpu
2.075 total
Reading specs from
/usr/libexec/gcc/darwin/ppc/2.95.2/specs
Apple Computer, Inc. version gcc-926, based on gcc
version 2.95.2 19991024 (release)
 /usr/libexec/gcc/darwin/ppc/cpp-precomp -smart
-lang-c -v -I. -I/usr/local/ghc/lib/includes -arch ppc
-D__GNUC__=2 -D__GNUC_MINOR__=95 -D__ppc__
-D__NATURAL_ALIGNMENT__ -D__MACH__ -D__BIG_ENDIAN__
-D__APPLE__ -D__ppc__ -D__NATURAL_ALIGNMENT__
-D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -Wimplicit
-D__STDC__ -D__APPLE_CC__=926 -D__DYNAMIC__
-D__OPTIMIZE__=1 ghc8528.c /tmp/ccRncaaa.i
Apple DevKit-based CPP 6.0alpha
/usr/local/ghc/lib/includes/Regs.h:165: illegal
external declaration, missing `;' after `R1'
/usr/local/ghc/lib/includes/Regs.h:171: illegal
external declaration, missing `;' after `R2'
/usr/local/ghc/lib/includes/Regs.h:177: illegal
external declaration, missing `;' after `R3'
/usr/local/ghc/lib/includes/Regs.h:183: illegal
external declaration, missing `;' after `R4'
/usr/local/ghc/lib/includes/Regs.h:189: illegal
external declaration, missing `;' after `R5'
/usr/local/ghc/lib/includes/Regs.h:195: illegal
external declaration, missing `;' after `R6'
/usr/local/ghc/lib/includes/Regs.h:201: illegal
external declaration, missing `;' after `R7'
/usr/local/ghc/lib/includes/Regs.h:207: illegal
external declaration, missing `;' after `R8'
/usr/local/ghc/lib/includes/Regs.h:225: illegal
external declaration, missing `;' after `F1'
/usr/local/ghc/lib/includes/Regs.h:231: illegal
external declaration, missing `;' after `F2'
/usr/local/ghc/lib/includes/Regs.h:237: illegal
external declaration, missing `;' after `F3'
/usr/local/ghc/lib/includes/Regs.h:243: illegal
external declaration, missing `;' after `F4'
/usr/local/ghc/lib/includes/Regs.h:249: illegal
external declaration, missing `;' after `D1'
/usr/local/ghc/lib/includes/Regs.h:255: illegal
external declaration, missing `;' after `D2'
/usr/local/ghc/lib/includes/Regs.h:282: illegal
external declaration, missing `;' after `Sp'
/usr/local/ghc/lib/includes/Regs.h:288: illegal
external declaration, missing `;' after `Su'
/usr/local/ghc/lib/includes/Regs.h:294: illegal
external declaration, missing `;' after `SpLim'
/usr/local/ghc/lib/includes/Regs.h:300: illegal
external declaration, missing `;' after `Hp'
/usr/local/ghc/lib/includes/Regs.h:306: illegal
external declaration, missing `;' after `HpLim'
/usr/local/ghc/lib/includes/Stg.h:153: warning: could
not use precompiled header '/usr/include/unistd.p',
because:
/usr/local/ghc/lib/includes/Stg.h:153: warning: #ifdef
'_POSIX_SOURCE' not defined when precompiled, but now
defined:
/usr/local/ghc/lib/includes/Stg.h:153: warning:   at
/usr/local/ghc/lib/includes/Stg.h:16
/tmp/ghc8528.hc:17: only 2 args to macro 'STK_CHK_NP'
(3 expected)
/tmp/ghc8528.hc:33: only 3 args to macro
'HP_STK_CHK_NP' (4 expected)
cpp-precomp: warning: errors during smart
preprocessing, retrying in basic mode
deleting... /tmp/ghc8528.cpp /tmp/ghc8528.hi
/tmp/ghc8528.hc /tmp/ghc8528_stb.c /tmp/ghc8528_stb.h
ghc8528.c ghc8528.s /tmp/ghc8528_o.s

rm -f /tmp/ghc8528*



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to