comp.lang.ada
 help / color / mirror / Atom feed
* gnat-gpl-2007: mlib-tgt problem
@ 2007-05-24 15:05 george
  2007-05-24 16:18 ` Martin Krischik
  0 siblings, 1 reply; 4+ messages in thread
From: george @ 2007-05-24 15:05 UTC (permalink / raw)


Hi all.

A question to everybody who tried building gnat-gpl-2007 (from
source). I am hitting a problem when (seemingly) the lib is built:

../../xgcc -B../../ -c -march=athlon64 -O2 -pipe -fomit-frame-pointer -
W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-gnatpg -gnata -I- -I../rts -I. -I/var/tmp/portage/dev-lang/gnat-
gpl-4.1.3.2007/work/gcc-4.1.3/gcc/ada
mlib-tgt.adb -o mlib-tgt.o
mlib-tgt.adb:36:22: warning: file name does not match unit name,
should
be "mlib-tgt-specific.adb"
make[4]: *** [mlib-tgt.o] Error 1
make[4]: Leaving directory
`/var/tmp/portage/dev-lang/gnat-gpl-4.1.3.2007/work/build/gcc/ada/
tools'

form what I was able to see in the code, the mlib-tgt.adb itself is a
"stub" body which is supposed to be replaced by the OS specific
version during the compilation. And this works fine with gcc-4.2.0 or
other versions of gcc or even gnat-gpl-2006. However this has changed
in the latest version of gnat. Now the substituted body mlib-tgt-
linux.adb has "package Mlib.Tgt.Specific;" (while previously it had
simply "package Mlib.Tgt;") which seems to cause this warning that, in
turn, (because of the rtl being compiled with -gnatpg) causes the
build to fail. This happens even though mlib-tgt.adb has a pragma
turning warnings off. The particular lines look like this:

with MLib.Tgt.Specific;
pragma Warnings (Off, MLib.Tgt.Specific);
--  MLib.Tgt.Specific is with'ed only for elaboration purposes

package body MLib.Tgt is

with mlib-tgt-specific.ads missing and instead mlib-tgt.ads defining
bunch of methods that are only implemented in mlib-tgt-"OS".adb (but
some in mlib-tgt.adb proper).  I must admit I don't recognize this
elaboration scheme, I wasn't aware collating methods like this is
legal - shouldn't the methods of the parent be implemented in the
parent, not in an arbitrary child?. Is this a gnat specific feature or
did I overlook something?

Anyway, the main question I have is whether anybody had this problem
while trying to build gnat-gpl-2007 and how can I go past it? I tried
enhancing pragma Warnings to a full Off or adding it to the mlib-tgt-
linux as well or even overwriting mlib-tgt.adb with mlib-tgt-linux.adb
(what seemed to have been done in prior versions). All of this fails
with various complaints (turning off warnings gets ignored and
replacing the body causes complaints about missing implementation of
some methods).
Thanks for any insight!

George




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

* Re: gnat-gpl-2007: mlib-tgt problem
  2007-05-24 15:05 gnat-gpl-2007: mlib-tgt problem george
@ 2007-05-24 16:18 ` Martin Krischik
  2007-05-24 20:17   ` george
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Krischik @ 2007-05-24 16:18 UTC (permalink / raw)


george@gentoo.org wrote:

> Hi all.
> 
> A question to everybody who tried building gnat-gpl-2007 (from
> source). I am hitting a problem when (seemingly) the lib is built:

May I offer you a little extract from gnat.spec - the file I used to create
GNAT/GPL for the GNAT Ada Project:

        if test "%{Gnat_edition_uppercase}" = "GPL"; then
                #
                #       Strange Error in GNAT/GPL 2007 need even stranger
fix
                #
                set +o errexit
                if ! %{__make}; then
                        pushd "gcc/ada/tools";
                                %{__mv} mlib-tgt.adb mlib-tgt-specific.adb
                        popd;
                        set -o errexit
                        %{__make};
                fi;
        else
                %{__make};
        fi;

Martin

--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



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

* Re: gnat-gpl-2007: mlib-tgt problem
  2007-05-24 16:18 ` Martin Krischik
@ 2007-05-24 20:17   ` george
  2007-05-25 17:15     ` george
  0 siblings, 1 reply; 4+ messages in thread
From: george @ 2007-05-24 20:17 UTC (permalink / raw)



Martin Krischik wrote:
> May I offer you a little extract from gnat.spec - the file I used to create
> GNAT/GPL for the GNAT Ada Project:
Thanks! That seems to have worked.
Now I only need to figure out if I can fix this without resorting to
rerunning make :).

George




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

* Re: gnat-gpl-2007: mlib-tgt problem
  2007-05-24 20:17   ` george
@ 2007-05-25 17:15     ` george
  0 siblings, 0 replies; 4+ messages in thread
From: george @ 2007-05-25 17:15 UTC (permalink / raw)


Ok, found it.
The offender was the gcc-4.1.3/gnattools/configure.in. Just sed
through it replacing mlib-tgt.adb with mlib-tgt-specific.tgt and
(re)run autoconf (looks like it was not updated when ACT split the
mlib-tgt sources). This should allow uninterrupted make bootstrap. The
corrected sources (there were also issues with version.c, as usual),
with the ada directtory copied over and relevant patch applied (as per
ACT's standard build procedure) can be found here:
http://dev.gentoo.org/~george/src/gcc-branch-4.1.3.tar.bz2

On a related note: gnat-gpl-4.1.2.2007 has just been added to Gentoo
repository :).

George




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

end of thread, other threads:[~2007-05-25 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-24 15:05 gnat-gpl-2007: mlib-tgt problem george
2007-05-24 16:18 ` Martin Krischik
2007-05-24 20:17   ` george
2007-05-25 17:15     ` george

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