comp.lang.ada
 help / color / mirror / Atom feed
* cannot generate code for file a-excach.adb (subunit)
@ 2009-01-27 14:21 Lucretia
  2009-01-27 14:38 ` xavier grave
  0 siblings, 1 reply; 7+ messages in thread
From: Lucretia @ 2009-01-27 14:21 UTC (permalink / raw)


Hi,

In my attempts to enable exceptions in my test kernel, I've come
across a problem when building up my configurable runtime.

x86_64-unknown-elf-gcc -fno-pic -c -nostdinc -I. -ffunction-sections -
fdata-sections -gnato -gnatE -m32 -g2 -gnatf -gnatu -gnatv -gnatpg a-
excach.adb

GNAT 4.3.0
Copyright 1992-2007, Free Software Foundation, Inc.

Unit name                        File name                     Time
stamp
---------                        ---------
----------

Ada (spec)                       ada.ads
20070406091342
Ada.Exceptions (spec)            a-except.ads
20070606104609
Ada.Exceptions (body)            a-except.adb
20071213102130
Ada.Exceptions.Call_Chain (body) a-excach.adb
20051115140645
Ada.Unchecked_Conversion (spec)  a-unccon.ads
20070406091342
System (spec)                    system.ads
20090127135815
System.Exceptions (spec)         s-except.ads
20070912115821
System.Parameters (spec)         s-parame.ads
20090127133535
System.Soft_Links (spec)         s-soflin.ads
20071213103411
System.Stack_Checking (spec)     s-stache.ads
20070912115821
System.Standard_Library (spec)   s-stalib.ads
20070912115821
System.Storage_Elements (spec)   s-stoele.ads
20070912115821
System.Traceback (spec)          s-traceb.ads
20070912115821
System.Traceback_Entries (spec)  s-traent.ads
20070912115821
System.Wch_Con (spec)            s-wchcon.ads
20071213102052
System.Wch_Stw (spec)            s-wchstw.ads
20071213102130

cannot generate code for file a-excach.adb (subunit)
to check subunit for errors, use -gnatc

Compiling: a-excach.adb (source file time stamp: 2005-11-15 14:06:45)
 76 lines: No errors
make: *** [a-excach.o] Error 1

Compiling it with -gnatc returns no errors. I'm confused as to why it
won't compile properly.

Thanks,
Luke.



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

* Re: cannot generate code for file a-excach.adb (subunit)
  2009-01-27 14:21 cannot generate code for file a-excach.adb (subunit) Lucretia
@ 2009-01-27 14:38 ` xavier grave
  2009-01-27 17:15   ` Ludovic Brenta
  2009-01-27 18:13   ` Lucretia
  0 siblings, 2 replies; 7+ messages in thread
From: xavier grave @ 2009-01-27 14:38 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You need to include excach.adb source file but it is part of the
Ada.Exceptions package and is compiled when you compile a-except.adb
so you don't need to compile it.

As far as I remember...
xavier

Lucretia a �crit :
> Hi,
> 
> In my attempts to enable exceptions in my test kernel, I've come
> across a problem when building up my configurable runtime.
> 
> x86_64-unknown-elf-gcc -fno-pic -c -nostdinc -I. -ffunction-sections -
> fdata-sections -gnato -gnatE -m32 -g2 -gnatf -gnatu -gnatv -gnatpg a-
> excach.adb
> 
> GNAT 4.3.0
> Copyright 1992-2007, Free Software Foundation, Inc.
> 
> Unit name                        File name                     Time
> stamp
> ---------                        ---------
> ----------
> 
> Ada (spec)                       ada.ads
> 20070406091342
> Ada.Exceptions (spec)            a-except.ads
> 20070606104609
> Ada.Exceptions (body)            a-except.adb
> 20071213102130
> Ada.Exceptions.Call_Chain (body) a-excach.adb
> 20051115140645
> Ada.Unchecked_Conversion (spec)  a-unccon.ads
> 20070406091342
> System (spec)                    system.ads
> 20090127135815
> System.Exceptions (spec)         s-except.ads
> 20070912115821
> System.Parameters (spec)         s-parame.ads
> 20090127133535
> System.Soft_Links (spec)         s-soflin.ads
> 20071213103411
> System.Stack_Checking (spec)     s-stache.ads
> 20070912115821
> System.Standard_Library (spec)   s-stalib.ads
> 20070912115821
> System.Storage_Elements (spec)   s-stoele.ads
> 20070912115821
> System.Traceback (spec)          s-traceb.ads
> 20070912115821
> System.Traceback_Entries (spec)  s-traent.ads
> 20070912115821
> System.Wch_Con (spec)            s-wchcon.ads
> 20071213102052
> System.Wch_Stw (spec)            s-wchstw.ads
> 20071213102130
> 
> cannot generate code for file a-excach.adb (subunit)
> to check subunit for errors, use -gnatc
> 
> Compiling: a-excach.adb (source file time stamp: 2005-11-15 14:06:45)
>  76 lines: No errors
> make: *** [a-excach.o] Error 1
> 
> Compiling it with -gnatc returns no errors. I'm confused as to why it
> won't compile properly.
> 
> Thanks,
> Luke.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl/HIMACgkQVIZi0A5BZF54lACfc5F2dF6qW6WJarlqrDDI19cE
/3QAn03PIsifQjamX13o50FCBZmpy00R
=sx51
-----END PGP SIGNATURE-----



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

