ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memo: Re: More build problems with DDD on HPUX using aCC


From: andrew . marlow
Subject: Memo: Re: More build problems with DDD on HPUX using aCC
Date: Wed, 3 Oct 2001 08:22:40 +0100



>>
>> Hello Arnaud,
>>
>> I rebuilt DDD from scratch on HPUX 10.20B today and got a few fatal link
errors.
>> It couldn't find the symbols static_sep and static_r. This turns out to be a
>> weirdness
>> of the aCC compiler for which I have a workaround.
>>
>
>Did you have a look at PROBLEMS in the ddd distribution ?
>
><QUOTE>
>    * IMPORTANT: I just installed the latest aCC patch, released
>      around yesterday (2000/02/02)!!! Its number is PHSS_20959.
>      Without it, linking failed with
>        /usr/ccs/bin/ld: Unsatisfied symbols:
>       static_r (data)
></QUOTE>

No I didn't. I should have. However, the fixes I have will enable DDD
to be built with systems that do not have this patch. I cannot get
this patch easily for the system I am using right now.

>
>> The header file charsets.h declares a variable 'sep' as static in one of its
>> methods.
[snip]
>
>A more correct patch is:
>Index: charsets.h
>===================================================================
>RCS file: /cvsroot/ddd/ddd/ddd/charsets.h,v
>retrieving revision 1.12
>diff -u -r1.12 charsets.h
>--- charsets.h  2000/12/11 12:21:48     1.12
>+++ charsets.h  2001/10/02 17:44:56
>@@ -122,10 +122,10 @@
> #if XmVERSION == 1 && XmREVISION <= 1
> inline MString cr() { return rm("\n"); }
> #else
>+const XmString charsets_sep = XmStringSeparatorCreate();
> inline MString cr()
> {
>-    static XmString sep = XmStringSeparatorCreate();
>-    return MString(sep, true);
>+    return MString(charsets_sep, true);
> }
> #endif
>

Yes, this is better. I have made my code like the above.

>>
>> Then I got a similar error with the symbol 'static_r' which it turns out
>> was referred to in HintGraphN.h.
>>
>>     virtual const BoxRegion& sensitiveRegion(const GraphGC& gc) const
>>     {
>>         Static BoxRegion r;
>>         // return a size-pixel area around the current position
>>         r = BoxRegion(pos() - gc.hintSize / 2, gc.hintSize);
>>         return r;
>>     }
>>
>> To make this problem go away I added a private member called m_r
>> to the class and declared it mutable. I then changed the sensitiveRegion
>> method as shown below:
>>
>>     virtual const BoxRegion& sensitiveRegion(const GraphGC& gc) const
>>     {
>>         // return a size-pixel area around the current position
>>         m_r = BoxRegion(pos() - gc.hintSize / 2, gc.hintSize);
>>         return m_r;
>>     }
>>
>
>Except that "mutable" is not supported by all C++ compiler.
>If you want to submit a patch, please keep the current code within
>"#if !HAVE_MUTABLE".

I have found another way. I have assigned through a this pointer
that has had constness cast away. Crude but effective. Now mutable
is no longer needed.

>
>
>> With these changes dd built ok and runs ok and is as excellent as ever :-)
>>
[snip]
>You should submit these two patches, once updated, to address@hidden
>Thanks for your work !
>
>Cheers,
>Arnaud

I have attached the modified files and am copying this email to ddd.

(See attached file: HintGraphN.h)
(See attached file: charsets.h)


Regards,

Andrew Marlow.


___________________________________________________________________________

This transmission has been issued by a member of the HSBC group ("HSBC")
for the information of the addressee only and should not be reproduced
and / or distributed to any other person. Each page attached hereto must
be read in conjunction with any disclaimer which forms part of it. Unless
otherwise stated, this transmission is neither an offer nor the solicitation
of an offer to sell or purchase any investment. Its contents are based on
information obtained from sources believed to be reliable but HSBC makes
no representation and accepts no responsibility or liability as to its
completeness or accuracy.

Attachment: HintGraphN.h
Description: Binary data

Attachment: charsets.h
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]