Pepsikarola K.
Pepsikarola K.

Reputation: 21

ghc does not work because of missing "Rts.h"

When I try to compile a Haskell program using ghc, it always raises the same exception: (translated to English)

$ ghc vtzr.hs
Linking vtzr ...

/tmp/ghc8101_0/ghc8101_0.c:1:17:
     fatal Error: Rts.h: File or directory not found
Compilation aborted.

Actually, the "Rts.h" is located properly at /usr/lib64/ghc-7.4.2/include so I do not really understand what the compiler complains about. I examined it a little further and found out that the exception actually comes from gcc trying to compile a tmp-file which includes Rts.h:

*** C Compiler:
'/usr/bin/gcc' '-fno-stack-protector' '-Wl,--hash-size=31' '-Wl,--reduce-memory-overheads' '-c' '/tmp/ghc8656_0/ghc8656_0.c' '-o' '/tmp/ghc8656_0/ghc8656_0.o' '-DTABLES_NEXT_TO_CODE' '-I' '-I/usr/lib64/ghc-7.4.2/include'

I am using ghc 7.4.2 and gcc 4.7.2 on Mageia 3 Linux x86_64. Maybe it is just a Mageia issue...? BTW. Running the program with runghc works fine.

Upvotes: 1

Views: 240

Answers (1)

Pepsikarola K.
Pepsikarola K.

Reputation: 21

Ok, this seems to be either a problem with the Mageia version of ghc or a ghc 7.4.2 bug which is fixed in the recent release: I just built a ghc 7.6.3 from source and it works fine.

Upvotes: 1

Related Questions