Building ghc-6.8.3-2 on 10.5.8, 32bit Intel, I get the following:

> ../../compiler/stage1/ghc-inplace -package-name OpenGL-2.2.1.1 -hide- 
> all-packages -split-objs -i -idist/build/autogen -idist/build -i. - 
> Idist/build -Iinclude -optc-DCALLCONV=ccall -#include "HsOpenGL.h" - 
> odir dist/build -hidir dist/build -stubdir dist/build -package  
> base-3.0.2.0 -O -DCALLCONV=ccall -XCPP -XForeignFunctionInterface - 
> idist/build  -H16m -O -I/sw/include -I/usr/X11/include -L/sw/lib -L/ 
> usr/X11/lib -O -Rghc-timing -fgenerics -c Graphics/Rendering/OpenGL/ 
> GL/VertexSpec.hs -o dist/build/Graphics/Rendering/OpenGL/GL/ 
> VertexSpec.o  -ohi dist/build/Graphics/Rendering/OpenGL/GL/ 
> VertexSpec.hi
>
> /tmp/ghc43837_0/ghc43837_0.split__810.s:47:0:
>     invalid character '_' in mnemonic
>
> /tmp/ghc43837_0/ghc43837_0.split__810.s:107:0:
>     FATAL:Symbol L_glVertex4iv$stub already defined.
> <<ghc: 634395756 bytes, 283 GCs, 6809892/12054528 avg/max bytes  
> residency (7 samples), 27M in use, 0.00 INIT (0.00 elapsed), 1.17  
> MUT (15.54 elapsed), 0.48 GC (0.50 elapsed) :ghc>>
> make[2]: *** [dist/build/Graphics/Rendering/OpenGL/GL/VertexSpec.o]  
> Error 1

Re-running the same command with -v -keep-tmp-files, I see at the end:

> *** Splitter:
> /sw32/bld/ghc-6.8.3-2/ghc-6.8.3/driver/split/ghc-split /tmp/ 
> ghc58155_0/ghc58155_0.split_s /tmp/ghc58155_0/ghc58155_0.split /tmp/ 
> ghc58155_0/ghc58155_0.split
> *** Assembler:
> gcc -c -o dist/build/Graphics/Rendering/OpenGL/GL/VertexSpec_split/ 
> VertexSpec__1.o /tmp/ghc58155_0/ghc58155_0.split__1.s
> ...  (810 such files)
> *** Assembler:
> gcc -c -o dist/build/Graphics/Rendering/OpenGL/GL/VertexSpec_split/ 
> VertexSpec__810.o /tmp/ghc58155_0/ghc58155_0.split__810.s
>
> /tmp/ghc58155_0/ghc58155_0.split__810.s:47:0:
>     invalid character '_' in mnemonic
>
> /tmp/ghc58155_0/ghc58155_0.split__810.s:107:0:
>     FATAL:Symbol L_glVertex4iv$stub already defined.
> <<ghc: 687135564 bytes, 235 GCs, 5891218/9060352 avg/max bytes  
> residency (7 samples), 25M in use, 0.00 INIT (0.00 elapsed), 1.67  
> MUT (20.42 elapsed), 0.48 GC (0.57 elapsed) :ghc>>

Line 47 of that file 810.s shows

>     46        .symbol_stub
>     47        irect_symbol _glVertex4f
>     48                .long L_glVertex4f$stub_binder
>     49        .symbol_stub
>     50        L_glVertex4fv$stub:
>     51                .indirect_symbol _glVertex4fv
>     52                jmp *L_glVertex4fv$lazy_ptr
>     53        L_glVertex4fv$stub_binder:
>     54                pushl $L_glVertex4fv$lazy_ptr
>     55                jmp dyld_stub_binding_helper

Obviously the file is badly maimed;
doing thus a grep in the input file of that ghc-split command :
egrep -n -C9 'irect_symbol _glVertex4f$'  /tmp/ghc58155_0/ 
ghc58155_0.split_s
this yields then :

> 58507-.symbol_stub
> 58508-L_glVertex4f$stub:
> 58509:        .indirect_symbol _glVertex4f
> 58510-        jmp *L_glVertex4f$lazy_ptr
> 58511-L_glVertex4f$stub_binder:
> 58512-        pushl $L_glVertex4f$lazy_ptr
> 58513-        jmp dyld_stub_binding_helper
> 58514-.section __DATA, __la_sym_ptr3,lazy_symbol_pointers
> 58515-L_glVertex4f$lazy_ptr:
> 58516:        .indirect_symbol _glVertex4f
> 58517-        .long L_glVertex4f$stub_binder
> 58518-.symbol_stub
> 58519-L_glVertex4fv$stub:

That ghc-split command is a perl script, starting with #!/sw/bin/perl.
The above was with /sw/bin/perl from perl5100.
If I redo the same after installing perl586, everything goes well !

Googling reveals a similar issue from 2.5 years ago (ghc is now at  
%v=6.12.3...):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460385#20
However the patch suggested there shows that the relevant perl-code
has changed since that time..
Not knowing why those changes were made, and knowing about as little
about perl as about asm, I don't feel I can safely try to patch this...

Jean-Francois


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to