Closed DragonLi closed 8 years ago
This seems to be clang
-specific, as building primitive-0.5.3.0
on 14.04LTS with ghc
built against gcc
definitely works.
[solved] for me the problem was that there was no c compiler installed on my Amazon Linux server 'sudo yum install gcc' then reran 'cabal install' & it completed successfully
The error message is not crystal clear for this issue. I eventually figured it out by trying to compile the primitive-memops.c file & found I did not have a c compiler installed. I did already have ghc 7.6.3 installed & running
I encountered this problem when installing http://www.haskellcraft.com/craft3e/Start.html (Simon Thompson's Haskell Craft book source code). Frustrated me for several hours. There were lots of hits on this question but nothing that was an answer. I had checked the files & used the -v3 flag & tried specifying the --extra-include-files directives.
My linux environment is an Amazon EC2 instance based on an Amazon linux AMI. My haskell environment is: ghc 7.6.3 (obtained as distribution from justhub, not git)
Just about the same problem here, on FreeBSD 10.0. It's using clang, of course, but I do have gcc installed and in the path.
* Missing (or bad) header file: primitive-memops.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
World file is already up to date.
From what I can see, the file primitive-memops.h
is not missing, so where do I go from here? I cannot find how the C compiler is called, i.e. what name is used by the cabal-install
process?
@obscaenvs try running cabal install -v3
that should dump out where cabal
and ghc
are looking for gcc
I wiped a few old libs and reinstalled; that did the trick :)
My system is ubuntu 14.04LTS, using ghc-7.8.2 with clang-3.4, the error message with the verbosity flag -v3 is: