logo       

RE: [HOpenGL] FW: ghc-6.4.1 on solaris: msg#00082

lang.haskell.glasgow.bugs

Subject: RE: [HOpenGL] FW: ghc-6.4.1 on solaris

On 12 July 2005 13:42, Axel Simon wrote:

> On Tue, 2005-07-12 at 13:27 +0100, Simon Marlow wrote:
>> On 12 July 2005 13:14, Axel Simon wrote:
>>
>>> On Tue, 2005-07-12 at 12:54 +0100, Simon Marlow wrote:
>>>> On 12 July 2005 11:52, Christian Maeder wrote:
>>>>
>>>>> Sven Panne wrote:
>>>>>> FYI: I've just committed a fix to CVS HEAD for GHC on SPARC to
>>>>>> reduce the register pressure on gcc, which will probably make its
>>>>>> way into GHC 6.4.1. The OpenGL/GLUT packages compile fine now
>>>>>> with gcc 3.4.4 on SPARC, success stories and/or tragic failures
>>>>>> with this patch are highly welcome...
>>>>>
>>>>> Good, I'm trying to create a release. Would you also dare to look
>>>>> into the mangler to fix the linking problem of ghci? Or do you
>>>>> have clue how to do this, Simon?
>>>>
>>>> Sorry, I don't have any idea what's causing that problem.
>>>
>>> ...but it would be nice to get it fixed. The symbol seens to stem
>>> from ghc/compiler/cmm/CLabel.hs where it says:
>>>
>>> pprCLbl ModuleRegdLabel
>>> = ptext SLIT("_module_registered")
>>>
>>> Is this meant to be an external symbol? And what does it do?
>>
>> _module_registered is a single word-sized variable in every module.
>> The symbol is supposed to be local, and hence not visible to other
>> modules (otherwise it clashes, of course). On Sparc, it appears
>> that something is going wrong either in the mangler or the splitter
>> or the linker, and this symbol is leaking(?).
>>
>> You could check whether it is indeed local as it is supposed to be in
>> the library modules. eg. if I say 'nm libHSbase.a | grep
>> module_registered' on Linux, I get nothing back.
>
> as49@myrtle:~/source/ghc-6.4-branch:519$ nm
> libraries/base/libHSbase.a | grep module_registered
> [11] | 4| 4|OBJT |GLOB |0 |COMMON |
> _module_registered
> [23] | 4| 4|OBJT |GLOB |0 |COMMON |
> _module_registered
> [11] | 4| 4|OBJT |GLOB |0 |COMMON |
> _module_registered
> [9] | 4| 4|OBJT |GLOB |0 |COMMON |
> _module_registered
> [9] | 4| 4|OBJT |GLOB |0 |COMMON |
> _module_registered
> [10] | 4| 4|OBJT |GLOB |0 |COMMON |
> _module_registered
>
> ...and so on. So it is global in every single source file. Do I know
> check how the .c file looks like? The symbol is defined in e.g.
> Arrow__84.o

The .hc file is probably fine. The series of files from .hc when
-split-objs is on is:

M.hc
--> C compiler --> M.raw_s
--> mangler --> M.split_s
--> splitter --> M.split__1.s, M.split__2.s, etc.

you can keep these files in /tmp by using -keep-tmp-files. Then take a
look at the _module_registered declarations in each one and see where it
goes wrong.

Cheers,
Simon


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise