Building Plaftorm 2010 2 on 64bit Linux

Hello all, I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get: ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc Even if I can easily compile gcc testc.c -o testc and run testc. Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-( Thanks Dusan

Am 08.02.2011 11:39, schrieb Dušan Kolář:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Your ghc script (under /usr/local/bin or elsewhere "type -all ghc") contains a line: pgmgcc="/usr/bin/gcc" This line should be corrected to point to your gcc that is probably not under /usr/bin/. Try by "which gcc" or "type -all gcc". (The official binaries only work for "sane systems".) HTH Christian

Not the problem, ghc script: cat /usr/local/lib/ghc-6.10.4/V12/bin/ghc #!/bin/sh exedir="/usr/local/lib/ghc-6.10.4/V12//lib/ghc-6.12.3" exeprog="ghc-stage2" executablename="$exedir/$exeprog" datadir="/usr/local/lib/ghc-6.10.4/V12/share" bindir="/usr/local/lib/ghc-6.10.4/V12/bin" topdir="/usr/local/lib/ghc-6.10.4/V12/lib/ghc-6.12.3" pgmgcc="/usr/local/bin/gcc" executablename="$exedir/ghc" exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" ${1+"$@"} while: which gcc /usr/local/bin/gcc Dusan On 02/08/2011 12:42 PM, Christian Maeder wrote:
Am 08.02.2011 11:39, schrieb Dušan Kolář:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc. Your ghc script (under /usr/local/bin or elsewhere "type -all ghc") contains a line:
pgmgcc="/usr/bin/gcc"
This line should be corrected to point to your gcc that is probably not under /usr/bin/. Try by "which gcc" or "type -all gcc".
(The official binaries only work for "sane systems".)
HTH Christian

Ok, gcc is used as linker, too. So maybe try to -pgml /usr/local/bin/gcc add to your command line. C. Am 08.02.2011 12:50, schrieb Dušan Kolář:
Not the problem, ghc script:
cat /usr/local/lib/ghc-6.10.4/V12/bin/ghc #!/bin/sh exedir="/usr/local/lib/ghc-6.10.4/V12//lib/ghc-6.12.3" exeprog="ghc-stage2" executablename="$exedir/$exeprog" datadir="/usr/local/lib/ghc-6.10.4/V12/share" bindir="/usr/local/lib/ghc-6.10.4/V12/bin" topdir="/usr/local/lib/ghc-6.10.4/V12/lib/ghc-6.12.3" pgmgcc="/usr/local/bin/gcc" executablename="$exedir/ghc" exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" ${1+"$@"}
while:
which gcc /usr/local/bin/gcc
Dusan
On 02/08/2011 12:42 PM, Christian Maeder wrote:
Am 08.02.2011 11:39, schrieb Dušan Kolář:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc. Your ghc script (under /usr/local/bin or elsewhere "type -all ghc") contains a line:
pgmgcc="/usr/bin/gcc"
This line should be corrected to point to your gcc that is probably not under /usr/bin/. Try by "which gcc" or "type -all gcc".
(The official binaries only work for "sane systems".)
HTH Christian

Unfortunately, no help :-( String /usr/bin/gcc was found in the following files, if it is useful information: /lib/ghc-6.12.3/haddock /lib/ghc-6.12.3/ghc /lib/ghc-6.12.3/ghc-6.12.3/Config.hi /lib/ghc-6.12.3/ghc-6.12.3/Config.p_hi /lib/ghc-6.12.3/ghc-6.12.3/Config.dyn_hi /lib/ghc-6.12.3/ghc-6.12.3/libHSghc-6.12.3.a /lib/ghc-6.12.3/ghc-6.12.3/libHSghc-6.12.3_p.a /lib/ghc-6.12.3/ghc-6.12.3/HSghc-6.12.3.o /lib/ghc-6.12.3/ghc-6.12.3/libHSghc-6.12.3-ghc6.12.3.so +doc files Dusan On 02/08/2011 12:56 PM, Christian Maeder wrote:
Ok, gcc is used as linker, too. So maybe try to
-pgml /usr/local/bin/gcc
add to your command line.
C.
Am 08.02.2011 12:50, schrieb Dušan Kolář:
Not the problem, ghc script:
cat /usr/local/lib/ghc-6.10.4/V12/bin/ghc #!/bin/sh exedir="/usr/local/lib/ghc-6.10.4/V12//lib/ghc-6.12.3" exeprog="ghc-stage2" executablename="$exedir/$exeprog" datadir="/usr/local/lib/ghc-6.10.4/V12/share" bindir="/usr/local/lib/ghc-6.10.4/V12/bin" topdir="/usr/local/lib/ghc-6.10.4/V12/lib/ghc-6.12.3" pgmgcc="/usr/local/bin/gcc" executablename="$exedir/ghc" exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" ${1+"$@"}
while:
which gcc /usr/local/bin/gcc
Dusan
On 02/08/2011 12:42 PM, Christian Maeder wrote:
Am 08.02.2011 11:39, schrieb Dušan Kolář:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc. Your ghc script (under /usr/local/bin or elsewhere "type -all ghc") contains a line:
pgmgcc="/usr/bin/gcc"
This line should be corrected to point to your gcc that is probably not under /usr/bin/. Try by "which gcc" or "type -all gcc".
(The official binaries only work for "sane systems".)
HTH Christian

Does adding "-v" reveal when /usr/bin/gcc is used? ghc -v -O2 --make test.hs -o test C. Am 08.02.2011 11:39, schrieb Dušan Kolář:
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-(
Thanks
Dusan

This is the end of the log: *** Assembler: /usr/bin/gcc -I. -c /tmp/ghc29474_0/ghc29474_0.s -o test.o *** Deleting temp files: Deleting: /tmp/ghc29474_0/ghc29474_0.s *** Deleting temp dirs: Deleting: /tmp/ghc29474_0 ghc: could not execute: /usr/bin/gcc Otherwise gcc not mentioned, no error mentioned. Dusan On 02/08/2011 01:04 PM, Christian Maeder wrote:
Does adding "-v" reveal when /usr/bin/gcc is used?
ghc -v -O2 --make test.hs -o test
C.
Am 08.02.2011 11:39, schrieb Dušan Kolář:
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-(
Thanks
Dusan

This looks like gcc is used as assembler. Try to add: -pgma /usr/local/bin/gcc C. Am 08.02.2011 13:22, schrieb Dušan Kolář:
This is the end of the log:
*** Assembler: /usr/bin/gcc -I. -c /tmp/ghc29474_0/ghc29474_0.s -o test.o *** Deleting temp files: Deleting: /tmp/ghc29474_0/ghc29474_0.s *** Deleting temp dirs: Deleting: /tmp/ghc29474_0 ghc: could not execute: /usr/bin/gcc
Otherwise gcc not mentioned, no error mentioned.
Dusan
On 02/08/2011 01:04 PM, Christian Maeder wrote:
Does adding "-v" reveal when /usr/bin/gcc is used?
ghc -v -O2 --make test.hs -o test
C.
Am 08.02.2011 11:39, schrieb Dušan Kolář:
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-(
Thanks
Dusan

Well, it helped, but not getting output anyway: /tmp/ghc32376_0/ghc32376_0.s: Assembler messages: /tmp/ghc32376_0/ghc32376_0.s:35:0: Error: bad register name `%rbp)' /tmp/ghc32376_0/ghc32376_0.s:36:0: Error: bad register name `%r15' /tmp/ghc32376_0/ghc32376_0.s:38:0: Error: bad register name `%r12' /tmp/ghc32376_0/ghc32376_0.s:39:0: Error: bad register name `%r13)' /tmp/ghc32376_0/ghc32376_0.s:41:0: Error: bad register name `%r12)' /tmp/ghc32376_0/ghc32376_0.s:42:0: Error: bad register name `%rbx' ... and many other similar lines Is my installation of gcc broken? :-O Dusan On 02/08/2011 01:27 PM, Christian Maeder wrote:
This looks like gcc is used as assembler.
Try to add:
-pgma /usr/local/bin/gcc
C.
Am 08.02.2011 13:22, schrieb Dušan Kolář:
This is the end of the log:
*** Assembler: /usr/bin/gcc -I. -c /tmp/ghc29474_0/ghc29474_0.s -o test.o *** Deleting temp files: Deleting: /tmp/ghc29474_0/ghc29474_0.s *** Deleting temp dirs: Deleting: /tmp/ghc29474_0 ghc: could not execute: /usr/bin/gcc
Otherwise gcc not mentioned, no error mentioned.
Dusan
On 02/08/2011 01:04 PM, Christian Maeder wrote:
Does adding "-v" reveal when /usr/bin/gcc is used?
ghc -v -O2 --make test.hs -o test
C.
Am 08.02.2011 11:39, schrieb Dušan Kolář:
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-(
Thanks
Dusan

There seems to be confusion about 32bit and 64bit assembly. Can you compile and link without optimization? C. Am 08.02.2011 13:33, schrieb Dušan Kolář:
Well, it helped, but not getting output anyway:
/tmp/ghc32376_0/ghc32376_0.s: Assembler messages:
/tmp/ghc32376_0/ghc32376_0.s:35:0: Error: bad register name `%rbp)'
/tmp/ghc32376_0/ghc32376_0.s:36:0: Error: bad register name `%r15'
/tmp/ghc32376_0/ghc32376_0.s:38:0: Error: bad register name `%r12'
/tmp/ghc32376_0/ghc32376_0.s:39:0: Error: bad register name `%r13)'
/tmp/ghc32376_0/ghc32376_0.s:41:0: Error: bad register name `%r12)'
/tmp/ghc32376_0/ghc32376_0.s:42:0: Error: bad register name `%rbx'
... and many other similar lines
Is my installation of gcc broken? :-O

No :-( D.
There seems to be confusion about 32bit and 64bit assembly. Can you compile and link without optimization?
C.
Am 08.02.2011 13:33, schrieb Dušan Kolář:
Well, it helped, but not getting output anyway:
/tmp/ghc32376_0/ghc32376_0.s: Assembler messages:
/tmp/ghc32376_0/ghc32376_0.s:35:0: Error: bad register name `%rbp)'
/tmp/ghc32376_0/ghc32376_0.s:36:0: Error: bad register name `%r15'
/tmp/ghc32376_0/ghc32376_0.s:38:0: Error: bad register name `%r12'
/tmp/ghc32376_0/ghc32376_0.s:39:0: Error: bad register name `%r13)'
/tmp/ghc32376_0/ghc32376_0.s:41:0: Error: bad register name `%r12)'
/tmp/ghc32376_0/ghc32376_0.s:42:0: Error: bad register name `%rbx'
... and many other similar lines
Is my installation of gcc broken? :-O

What does "gcc -v" say? Maybe you have to install the 32Bit ghc-6.12.3 that can work together with your gcc. Christian Am 08.02.2011 15:05, schrieb Kolar Dusan:
No :-(
D.
There seems to be confusion about 32bit and 64bit assembly. Can you compile and link without optimization?
C.
Am 08.02.2011 13:33, schrieb Dušan Kolář:
Well, it helped, but not getting output anyway:
/tmp/ghc32376_0/ghc32376_0.s: Assembler messages:
/tmp/ghc32376_0/ghc32376_0.s:35:0: Error: bad register name `%rbp)'
/tmp/ghc32376_0/ghc32376_0.s:36:0: Error: bad register name `%r15'
/tmp/ghc32376_0/ghc32376_0.s:38:0: Error: bad register name `%r12'
/tmp/ghc32376_0/ghc32376_0.s:39:0: Error: bad register name `%r13)'
/tmp/ghc32376_0/ghc32376_0.s:41:0: Error: bad register name `%r12)'
/tmp/ghc32376_0/ghc32376_0.s:42:0: Error: bad register name `%rbx'
... and many other similar lines
Is my installation of gcc broken? :-O
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Well, that was probably the main problem :-( Unfortunately, even if, after performing all the stuff once again, I made platform configured, make ended in compilation of happy with "old story": Configuring happy-1.18.5... "./Setup" "build" Preprocessing executables for happy-1.18.5... Building happy-1.18.5... ghc: could not execute: /usr/bin/gcc Error: Building the happy-1.18.5 package failed make: *** [build.stamp] Error 2 Even if all other items went OK, until happy :-( and it is called happy ;-) :-D Dusan On 02/08/2011 04:48 PM, Christian Maeder wrote:
What does "gcc -v" say?
Maybe you have to install the 32Bit ghc-6.12.3 that can work together with your gcc.
Christian
Am 08.02.2011 15:05, schrieb Kolar Dusan:
No :-(
D.
There seems to be confusion about 32bit and 64bit assembly. Can you compile and link without optimization?
C.
Am 08.02.2011 13:33, schrieb Dušan Kolář:
Well, it helped, but not getting output anyway:
/tmp/ghc32376_0/ghc32376_0.s: Assembler messages:
/tmp/ghc32376_0/ghc32376_0.s:35:0: Error: bad register name `%rbp)'
/tmp/ghc32376_0/ghc32376_0.s:36:0: Error: bad register name `%r15'
/tmp/ghc32376_0/ghc32376_0.s:38:0: Error: bad register name `%r12'
/tmp/ghc32376_0/ghc32376_0.s:39:0: Error: bad register name `%r13)'
/tmp/ghc32376_0/ghc32376_0.s:41:0: Error: bad register name `%r12)'
/tmp/ghc32376_0/ghc32376_0.s:42:0: Error: bad register name `%rbx'
... and many other similar lines
Is my installation of gcc broken? :-O
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Am 10.02.2011 13:15, schrieb Dušan Kolář:
Well, that was probably the main problem :-(
Unfortunately, even if, after performing all the stuff once again, I made platform configured, make ended in compilation of happy with "old story":
Configuring happy-1.18.5... "./Setup" "build" Preprocessing executables for happy-1.18.5... Building happy-1.18.5... ghc: could not execute: /usr/bin/gcc
Error: Building the happy-1.18.5 package failed make: *** [build.stamp] Error 2
Maybe this time indeed gcc is called as linker and you should add -pgml /usr/local/bin/gcc In fact my ghc script for ghc-7.0.1 contains: pgmgcc="/usr/bin/gcc" executablename="$exedir/ghc" exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgma "$pgmgcc" -pgml "$pgmgcc" -pgmP "$pgmgcc -E -undef -traditional" ${1+"$@"} Christian
Even if all other items went OK, until happy :-( and it is called happy ;-) :-D
Dusan

I have the following ghc script: cat ghc #!/bin/sh exedir="/usr/local/lib/ghc-6.12i386/lib/ghc-6.12.3" exeprog="ghc-stage2" executablename="$exedir/$exeprog" datadir="/usr/local/lib/ghc-6.12i386/share" bindir="/usr/local/lib/ghc-6.12i386/bin" topdir="/usr/local/lib/ghc-6.12i386/lib/ghc-6.12.3" pgmgcc="/usr/local/bin/gcc" executablename="$exedir/ghc" exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgml "$pgmgcc" -pgma "$pgmgcc" ${1+"$@"} Dušan On 02/10/2011 04:38 PM, Christian Maeder wrote:
Am 10.02.2011 13:15, schrieb Dušan Kolář:
Well, that was probably the main problem :-(
Unfortunately, even if, after performing all the stuff once again, I made platform configured, make ended in compilation of happy with "old story":
Configuring happy-1.18.5... "./Setup" "build" Preprocessing executables for happy-1.18.5... Building happy-1.18.5... ghc: could not execute: /usr/bin/gcc
Error: Building the happy-1.18.5 package failed make: *** [build.stamp] Error 2 Maybe this time indeed gcc is called as linker and you should add -pgml /usr/local/bin/gcc
In fact my ghc script for ghc-7.0.1 contains:
pgmgcc="/usr/bin/gcc" executablename="$exedir/ghc" exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgma "$pgmgcc" -pgml "$pgmgcc" -pgmP "$pgmgcc -E -undef -traditional" ${1+"$@"}
Christian
Even if all other items went OK, until happy :-( and it is called happy ;-) :-D
Dusan

Well, happy lists CPP as extensions so maybe adding: -pgmP "$pgmgcc -E -undef -traditional" helps. C. Am 10.02.2011 16:53, schrieb Dušan Kolář:
I have the following ghc script:
cat ghc #!/bin/sh exedir="/usr/local/lib/ghc-6.12i386/lib/ghc-6.12.3" exeprog="ghc-stage2" executablename="$exedir/$exeprog" datadir="/usr/local/lib/ghc-6.12i386/share" bindir="/usr/local/lib/ghc-6.12i386/bin" topdir="/usr/local/lib/ghc-6.12i386/lib/ghc-6.12.3" pgmgcc="/usr/local/bin/gcc" executablename="$exedir/ghc" exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgml "$pgmgcc" -pgma "$pgmgcc" ${1+"$@"}
Dušan
On 02/10/2011 04:38 PM, Christian Maeder wrote:
Am 10.02.2011 13:15, schrieb Dušan Kolář:
Well, that was probably the main problem :-(
Unfortunately, even if, after performing all the stuff once again, I made platform configured, make ended in compilation of happy with "old story":
Configuring happy-1.18.5... "./Setup" "build" Preprocessing executables for happy-1.18.5... Building happy-1.18.5... ghc: could not execute: /usr/bin/gcc
Error: Building the happy-1.18.5 package failed make: *** [build.stamp] Error 2 Maybe this time indeed gcc is called as linker and you should add -pgml /usr/local/bin/gcc
In fact my ghc script for ghc-7.0.1 contains:
pgmgcc="/usr/bin/gcc" executablename="$exedir/ghc" exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgma "$pgmgcc" -pgml "$pgmgcc" -pgmP "$pgmgcc -E -undef -traditional" ${1+"$@"}
Christian
Even if all other items went OK, until happy :-( and it is called happy ;-) :-D
Dusan

2011/2/8 Dušan Kolář
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-(
I'm guessing you actually do have good reasons for going this route, but I thought I'd ask, just to make sure ;-) Why are you going this route, of manually compiling HP using a pre-built binary from haskell.org, instead of using your Linux distro's pre-built (and well tested) version? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus

2011/2/8 Dušan Kolář
: Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-(
I'm guessing you actually do have good reasons for going this route, but I thought I'd ask, just to make sure ;-)
Why are you going this route, of manually compiling HP using a pre-built binary from haskell.org, instead of using your Linux distro's pre-built (and well tested) version?
There's no such a "package" I could easily install :-( It is CentOS based installation and I'm not the adiministrator so that I could not do even other things I would like to do. Dusan

2011/2/8 Kolar Dusan
2011/2/8 Dušan Kolář
: Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-(
I'm guessing you actually do have good reasons for going this route, but I thought I'd ask, just to make sure ;-)
Why are you going this route, of manually compiling HP using a pre-built binary from haskell.org, instead of using your Linux distro's pre-built (and well tested) version?
There's no such a "package" I could easily install :-( It is CentOS based installation and I'm not the adiministrator so that I could not do even other things I would like to do.
That is indeed a good reason for building it yourself :-) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus

Am 08.02.2011 11:39, schrieb Dušan Kolář:
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test [1 of 1] Compiling Main ( test.hs, test.o ) ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Can you call "file testc" to see what kind of binaries (32bit or 64bit) are generated? C.
Could anyone point me to a solution? Helps found by google pointed me to try use option -pgmc gcc, which doesn't work. All other threads with similar issue stayed unresoleved. :-(
Thanks
Dusan
participants (4)
-
Christian Maeder
-
Dušan Kolář
-
Kolar Dusan
-
Magnus Therning