comp.lang.ada
 help / color / mirror / Atom feed
* Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both.
@ 2007-06-19  8:56 petter_fryklund
  2007-06-19 10:27 ` Alex R. Mosteo
  0 siblings, 1 reply; 6+ messages in thread
From: petter_fryklund @ 2007-06-19  8:56 UTC (permalink / raw)


First we got circularity detected in elaboration for a rather complex
generic structure. This does not happen in Solaris. A pragma Suppress
(Elaboration_Check) allowed us to build. But elaboration never
completes. We suspect that a PROGRAM_ERROR has been raise, but see no
trace of it. Last entry of call stack is an instantiation of generic
package that needed pragma Suppress to build.

Task Display does not work, always empty.

Any suggestions?

TIA,
Petter




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both.
  2007-06-19  8:56 Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both petter_fryklund
@ 2007-06-19 10:27 ` Alex R. Mosteo
  2007-06-19 10:55   ` petter_fryklund
  0 siblings, 1 reply; 6+ messages in thread
From: Alex R. Mosteo @ 2007-06-19 10:27 UTC (permalink / raw)


 petter_fryklund@hotmail.com wrote:

> First we got circularity detected in elaboration for a rather complex
> generic structure. This does not happen in Solaris. A pragma Suppress
> (Elaboration_Check) allowed us to build. But elaboration never
> completes. We suspect that a PROGRAM_ERROR has been raise, but see no
> trace of it. Last entry of call stack is an instantiation of generic
> package that needed pragma Suppress to build.
> 
> Task Display does not work, always empty.
> 
> Any suggestions?

Have you tried the -gnatE switch? Elaboration checks by gnat default to a
static, more restricted mechanism than required. It helped me in the past,
although nowadays I prefer to make my programs buildable without this
switch.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both.
  2007-06-19 10:27 ` Alex R. Mosteo
@ 2007-06-19 10:55   ` petter_fryklund
  2007-06-19 13:02     ` petter_fryklund
  2007-06-20  2:19     ` Jeffrey Creem
  0 siblings, 2 replies; 6+ messages in thread
From: petter_fryklund @ 2007-06-19 10:55 UTC (permalink / raw)


On 19 Juni, 12:27, "Alex R. Mosteo" <devn...@mailinator.com> wrote:
>  petter_frykl...@hotmail.com wrote:
> > First we got circularity detected in elaboration for a rather complex
> > generic structure. This does not happen in Solaris. A pragma Suppress
> > (Elaboration_Check) allowed us to build. But elaboration never
> > completes. We suspect that a PROGRAM_ERROR has been raise, but see no
> > trace of it. Last entry of call stack is an instantiation of generic
> > package that needed pragma Suppress to build.
>
> > Task Display does not work, always empty.
>
> > Any suggestions?
>
> Have you tried the -gnatE switch? Elaboration checks by gnat default to a
> static, more restricted mechanism than required. It helped me in the past,
> although nowadays I prefer to make my programs buildable without this
> switch.

Thanks for the swift response.

Yes, it did not help at all. But perhaps the combination of pragma
Suppress and -gnatE? Unfortunatly this is a big application depending
on a large infrastructure set using complex generics. I don't
understand why it differs between Solaris and Linux, but perhaps same
release level is just an illusion.

/Petter




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both.
  2007-06-19 10:55   ` petter_fryklund
@ 2007-06-19 13:02     ` petter_fryklund
  2007-06-20  2:19     ` Jeffrey Creem
  1 sibling, 0 replies; 6+ messages in thread
From: petter_fryklund @ 2007-06-19 13:02 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1456 bytes --]

On 19 Juni, 12:55, petter_frykl...@hotmail.com wrote:
> On 19 Juni, 12:27, "Alex R. Mosteo" <devn...@mailinator.com> wrote:
>
>
>
>
>
> >  petter_frykl...@hotmail.com wrote:
> > > First we got circularity detected in elaboration for a rather complex
> > > generic structure. This does not happen in Solaris. A pragma Suppress
> > > (Elaboration_Check) allowed us to build. But elaboration never
> > > completes. We suspect that a PROGRAM_ERROR has been raise, but see no
> > > trace of it. Last entry of call stack is an instantiation of generic
> > > package that needed pragma Suppress to build.
>
> > > Task Display does not work, always empty.
>
> > > Any suggestions?
>
> > Have you tried the -gnatE switch? Elaboration checks by gnat default to a
> > static, more restricted mechanism than required. It helped me in the past,
> > although nowadays I prefer to make my programs buildable without this
> > switch.
>
> Thanks for the swift response.
>
> Yes, it did not help at all. But perhaps the combination of pragma
> Suppress and -gnatE? Unfortunatly this is a big application depending
> on a large infrastructure set using complex generics. I don't
> understand why it differs between Solaris and Linux, but perhaps same
> release level is just an illusion.
>
> /Petter- Dölj citerad text -
>
> - Visa citerad text -

