comp.lang.ada
 help / color / mirror / Atom feed
* Ada compiler not installed on this system
@ 2004-03-24 16:16 Zouplaz
  2004-03-24 17:18 ` Preben Randhol
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zouplaz @ 2004-03-24 16:16 UTC (permalink / raw)


Hello, I would like to learn ada programming (on a linux system).

I've recently upgraded gcc from 2.96 to 3.3.3 (compiled from source to 
avoid rpm dependancy nightmares)... So this is my "official" gcc compiler.
To setup the ada compiler the easy way seems to install gnat 1.15 binaries.
So, they are now under /usr/gnat/

I've added /usr/gnat/bin after my PATH variable, and gnatmake is alive from 
everywhere.

As you must guess, now I can't compile anything because the gcc binary 
invoked by gnatmake is the 3.3.3 without ada support and not the 2.8.1 
included in /usr/gnat/bin

So :

1) How can I tell gnatmake to use /usr/gnat/bin/gcc instead, without 
modifying my PATH variable each time I want to switch from one language to 
the other
2) Is there a simple method to add ada support to gcc 3.3.3 (I presume that 
--enable-language=ada,c++ is not enough, that would be a dream)

I think a solution for the first option is certainly easier for me (I not a  
configure / make / compile guru !!)

Thank you



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

* Re: Ada compiler not installed on this system
  2004-03-24 16:16 Ada compiler not installed on this system Zouplaz
@ 2004-03-24 17:18 ` Preben Randhol
  2004-03-25  6:55 ` Martin Krischik
  2004-03-26  8:07 ` Harald Korneliussen
  2 siblings, 0 replies; 6+ messages in thread
From: Preben Randhol @ 2004-03-24 17:18 UTC (permalink / raw)


On 2004-03-24, Zouplaz <pouet@pouet.com> wrote:
> So :
>
> 1) How can I tell gnatmake to use /usr/gnat/bin/gcc instead, without 
> modifying my PATH variable each time I want to switch from one language to 
> the other

Use gnatfe that you can find here:

   http://www.pogner.demon.co.uk/gnatfe/

-- 
Preben Randhol -------- http://www.pvv.org/~randhol/

()  "Violence is the last refuge of the incompetent"
/\                                   - Isaac Asimov



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

* Re: Ada compiler not installed on this system
  2004-03-24 16:16 Ada compiler not installed on this system Zouplaz
  2004-03-24 17:18 ` Preben Randhol
@ 2004-03-25  6:55 ` Martin Krischik
  2004-03-25 14:06   ` Georg Bauhaus
  2004-03-26  8:07 ` Harald Korneliussen
  2 siblings, 1 reply; 6+ messages in thread
From: Martin Krischik @ 2004-03-25  6:55 UTC (permalink / raw)


Zouplaz wrote:

> 2) Is there a simple method to add ada support to gcc 3.3.3 (I presume
> that --enable-language=ada,c++ is not enough, that would be a dream)

function Configure_And_Compile ()
    {
        local -r in_Dir=${1};
        local -r in_Config=${2};

        pushd ${in_Dir}/${in_Config};

                find    "." \
                                -name "config.cache"                    \
                                -exec "rm" "--verbose" '{}' ';' ;

                ../gcc/configure                                         \
                        --prefix=/opt/ada                                 \
                        --enable-libada                                   \
                        --enable-shared                                   \
                        --enable-threads=gnat                           \
                        --enable-languages=ada,c,f77,c++        \
                        --target=${in_Config}                           ;

                make -j8 | tee ../compile.${in_Config}.log;

                make -C gcc gnatlib_and_tools;
        popd;

        return;
        }

Does the trick for me. Never install into the directory where your
distribution have there compiler installed!

With Regards

Martin
-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




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

