comp.lang.ada
 help / color / mirror / Atom feed
* Gnat's "Missing Subunits"
@ 2003-08-28 18:25 Peter Richtmyer
  2003-08-28 19:29 ` Simon Wright
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Richtmyer @ 2003-08-28 18:25 UTC (permalink / raw)


I am trying to compile a very old, large VAX Ada system using Gnat
3.15p
(Win2000) on a PC, hoping to modify the old system enough to do a
little debugging on the PC.

Sometimes when compiling a large Generic Package body, I get no errors
except "missing subunits". I have found no easy way to identify 
the problem(s). It seems like the problem is sometimes actually in
a "with'd" package a couple levels deeper.  

Is anybody familiar with this, and have a way to find the problem(s)
quickly? 

I wish it could tell me what "subunits" are missing. I have looked 
through the docs but found nothing on this subject.

Thanks,
Peter



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

* Re: Gnat's "Missing Subunits"
  2003-08-28 18:25 Gnat's "Missing Subunits" Peter Richtmyer
@ 2003-08-28 19:29 ` Simon Wright
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Wright @ 2003-08-28 19:29 UTC (permalink / raw)


prichtmyer@yahoo.com (Peter Richtmyer) writes:

> I am trying to compile a very old, large VAX Ada system using Gnat
> 3.15p
> (Win2000) on a PC, hoping to modify the old system enough to do a
> little debugging on the PC.
> 
> Sometimes when compiling a large Generic Package body, I get no errors
> except "missing subunits". I have found no easy way to identify 
> the problem(s). It seems like the problem is sometimes actually in
> a "with'd" package a couple levels deeper.  

I don't know why you don't get the file name of the missing subunit.
When I compile this (which was gnatchopped from a file lg.ada)

   generic
   package Lg is
      procedure Foo;
   end Lg;
   package body Lg is
      procedure Foo is separate;
   end Lg;

I get (Linux 3.15p):

   tiamat[3]$ GNAT_PREFIX=/opt/3.15p gnatmake lg.adb
   gcc -c lg.adb
   No code generated for file lg.adb (missing subunits)
   lg.ada:6:04: warning: subunit "Lg.Foo" in file "lg-foo.adb" not found
   gnatmake: "lg.adb" compilation error

You might also get some help from -gnatl:

   tiamat[6]$ GNAT_PREFIX=/opt/3.15p gnatmake lg.adb -gnatl 
   gcc -c -gnatl lg.adb

   GNAT 3.15p  (20020523) Copyright 1992-2002 Free Software Foundation, Inc.

   Compiling: lg.adb (source file time stamp: 2003-08-28 19:19:03)
   No code generated for file lg.adb (missing subunits)

   ==============Error messages for source file: lg.adb
   --------------Line numbers from file: /home/simon/tmp/lg.ada (starting at line 5)
           pragma Source_Reference (000005, "/home/simon/tmp/lg.ada");
        5. package body Lg is
        6.    procedure Foo is separate;
              |
           >>> warning: subunit "Lg.Foo" in file "lg-foo.adb" not found

        7. end Lg;

    4 lines: No errors, 1 warning
   gnatmake: "lg.adb" compilation error



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

end of thread, other threads:[~2003-08-28 19:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-28 18:25 Gnat's "Missing Subunits" Peter Richtmyer
2003-08-28 19:29 ` Simon Wright

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