Sorry guys, we mistakenly used an old compiler. Elabortion now works
like a dream.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both.
  2007-06-19 10:55   ` petter_fryklund
  2007-06-19 13:02     ` petter_fryklund
@ 2007-06-20  2:19     ` Jeffrey Creem
  2007-06-20  6:41       ` petter_fryklund
  1 sibling, 1 reply; 6+ messages in thread
From: Jeffrey Creem @ 2007-06-20  2:19 UTC (permalink / raw)


petter_fryklund@hotmail.com wrote:
> On 19 Juni, 12:27, "Alex R. Mosteo" <devn...@mailinator.com> wrote:
>>  petter_frykl...@hotmail.com wrote:
>>> First we got circularity detected in elaboration for a rather complex
>>> generic structure. This does not happen in Solaris. A pragma Suppress
>>> (Elaboration_Check) allowed us to build. But elaboration never
>>> completes. We suspect that a PROGRAM_ERROR has been raise, but see no
>>> trace of it. Last entry of call stack is an instantiation of generic
>>> package that needed pragma Suppress to build.
>>> Task Display does not work, always empty.
>>> Any suggestions?
>> Have you tried the -gnatE switch? Elaboration checks by gnat default to a
>> static, more restricted mechanism than required. It helped me in the past,
>> although nowadays I prefer to make my programs buildable without this
>> switch.
> 
> Thanks for the swift response.
> 
> Yes, it did not help at all. But perhaps the combination of pragma
> Suppress and -gnatE? Unfortunatly this is a big application depending
> on a large infrastructure set using complex generics. I don't
> understand why it differs between Solaris and Linux, but perhaps same
> release level is just an illusion.

> /Petter
> 

I know you eventually indicated you used the correct compiler version 
and things worked but suppressing elaboration checks or general pragma 
suppresses being required to make something work is a very good 
indication that you have broken code that even if it appears to 
elaborate is probably not doing what you expect it to be doing.

The combination of this followed by the "pragma pack seemed to work on 
one platform" argument sounds like a pretty broken software process.

While it may be true that any sufficiently large project ends up with 
non-ideal and or non-portable code in places, there seems to be a lot 
going on here that is just begging for trouble.


 From the LRM:

13.2 Pragma Pack

     If a type is packed, then the implementation should try to minimize 
storage allocated to objects of the type, possibly at the expense of 
speed of accessing components, subject to reasonable complexity in 
addressing calculations.
(7)
     The recommended level of support for pragma Pack is:
(8)

         * For a packed record type, the components should be packed as 
tightly as possible subject to the Sizes of the component subtypes, and 
subject to any record_representation_clause that applies to the type; 
the implementation may, but need not, reorder components or cross 
aligned word boundaries to improve the packing. A component whose Size 
is greater than the word size may be allocated an integral number of words.

(9)

         * For a packed array type, if the component subtype's Size is 
less than or equal to the word size, and Component_Size is not specified 
for the type, Component_Size should be less than or equal to the Size of 
the component subtype, rounded up to the nearest factor of the word size.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both.
  2007-06-20  2:19     ` Jeffrey Creem
@ 2007-06-20  6:41       ` petter_fryklund
  0 siblings, 0 replies; 6+ messages in thread
From: petter_fryklund @ 2007-06-20  6:41 UTC (permalink / raw)


Thanks for advice.

About Elaboration: Nothing needed to be done when using the right
compiler, which implies an bug in the very early compiler used
mistakenly. The cause of the circularity was that two packages with
cross-dependencies (each others 'Spec with from 'Body) would elaborate
the bodies just after corresponding specs. Newer compiler can postpone
elaboration of bodies. This is a complex OOD model with four (or more)
levels of generics that we will have difficulties to change.

About pragma Pack: I would very much have prefered to stay with rep
specs, but had no influence on the matter.

About pragma Pack: I don't see how the troublesome compiler could not
break (8). Perhaps rep spec should be there anyway as we say in
Sweden: using both belt and suspenders.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-06-20  6:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-19  8:56 Porting problems from Solaris to Redhat Linux using GNAT 5.01a on both petter_fryklund
2007-06-19 10:27 ` Alex R. Mosteo
2007-06-19 10:55   ` petter_fryklund
2007-06-19 13:02     ` petter_fryklund
2007-06-20  2:19     ` Jeffrey Creem
2007-06-20  6:41       ` petter_fryklund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox