comp.lang.ada
 help / color / mirror / Atom feed
* Compilation error with GNAT
@ 2004-01-28 19:00 Ben Horowitz
  2004-01-28 21:13 ` Simon Wright
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ben Horowitz @ 2004-01-28 19:00 UTC (permalink / raw)


Hi,

I'm trying to sort through a compilation problem that I'm having with
Gnat.  I have a large set of source files, some of which are spec
only, and some of which have both spec and body.  The file that is
giving me a problem has only a spec.  I am using the XXX.1.ada and
XXX.2.ada naming convention.

I first try to compile this file using gnatmake and the project file
below.  Gnat complains that the file has only a spec, so it can't
generate code.  Later, it reports a compilation error.  The output of
gnatmake and the project file I used are given below.

I thought at first that the problem might be that I needed to use the
-gnatc option to gnat/gcc for the troublesome file.  I tried this (see
the second compilation run below).  Gnatmake now warns that an ALI or
object file is missing after compile.  Gnatmake nonethess goes on,
ending up by reporting a compilation error that seems quite similar to
the first.

What might be causing this problem?  What are the possible fixes?

Of course, one solution would be to give the troublesome file a (more
or less) empty body.  However, I wish to avoid this, as it requires a
large amount of manual labor.

Thanks,
Ben



--------------------------------------------------------------------------------

N:\code\Support\Abstract_Data_Types.ss\reynolds.OIS2.4.3.sol.ada.4.x.x.wrk>gnatmake
-d -Pn:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\adts_win.gpr
-u
completed 1 out of 1 (100%)...
completed 1 out of 1 (100%)...
completed 1 out of 1 (100%)...
completed 1 out of 1 (100%)...
gcc -c -g -gnatf -gnatv -o
n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\obj\win\map_simple_cached_multiple_unbounded_managed_iterator.1.o
-gnatec=n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\obj\win\GNAT-TEMP-000005.TMP
-gnato -fstack-check -gnatE -g -gnatf -gnatv -I- -gnatA -x ada
n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\booch_83\maps\map_simple_cached_multiple_unbounded_managed_iterator.1.ada

GNAT Pro 3.16a1 (20030610) Copyright 1992-2002 Free Software
Foundation, Inc.

Compiling: n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\booch_83\maps\map_simple_cached_multiple_unbounded_managed_iterator.1.ada
(source file time stamp: 1998-08-18 19:36:24)
cannot generate code for file
map_simple_cached_multiple_unbounded_managed_iterator.1.ada (package
spec)
to check package spec for errors, use -gnatc
 54 lines: No errors
completed 1 out of 1 (100%)...
[This is repeated many times...]
completed 1 out of 1 (100%)...
gnatmake: "n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\booch_83\maps\map_simple_cached_multiple_unbounded_managed_iterator.1.ada"
compilation error


Using the following project file:

project Adts_Win is
 
   for Languages use ("ada");
   for Source_Dirs use (".", "Booch_83\maps\", "Booch_83\queues\",
"Booch_83\sorting\", "Booch_83\stacks\", "Booch_83\trees\",
"Booch_83\utilities\", "Booch_95\", "Booch_95\demo\",
"Booch_95\test\", "hash\", "lists\", "queues\", "sets\", "stacks\",
"State_Map_Machine\", "State_Map_Machine\Template\",
"State_Map_Machine\Tests\", "strings\", "test\");
   for Object_Dir use
"N:\code\Support\Abstract_Data_Types.ss\reynolds.OIS2.4.3.sol.ada.4.x.x.wrk\obj\win";
 
   package Naming is
      for Specification_Suffix ("ada") use ".1.ada";
      for Implementation_Suffix ("ada") use ".2.ada";
      for Separate_Suffix use ".2.ada";
      for Casing use "lowercase";
      for Dot_Replacement use ".";
   end Naming;
 
   package Builder is
      for Default_Switches ("ada") use ("-s", "-k", "-g", "-gnatf",
"-gnatv");
   end Builder;
 
   package Compiler is
      for Default_Switches ("ada") use ("-gnato", "-fstack-check",
"-gnatE", "-g", "-gnatf", "-gnatv");
      for Default_Switches ("c") use ("");
      for Default_Switches ("c++") use ("");
   end Compiler;
 
   package Binder is
      for Default_Switches ("ada") use ("-E", "-static");
   end Binder;
 
   package Linker is
      for Default_Switches ("ada") use ("-g");
   end Linker;
 
   package Pretty_Printer is
      for Default_Switches ("ada") use ("");
   end Pretty_Printer;
 
end Adts_Win;


--------------------------------------------------------------------------------



N:\code\Support\Abstract_Data_Types.ss\reynolds.OIS2.4.3.sol.ada.4.x.x.wrk>gnatmake
-d -Pn:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\adts_win.gpr
-u
Warning: using Builder'Default_Switches("Ada"), as there are several
mains
completed 1 out of 1 (100%)...
completed 1 out of 1 (100%)...
completed 1 out of 1 (100%)...
completed 1 out of 1 (100%)...
gcc -c -g -gnatf -gnatv -o
n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\obj\win\map_simple_cached_multiple_unbounded_managed_iterator.1.o
-gnatec=n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\obj\win\GNAT-TEMP-000005.TMP
-gnato -fstack-check -gnatE -g -gnatc -I- -gnatA -x ada
n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\booch_83\maps\map_simple_cached_multiple_unbounded_managed_iterator.1.ada

GNAT Pro 3.16a1 (20030610) Copyright 1992-2002 Free Software
Foundation, Inc.

Checking: n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\booch_83\maps\map_simple_cached_multiple_unbounded_managed_iterator.1.ada
(source file time stamp: 1998-08-18 19:36:24)
 54 lines: No errors
gnatmake: "map_simple_cached_multiple_unbounded_managed_iterator.1.ali"
WARNING: ALI or object file not found after compile

completed 1 out of 1 (100%)...
[This is repeated many times...]
completed 1 out of 1 (100%)...

gnatmake: "n:\code\support\abstract_data_types.ss\reynolds.ois2.4.3.sol.ada.4.x.x.wrk\booch_83\maps\map_simple_cached_multiple_unbounded_managed_iterator.1.ada"
compilation error


Using the following project file:

project Adts_Win is
 
   for Languages use ("ada");
   for Source_Dirs use (".", "Booch_83\maps\", "Booch_83\queues\",
"Booch_83\sorting\", "Booch_83\stacks\", "Booch_83\trees\",
"Booch_83\utilities\", "Booch_95\", "Booch_95\demo\",
"Booch_95\test\", "hash\", "lists\", "queues\", "sets\", "stacks\",
"State_Map_Machine\", "State_Map_Machine\Template\",
"State_Map_Machine\Tests\", "strings\", "test\");
   for Object_Dir use
"N:\code\Support\Abstract_Data_Types.ss\reynolds.OIS2.4.3.sol.ada.4.x.x.wrk\obj\win";
 
   package Naming is
      for Specification_Suffix ("ada") use ".1.ada";
      for Implementation_Suffix ("ada") use ".2.ada";
      for Separate_Suffix use ".2.ada";
      for Casing use "lowercase";
      for Dot_Replacement use ".";
   end Naming;
 
   package Builder is
      for Default_Switches ("ada") use ("-s", "-k", "-g", "-gnatf",
"-gnatv");
      for Switches ("map_simple_cached_multiple_unbounded_managed_iterator.1.ada")
use ("-s", "-k", "-g", "-gnatc");
   end Builder;
 
   package Compiler is
      for Default_Switches ("ada") use ("-gnato", "-fstack-check",
"-gnatE", "-g", "-gnatf", "-gnatv");
      for Default_Switches ("c") use ("");
      for Default_Switches ("c++") use ("");
      for Switches ("map_simple_cached_multiple_unbounded_managed_iterator.1.ada")
use ("-gnato", "-fstack-check", "-gnatE", "-g", "-gnatc");
   end Compiler;
 
   package Binder is
      for Default_Switches ("ada") use ("-E", "-static");
   end Binder;
 
   package Linker is
      for Default_Switches ("ada") use ("-g");
   end Linker;
 
   package Pretty_Printer is
      for Default_Switches ("ada") use ("");
   end Pretty_Printer;
 
end Adts_Win;



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

end of thread, other threads:[~2004-01-29 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-28 19:00 Compilation error with GNAT Ben Horowitz
2004-01-28 21:13 ` Simon Wright
2004-01-28 23:07 ` Dan Eilers
2004-01-29  5:56 ` Per Sandberg
2004-01-29 17:37   ` Dan Eilers

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