From: Simon Wright <simon@pushface.org>
Subject: Re: Gnat's "Missing Subunits"
Date: 28 Aug 2003 20:29:31 +0100
Date: 2003-08-28T20:29:31+01:00 [thread overview]
Message-ID: <x7vu181fun8.fsf@smaug.pushface.org> (raw)
In-Reply-To: 1b585154.0308281025.28fd1e8a@posting.google.com
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
prev parent reply other threads:[~2003-08-28 19:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-28 18:25 Gnat's "Missing Subunits" Peter Richtmyer
2003-08-28 19:29 ` Simon Wright [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox