Bugs item #728392, was opened at 2003-04-27 12:27 Message generated for change (Comment added) made by krysiek You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=728392&group_id=8032
Category: Compiler >Group: 6.0 >Status: Pending Resolution: Duplicate Priority: 5 Submitted By: Ryszard Kubiak (krysiek) Assigned to: Nobody/Anonymous (nobody) Summary: ghc fails with -O flags on Mandrake Initial Comment: Hi the Glorious GHC Team, I suppose that it can be considered a bug that ghc fails to compile with -On, n>0 option while it compiles fine with no optimisation flags. For example, for a module as simple as: module Test where f x = x compiler fails with: [EMAIL PROTECTED] LHS]$ ghc -O -c Test.hs Prologue junk?: .globl __stginit_Test __stginit_Test: pushl %ebp movl %esp, %ebp Compilation goes through when it is called with ghc -c Test.hs. I installed ghc version 5.04.3 on my Mandrake 9.0 Linux from a binary tar.bz file. The installation process went problemless; below please find log files generated for ./configure and for make install. I wonder if the problem has anything to do with version differences between the libraries used to produce a binary distribution and the ones that came with Mandrake 9.0. Of course, I've got both libreadline.so.4 and libncurses.so.5, as specified on ghc download page. Still, I wasn't able to install ghc from rpms because of unsatisfied requirements. For example, (..... Andrew Moran's rpm complains: [EMAIL PROTECTED] rysiek]# rpm --install ghc-5.04.3-1.i386.rpm error: failed dependencies: libc.so.6(GLIBC_2.3) is needed by ghc-5.04.3-1 libreadline.so.4 is needed by ghc-5.04.3-1 I understand the first of these complaints: /lib/libc.so.6 comes from glibc-2.2.5-16mdk on Mandrake, so GLIBC versions differ. Still, I don't know, how to read the second complain [EMAIL PROTECTED] rysiek]# locate libreadline /lib/libreadline.so.4 /lib/libreadline.so.4.1 /lib/libreadline.so.4.2 /lib/libreadline.so.4.3 This means that libreadline.so.4 is available, so perhaps the name of its rpm matters: [EMAIL PROTECTED] rysiek]# rpm -q -f /lib/libreadline.so.4 readline-4.3-4mdk .....) Anyway, after installation from a binary distribution went problemless I would expect compiler to work 99,99999% problemless. In a situation when -On, n>0 options don't work I am unable to install fptools from their original bunch, for example. I am also not sure if it was possible to compile ghc from its sources. (I didn't try it, I expect, however, that ghc itself is best compiled with lots of optimisation flags.) With Best Regards, Rysiek === config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. configure:578: checking host system type configure:599: checking target system type configure:617: checking build system type configure:722: checking for perl configure:760: checking if your perl works in shell scripts configure:794: checking for a BSD compatible install configure:850: checking whether ln -s works configure:876: checking for sed configure:914: checking for gcc configure:1027: checking whether the C compiler (gcc ) works configure:1043: gcc -o conftest conftest.c 1>&5 configure:1069: checking whether the C compiler (gcc ) is a cross-compiler configure:1074: checking whether we are using GNU C configure:1102: checking whether gcc accepts -g configure:1134: checking whether you have an ok gcc configure:1164: checking how to run the C preprocessor === make.log Configuring ghc, version 5.04.3, on i386-unknown-linux ... Creating a configured version of ghc-asm .. Done. Creating a configured version of ghc-split .. Done. Creating a configured version of ghc-5.04.3 .. Done. Creating a configured version of ghci-5.04.3 .. Done. Creating a configured version of ghc-pkg-5.04.3 .. Done. Creating a configured version of hsc2hs .. Done. ./mkdirhier /usr/local/bin (cd lib/i386-unknown-linux; find . -type d -exec sh -c '../.././mkdirhier $0 /usr/local/lib/ghc-5.04.3/$0' {} \; ) (cd share; find . -type d -exec sh -c '.././mkdirhier /usr/local/share/ghc-5.04.3/$0' {} \; ) for i in ghc-5.04.3 ghci-5.04.3 ghc-pkg-5.04.3 hsc2hs ""; do \ if test -n "$i" ; then /usr/bin/install -c -m 755 bin/i386-unknown-linux/$i /usr/local/bin; fi; \ done; for i in hp2ps ghcprof DrIFT DtdToHaskell Xtract ""; do \ if test -n "$i" ; then /usr/bin/install -c -m 755 bin/i386-unknown-linux/$i /usr/local/bin; fi; \ done; Creating a symbolic link from ghc-5.04.3 to ghc Creating a symbolic link from ghci-5.04.3 to ghci Creating a symbolic link from ghc-pkg-5.04.3 to ghc-pkg (cd lib/i386-unknown-linux; find . -type f -exec sh -c 'cp $0 /usr/local/lib/ghc-5.04.3/$0' {} \; ) for i in `(cd share; find . -type f )`; do \ /usr/bin/install -c -m 644 share/$i /usr/local/share/ghc-5.04.3/$i; \ done ./mkdirhier /usr/local/share/ghc-5.04.3/html if test -d share/html ; then cp -r share/html/* /usr/local/share/ghc-5.04.3/html ; fi for i in share/*.ps; do \ cp $i /usr/local/share/ghc-5.04.3 ; \ done ======================================================================= Installation of ghc-5.04.3 was successful. To use, add /usr/local/bin to your PATH. For documentation, see /usr/local/share/ghc-5.04.3/html/index.html ======================================================================= ---------------------------------------------------------------------- >Comment By: Ryszard Kubiak (krysiek) Date: 2003-06-01 11:00 Message: Logged In: YES user_id=766140 Hi, Thanks for your help so far. I've just noticed that this bug is in version 6.0 too. Rysiek ---------------------------------------------------------------------- Comment By: Simon Marlow (simonmar) Date: 2003-04-29 11:59 Message: Logged In: YES user_id=48280 This is a dup of bug #632021. The fix was made to the HEAD, but for some reason wasn't merged into the branch. I'll look into merging it. The workaround is to add -optc -mno-omit-leaf-frame-pointer to the command line. ---------------------------------------------------------------------- Comment By: Simon Marlow (simonmar) Date: 2003-04-28 10:37 Message: Logged In: YES user_id=48280 Please do the following, using the Test.hs you mentioned in the report: $ ghc -keep-raw-s-file -c -O Test.hs and attach the resulting file Test.raw_s. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=728392&group_id=8032 _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs