Re: ANNOUNCE: GHC version 6.0

2003-06-01 Thread Ralf Hinze
 Compiling 6.0 from source fails with:

 ../../ghc/compiler/ghc-inplace -H16m -O -Wall -fffi -Iinclude '-#include
 HsOpenGL.h' -cpp -I/usr/X11R6/include -DCALLCONV=ccall
 '-DGET_PROC_ADDRESS=glXGetProcAddressARB' -package-name OpenGL -O
 -Rghc-timing  -package base -split-objs-c
 Graphics/Rendering/OpenGL/GL/Extensions.hs -o
 Graphics/Rendering/OpenGL/GL/Extensions.o  -ohi
 Graphics/Rendering/OpenGL/GL/Extensions.hi
 Graphics/Rendering/OpenGL/GL/Extensions.hs:42: parse error on input
 `glXGetProcAddressARB' ghc: 3261568 bytes, 2 GCs, 20548/20548 avg/max
 bytes residency (1 samples), 5M in use, 0.00 INIT (0.00 elapsed), 0.01 MUT
 (0.09 elapsed), 0.01 GC (0.03 elapsed) :ghc make[2]: ***
 [Graphics/Rendering/OpenGL/GL/Extensions.o] Fehler 1
 make[1]: *** [all] Fehler 1
 make[1]: Leaving directory
 `/var/tmp/portage/ghc-6.0/work/stage2-build/libraries' make: *** [build]
 Fehler 1

The following patch worked for me (but does it cure the problem?)

irrwisch root # diff libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Extensions.hs 
libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Extensions.hs-orig
42c42
 foreign import CALLCONV unsafe GET_PROC_ADDRESS ::
---
 foreign import CALLCONV unsafe GET_PROC_ADDRESS glXGetProcAddressARB ::

Cheers, Ralf

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[ ghc-Bugs-728392 ] ghc fails with -O flags on Mandrake

2003-06-01 Thread SourceForge.net
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=detailatid=108032aid=728392group_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, n0 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,9% 
problemless. In a situation when -On, n0 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 conftestconftest.c  15  
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