GHC Error: "FATAL:Symbol _XJv_srt already defined."

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GHC Error: "FATAL:Symbol _XJv_srt already defined."

Ron Alford-2
Anyone know what this is about? Removing parts makes problem go away,
but it's not clear what parts to remove! (that, and I wrote those
parts for a reason!).

bash-3.2$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.3
bash-3.2$ uname -a
Darwin silverback-wired.home 9.4.0 Darwin Kernel Version 9.4.0: Mon
Jun  9 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386


$ rm -f DerivingError.o DerivingError.hi; ghc --make DerivingError.hs
[1 of 1] Compiling DerivingError    ( DerivingError.hs, DerivingError.o )

/var/folders/C0/C0SledGV2RaxbU+8ZLDnVU+++TI/-Tmp-//ghc27223_0/ghc27223_0.s:6080:0:
    FATAL:Symbol _XxG_srt already defined.


-Ron Alford

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

DerivingError.hs (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GHC Error: "FATAL:Symbol _XJv_srt already defined."

Austin Seipp
I can replicate this err with 6.8.3 on my macbook (os 10.5.4.) It also
appears to fail with a copy of the GHC HEAD as well:

$ uname -a
Darwin existential.local 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun  9
19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.3
$ ~/ghc-head/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.9.20080615
$ ghc --make DerivingError.hs
[1 of 1] Compiling DerivingError    ( DerivingError.hs, DerivingError.o )

/var/folders/27/27CWjmd8HK8wG5FT3nu3pk+++TI/-Tmp-//ghc39082_0/ghc39082_0.s:6080:0:
    FATAL:Symbol _XxH_srt already defined.
$ rm DerivingError.hi
$ ~/ghc-head/bin/ghc --make DerivingError.hs
[1 of 1] Compiling DerivingError    ( DerivingError.hs, DerivingError.o )

/var/folders/27/27CWjmd8HK8wG5FT3nu3pk+++TI/-Tmp-/ghc39116_0/ghc39116_0.s:6207:0:
    FATAL:Symbol _XyQ_srt already defined.
$

However, things get even wackier because I *can* get it to build on
the HEAD, only through a very odd compilation step (I figured this out
while trying to examine the ASM output from the -S flag):

$ ~/ghc-head/bin/ghc --version                  
The Glorious Glasgow Haskell Compilation System, version 6.9.20080615
$  ~/ghc-head/bin/ghc --make DerivingError.hs        
[1 of 1] Compiling DerivingError    ( DerivingError.hs, DerivingError.o )

/var/folders/27/27CWjmd8HK8wG5FT3nu3pk+++TI/-Tmp-/ghc44257_0/ghc44257_0.s:6207:0:
    FATAL:Symbol _XyP_srt already defined.
$ rm DerivingError.hi  
$ ~/ghc-head/bin/ghc -S DerivingError.hs
$ ~/ghc-head/bin/ghc --make DerivingError.hs
[1 of 1] Compiling DerivingError    ( DerivingError.hs, DerivingError.o )
$

Although in 6.8.3 it doesn't work regardless; but if we make it build
the object file through this odd step, we can then link it with a main
stub:

$ cat > main.hs                                    
main = putStrLn "hello world"
$ ~/ghc-head/bin/ghc --make main.hs DerivingError.o
[1 of 1] Compiling Main             ( main.hs, main.o )
Linking main ...
$

In particular the issue appears to be related to generics (duh,) since
if we search through the .s file generated when using -S, we can see
what it's referring to (6.8.3):

.align 2
_Xxn_srt:  ;; line 5757
        .long   _base_DataziGenericsziBasics_mkDataType_closure
        .long   _s1Zg_closure
        .long   _s1Zi_closure
.const_data
.align 2
_Xw9_srt:
        .long   _Xxn_closure
...

_Xxn_srt: ;; line 6080
        .long   _base_DataziGenericsziBasics_mkDataType_closure
        .long   _s1Zs_closure
        .long   _s1Zu_closure
.data
        .align 2
...

So it seems like a bug in the native code generator for generics.

The ghc-6.9 version was actually a snapshot of the head a few weeks
back as you can see, I'm building the latest HEAD from darcs as we speak,
but in the mean time I would file a bug report with the code attached:

http://hackage.haskell.org/trac/ghc/newticket?type=bug

If you do, I'll be sure to post what I've done here so the devs might
be able to track it easier. If the latest HEAD turns out to work I'll
get back to you as well.

Austin
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: GHC Error: "FATAL:Symbol _XJv_srt already defined."

Austin Seipp
Status update: after checking out the latest HEAD and building it, the
above error does not occur:

$ ~/ghc-head/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.9.20080720
$ ~/ghc-head/bin/ghc --make DerivingError.hs

<no location info>:
    Warning: -fallow-overlapping-instances is deprecated: Use the
    OverlappingInstances language instead
[1 of 1] Compiling DerivingError    ( DerivingError.hs, DerivingError.o )
$

However, this doesn't exactly help your immediate problem, and it
likely won't until 6.10.1 is released, as 6.8.3 is going to be the
last release of the 6.8 branch.

Truly sorry I couldn't have helped you more.

Austin
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: GHC Error: "FATAL:Symbol _XJv_srt already defined."

Ron Alford-2
I reopened the bug, since I found slight changes to the file were able
to reproduce the bug in recent versions of ghc-6.9.
I also can't get the -S compilation step to work with the new file,
unless I'm missing a step.

-Ron Alford

On Mon, Jul 21, 2008 at 3:32 AM, Ron Alford <[hidden email]> wrote:

> Oops, already posted the bug:
> http://hackage.haskell.org/trac/ghc/ticket/2456
>
> On Mon, Jul 21, 2008 at 3:29 AM, Austin Seipp <[hidden email]> wrote:
>> Status update: after checking out the latest HEAD and building it, the
>> above error does not occur:
>>
>> $ ~/ghc-head/bin/ghc --version
>> The Glorious Glasgow Haskell Compilation System, version 6.9.20080720
>> $ ~/ghc-head/bin/ghc --make DerivingError.hs
>>
>> <no location info>:
>>    Warning: -fallow-overlapping-instances is deprecated: Use the
>>    OverlappingInstances language instead
>> [1 of 1] Compiling DerivingError    ( DerivingError.hs, DerivingError.o )
>> $
>>
>> However, this doesn't exactly help your immediate problem, and it
>> likely won't until 6.10.1 is released, as 6.8.3 is going to be the
>> last release of the 6.8 branch.
>>
>> Truly sorry I couldn't have helped you more.
>>
>> Austin
>> _______________________________________________
>> Haskell-Cafe mailing list
>> [hidden email]
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe