1

I have an old version of cabal-install so I downloaded cabal-install 1.20 and When installing it errors out.

Additional note: ghc 7.8.3
OS: CentOS 6.6

Error:

Building network-2.4.2.3...
.......
......
......
usr/bin/ld: cannot find -lHSparsec-3.1.7-ghc7.8.3
collect2: ld returned 1 exit status
error during cabal-install bootstrap:
building the network package failed.

When I try to run "cabal install network-2.5.0.0",getting following errors

root@gains: cabal install network-2.5.0.0
Resolving dependencies...
Configuring network-2.5.0.0...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/tmp/network-2.5.0.023068/network-2.5.0.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
cabal: Error: some packages failed to install:
network-2.5.0.0 failed during the configure step. The exception was:
ExitFailure 1
Faheem Mitha
  • 34,649
  • 32
  • 119
  • 183
Vidhya
  • 131
  • 1
  • 6
  • Take a look at `config.log` as suggested, and see if it has any useful information. The "configure: error: cannot run C compiled programs" seems strange - see if you can find anything out about that. You could also look at the `configure` script directly to see what it is testing for in this case. What version of `cabal-install` to do you have? Is this a precompiled binary package for your system? For non-Haskell users, can you say something about what `cabal-install` does? It sounds like a custom program for downloading and installing Haskell-related software. – Faheem Mitha Dec 11 '14 at 12:06
  • Did you have any specific plans for how to use it? – Faheem Mitha Dec 11 '14 at 12:07
  • Please don't cross-post - http://stackoverflow.com/questions/27420013/cabal-install-error-usr-bin-ld-cannot-find-lhsparsec-3-1-7-ghc7-8-3 – Faheem Mitha Dec 11 '14 at 12:08
  • If you have a new question, ask a new question. And if you have an answer for this question, add it as an answer and accept it so people know your problem was solved. – Faheem Mitha Dec 11 '14 at 14:32

1 Answers1

2

Error :

checking whether we are cross compiling... configure: error: in `/tmp/network-2.5.0.023068/network-2.5.0.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

So, I run command yum groupinstall "development tools", installed c compiler tools and could compile c programs. Then,

checking whether we are cross compiling... configure: error: in /tmp/network-2.5.0.023068/network-2.5.0.0':

I tried mount -o remount,exec,suid /tmp which solved the error.Its because of execution rights issue on the file system.

Vidhya
  • 131
  • 1
  • 6