* Re: Ada compiler not installed on this system
  2004-03-25  6:55 ` Martin Krischik
@ 2004-03-25 14:06   ` Georg Bauhaus
  2004-03-25 19:39     ` Martin Krischik
  0 siblings, 1 reply; 6+ messages in thread
From: Georg Bauhaus @ 2004-03-25 14:06 UTC (permalink / raw)


Martin Krischik <krischik@users.sourceforge.net> wrote:
: Zouplaz wrote:
: 
:> 2) Is there a simple method to add ada support to gcc 3.3.3 (I presume
:> that --enable-language=ada,c++ is not enough, that would be a dream)
: 
: 
:                ../gcc/configure                                         \
:                        --prefix=/opt/ada                                 \
:                        --enable-libada                                   \

Is libada present in GCC 3.3.3 (which seems to be the OP's compiler)?

:                        --enable-shared                                   \
:                        --enable-threads=gnat                           \

Might mean no tasking outside Ada.

:                        --enable-languages=ada,c,f77,c++        \

depending on other issues, this combination might or might not
be supported, as configure says. If it works, good.

:                        --target=${in_Config}                           ;
: 
:                make -j8 | tee ../compile.${in_Config}.log;

Does the parallel make work for GCCC 3.3.3? If so, has there
been an update to the documentation (which says otherwise)?
"Currently, when compiling the Ada front end, you cannot use the parallel
build feature described in the previous section."




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

* Re: Ada compiler not installed on this system
  2004-03-25 14:06   ` Georg Bauhaus
@ 2004-03-25 19:39     ` Martin Krischik
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Krischik @ 2004-03-25 19:39 UTC (permalink / raw)


Georg Bauhaus wrote:

Thank you for your comments. On never stops learning somthing new

> Martin Krischik <krischik@users.sourceforge.net> wrote:
> : Zouplaz wrote:
> : 
> :> 2) Is there a simple method to add ada support to gcc 3.3.3 (I presume
> :> that --enable-language=ada,c++ is not enough, that would be a dream)
> : 
> : 
> :                ../gcc/configure                                        
> :                \
> :                        --prefix=/opt/ada                                
> :                        \
> :                        --enable-libada                                  
> :                        \
> 
> Is libada present in GCC 3.3.3 (which seems to be the OP's compiler)?

True, I forgot to mention that I compile 3.4 and 3.5.

> :                        --enable-shared                                  
> :                        \
> :                        --enable-threads=gnat                           \
> 
> Might mean no tasking outside Ada.

That's fine for me. Still good to know.
 
> :                        --target=${in_Config}                           ;
> : 
> :                make -j8 | tee ../compile.${in_Config}.log;
> 
> Does the parallel make work for GCCC 3.3.3? If so, has there
> been an update to the documentation (which says otherwise)?
> "Currently, when compiling the Ada front end, you cannot use the parallel
> build feature described in the previous section."

There is no -j8 in the line which you cut:

makeᅵ-Cᅵgccᅵgnatlib_and_tools;

Mind you, that extra make is not needed for 3.5 any more.

With Regards

Martin
-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




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

* Re: Ada compiler not installed on this system
  2004-03-24 16:16 Ada compiler not installed on this system Zouplaz
  2004-03-24 17:18 ` Preben Randhol
  2004-03-25  6:55 ` Martin Krischik
@ 2004-03-26  8:07 ` Harald Korneliussen
  2 siblings, 0 replies; 6+ messages in thread
From: Harald Korneliussen @ 2004-03-26  8:07 UTC (permalink / raw)


Zouplaz <pouet@pouet.com> wrote in message news:<Xns94B6AF58127B3Zoupla@212.27.42.69>...
> Hello, I would like to learn ada programming (on a linux system).
> 
> I've recently upgraded gcc from 2.96 to 3.3.3 (compiled from source to 
> avoid rpm dependancy nightmares)
Are you on Suse, Redhat, Conectiva, Mandrake or something else? Having
installed GNAT from source on a redhat system, I can say that was a
lot more difficult than just typing "urpmi gnat" in my current
mandrake system :-)

If there are gnat packages for your distro, I really, really suggest
you use them. Compiling from source doesn't solve dependency
nightmares, it creates them: if you try to install an ada program from
an RPM package now (not that I know of any...sigh) you _will_ get
complaints about missing gnat packages.



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

end of thread, other threads:[~2004-03-26  8:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-24 16:16 Ada compiler not installed on this system Zouplaz
2004-03-24 17:18 ` Preben Randhol
2004-03-25  6:55 ` Martin Krischik
2004-03-25 14:06   ` Georg Bauhaus
2004-03-25 19:39     ` Martin Krischik
2004-03-26  8:07 ` Harald Korneliussen

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