* Re: cannot generate code for file a-excach.adb (subunit)
  2009-01-27 14:38 ` xavier grave
@ 2009-01-27 17:15   ` Ludovic Brenta
  2009-01-27 17:19     ` Lucretia
  2009-01-27 18:13   ` Lucretia
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Brenta @ 2009-01-27 17:15 UTC (permalink / raw)


The error message from GNAT is because Ada.Exceptions.Call_Chain is a
separate subprogram which is really part of the package
Ada.Exceptions; it is a subunit, not a child unit. GNAT refuses to
compile separate units separately; it will compile separate units when
it compiles their enclosing unit.

What this boils down to is:

gnatmake a-excach.adb

gives the error "cannot generate code for file a-excach.adb (subunit)"

gnatmake a-except.adb

compiles both a-except.adb and a-excach.adb into one object file, a-
except.o.

--
Ludovic Brenta.



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

* Re: cannot generate code for file a-excach.adb (subunit)
  2009-01-27 17:15   ` Ludovic Brenta
@ 2009-01-27 17:19     ` Lucretia
  2009-01-27 17:24       ` Lucretia
  0 siblings, 1 reply; 7+ messages in thread
From: Lucretia @ 2009-01-27 17:19 UTC (permalink / raw)


Yup, thanks, I had actually got this sorted, just forgot to cancel
this message.

A definite, doh! moment.

I'm now having trouble trying to link against my runtime:

$ make
x86_64-unknown-elf-gnatbind -n --RTS=./rts mb_start.ali
error: "ada.ads" must be recompiled ("system.ads" has been modified)
error: "ada.ads" and "mb_start.adb" compiled with different exception
handling mechanisms
make: *** [b~mb_start.adb] Error 5

Where ./rts contains adainclude and adalib.

Luke.



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

* Re: cannot generate code for file a-excach.adb (subunit)
  2009-01-27 17:19     ` Lucretia
@ 2009-01-27 17:24       ` Lucretia
  0 siblings, 0 replies; 7+ messages in thread
From: Lucretia @ 2009-01-27 17:24 UTC (permalink / raw)


On Jan 27, 5:19 pm, Lucretia <lucret...@lycos.co.uk> wrote:

> I'm now having trouble trying to link against my runtime:

I was supplying -nostdlib/inc as well as --RTS, when I only needed --
RTS.

Just link errors to sort out now!

Luke.



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

* Re: cannot generate code for file a-excach.adb (subunit)
  2009-01-27 14:38 ` xavier grave
  2009-01-27 17:15   ` Ludovic Brenta
@ 2009-01-27 18:13   ` Lucretia
  2009-01-27 22:43     ` xavier grave
  1 sibling, 1 reply; 7+ messages in thread
From: Lucretia @ 2009-01-27 18:13 UTC (permalink / raw)


On Jan 27, 2:38 pm, xavier grave <xavier.gr...@ipno.in2p3.fr> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> You need to include excach.adb source file but it is part of the
> Ada.Exceptions package and is compiled when you compile a-except.adb
> so you don't need to compile it.

Do you have any hints how to go about compiling raise-gcc.c? Or have
you hacked a version specific to your runtime?

Luke.



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

* Re: cannot generate code for file a-excach.adb (subunit)
  2009-01-27 18:13   ` Lucretia
@ 2009-01-27 22:43     ` xavier grave
  0 siblings, 0 replies; 7+ messages in thread
From: xavier grave @ 2009-01-27 22:43 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lucretia a �crit :
> On Jan 27, 2:38 pm, xavier grave <xavier.gr...@ipno.in2p3.fr> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> You need to include excach.adb source file but it is part of the
>> Ada.Exceptions package and is compiled when you compile a-except.adb
>> so you don't need to compile it.
> 
> Do you have any hints how to go about compiling raise-gcc.c? Or have
> you hacked a version specific to your runtime?

You should have a look (using viewMTN for example, see the post from
Ludovic) to the lovelace makefiles. In order to ease my life I'm
compiling locally and partially gnat and then I just need to take some
.o I need, for example raise-gcc.o

hope it will help, xavier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl/jf4ACgkQVIZi0A5BZF6RFgCdFKnhba0nidlYk3TNFFRvDdC4
bdUAmwTJ/dEV6RqoyIoKPGR4jVayJhcn
=Tt8/
-----END PGP SIGNATURE-----



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

end of thread, other threads:[~2009-01-27 22:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-27 14:21 cannot generate code for file a-excach.adb (subunit) Lucretia
2009-01-27 14:38 ` xavier grave
2009-01-27 17:15   ` Ludovic Brenta
2009-01-27 17:19     ` Lucretia
2009-01-27 17:24       ` Lucretia
2009-01-27 18:13   ` Lucretia
2009-01-27 22:43     ` xavier grave

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