* Help installing GNAT 3.15p on a linux machine
@ 2005-01-20 3:51 Beau Elliott
2005-01-20 4:21 ` Cephus®
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Beau Elliott @ 2005-01-20 3:51 UTC (permalink / raw)
Can anyone help me with my install of GNAT 3.15p. I downloaded the
linux version from http://libre.act-europe.fr/GNAT/
I then used:
gunzip -c gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz | tar xf -
I then used the doconfig (using option 2) script to create the
doinstall file.
Once I did this, I ran the doinstall file and it finished.
I then wrote a hello world program to test it out,
I typed:
gcc -c hello.adb
and then I got an error saying: Ada compiler not installed on this
system.
Can anyone help me fix this problem? I know this is not necessarily a
Ada problem, but I assume some of you use linux and probably use this
compiler so maybe some of you can help me solve my problem. I would
really like to use Ada in a linux environment. Thanks in advance!
Beau
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 3:51 Help installing GNAT 3.15p on a linux machine Beau Elliott
@ 2005-01-20 4:21 ` Cephus®
2005-01-20 9:15 ` Martin Krischik
2005-01-20 8:23 ` Duncan Sands
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Cephus® @ 2005-01-20 4:21 UTC (permalink / raw)
I think I have figured out the problem... I have gcc (version
3.3.4-3tr) installed in /usr/bin
Now the option 2 in the doconfig installs everything in the /usr/gnat/
folder. So when I type: gcc -- it uses the gcc in the /usr/bin
My question is if I choose option 3 and state to install everything in
the /usr/bin folder, will that screw everything up (say my g++
compiler)?
Thanks guys!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 3:51 Help installing GNAT 3.15p on a linux machine Beau Elliott
2005-01-20 4:21 ` Cephus®
@ 2005-01-20 8:23 ` Duncan Sands
2005-01-20 8:32 ` Bobby D. Bryant
2005-01-20 22:22 ` f
3 siblings, 0 replies; 10+ messages in thread
From: Duncan Sands @ 2005-01-20 8:23 UTC (permalink / raw)
To: comp.lang.ada; +Cc: Beau Elliott
> I typed:
>
> gcc -c hello.adb
>
> and then I got an error saying: Ada compiler not installed on this
> system.
You have to add /usr/gnat/bin to your $PATH. This is explained at
the end of the installation. As you discovered, it's easy not to
notice!
Ciao,
Duncan.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 3:51 Help installing GNAT 3.15p on a linux machine Beau Elliott
2005-01-20 4:21 ` Cephus®
2005-01-20 8:23 ` Duncan Sands
@ 2005-01-20 8:32 ` Bobby D. Bryant
2005-01-20 22:22 ` f
3 siblings, 0 replies; 10+ messages in thread
From: Bobby D. Bryant @ 2005-01-20 8:32 UTC (permalink / raw)
On Thu, 20 Jan 2005, "Beau Elliott" <beau.elliott@gmail.com> wrote:
> Can anyone help me with my install of GNAT 3.15p. I downloaded the
> linux version from http://libre.act-europe.fr/GNAT/
>
> I then used:
> gunzip -c gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz | tar xf -
What distribution are you using? There may be an easier way...
--
Bobby Bryant
Austin, Texas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 4:21 ` Cephus®
@ 2005-01-20 9:15 ` Martin Krischik
2005-01-20 15:00 ` Cephus®
0 siblings, 1 reply; 10+ messages in thread
From: Martin Krischik @ 2005-01-20 9:15 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]
Cephusᅵ wrote:
> I think I have figured out the problem... I have gcc (version
> 3.3.4-3tr) installed in /usr/bin
>
> Now the option 2 in the doconfig installs everything in the /usr/gnat/
> folder. So when I type: gcc -- it uses the gcc in the /usr/bin
>
> My question is if I choose option 3 and state to install everything in
> the /usr/bin folder, will that screw everything up (say my g++
> compiler)?
No!!!! don't do that. Install in /usr/gnat or /opt/ada or any other empty
directory.
You can use a script file to setup you path. I attached mine as example.
Note the:
if [[ (${USER} != root) && (-z ${_ada_bash_} ) ]] ; then
in the first line. The root user should use the compiler which came with
your Linux.
My setup batch is of corse more complex then needed. The realy important
lines are:
declare -x GNAT_Path=/opt/ada
PATH=${GNAT_Path}/bin:${PATH}
PATH=.:${PATH}
With Regards
Martin
--
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com
[-- Attachment #2: ada.bash --]
[-- Type: text/plain, Size: 4633 bytes --]
if [[ (${USER} != root) && (-z ${_ada_bash_} ) ]] ; then
declare -r _ada_bash_=loaded
echo "Set Ada Environment"
declare -x ADA_INCLUDE_PATH
declare -x ADA_OBJECTS_PATH
declare -x ADA_PROJECT_PATH
# declare -x LD_RUN_PATH
# declare -x LD_LIBRARY_PATH
declare -x GNATSRC
declare -x ADABROWSE_GCC_LIB
declare -x ADABROWSE_GNATSRC
declare -x CLASSPATH
declare -x PS1
declare -x LD_LIBRARY_PATH
declare -x CVS_RSH
declare -x CVSROOT
declare -x PATH
declare -x INFODIR
declare -x INFOPATH
declare -x GNATSRC=/work/gnu_3.4/gcc/gcc/ada
declare -x Charles_Path=/work/ada/charles/src
declare -x BC_Path=/work/ada/bc-20040319
declare -x AdaCL_Path=/work/${USER}/sf/adacl
declare -x GNAT_Path=/opt/ada
declare -x XMLADA_Path=${GNAT_Path}/include/xmlada
declare -x PolyORB_Path=${GNAT_Path}/include/polyorb
declare -x ASIS_DIR=${GNAT_Path}/include/asis
declare -x KALYPTUS=/work/ada/kde/kdebindings/kalyptus
#
# determine current target mashine
#
declare -r Target=$(gcc -dumpmachine);
case "${Target}" in
"x86_64-unknown-linux-gnu")
#
# Generate position-independent code if possible
#
declare -x CFLAGS="-fPIC -DPIC"
declare -x CPPFLAGS="-DPIC"
declare -x CXXFLAGS="-fPIC -DPIC"
declare -x ADAFLAGS="-fPIC -DPIC"
declare -x ADA_CFLAGS="-fPIC -DPIC"
;;
esac ;
# declare -x -r LARCH_PATH=/opt/ada/share/splint/lib
CLASSPATH=.
ADA_INCLUDE_PATH=.
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${BC_Path}
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${Charles_Path}
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${XMLADA_Path}/xmlada
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${ASIS_DIR}
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${GNAT_Path}/include/florist
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/corba
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/corba/cos
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/corba/messaging
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/corba/portableinterceptor
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/corba/rtcorba
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/dsa
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/moma
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/giop
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/giop/diop
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/giop/iiop
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/giop/miop
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/soap
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/web_common
ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:${PolyORB_Path}/srp
# ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:/opt/ada/lib/garlic
ADA_OBJECTS_PATH=.
ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${GNAT_Path}/include/bc/Linux-Object
ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${GNAT_Path}/include/xmlada
ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${GNAT_Path}/include/asis
ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${GNAT_Path}/include/florist
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/corba
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/corba/cos
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/corba/messaging
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/corba/portableinterceptor
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/corba/rtcorba
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/dsa
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/moma
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/giop
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/giop/diop
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/giop/iiop
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/giop/miop
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/soap
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/web_common
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:${PolyORB_Path}/srp
# ADA_OBJECTS_PATH=${ADA_OBJECTS_PATH}:/opt/ada/lib/garlic
ADA_PROJECT_PATH=.
ADA_PROJECT_PATH=${ADA_PROJECT_PATH}:..
ADA_PROJECT_PATH=${ADA_PROJECT_PATH}:../..
ADA_PROJECT_PATH=${ADA_PROJECT_PATH}:Scripts
# LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GNAT_Path}/lib
# LD_RUN_PATH=${LD_RUN_PATH}:${GNAT_Path}/lib
INFODIR=${GNAT_Path}/info:${INFODIR}
INFODIR=${GNAT_Path}/doc/gps/info:${INFODIR}
INFOPATH=${GNAT_Path}/info:${INFOPATH}
INFOPATH=${GNAT_Path}/doc/gps/info:${INFOPATH}
PATH=${GNAT_Path}/bin:${PATH}
PATH=.:${PATH}
ADABROWSE_GCC_LIB=${GNAT_Path}/lib/gcc/i686-pc-linux-gnu/3.4.3/adainclude
ADABROWSE_GNATSRC=/work/gnu_3.3/gcc/gcc/ada
alias gps='/opt/ada/bin/gps'
fi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 9:15 ` Martin Krischik
@ 2005-01-20 15:00 ` Cephus®
2005-01-20 15:11 ` Duncan Sands
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Cephus® @ 2005-01-20 15:00 UTC (permalink / raw)
I am running TSL version 2.2
I can compile an Ada program by using:
/usr/gnat/bin/gcc -c hello.adb
but, I can't create the object program when I try this:
/usr/gnat/bin/gcc -c hello.adb
/usr/gnat/bin/gnatmake hello.adb
I get the error:
gnatbind -x hello.ali
gnatmake: error, unable to locate gnatbind
Now I have looked and gnatbind is located in the /usr/gnat/bin folder.
Anyone have any ideas what is going on?
I even try to do it the long way by doing:
/usr/gnat/bin/gcc -c hello.adb <--works
/usr/gnat/bin/gnatbind hello <--works
/usr/gnat/bin/gnatlink hello <--Error
Error Message:
gcc: b~hello.adb: Ada compiler not installed on this system
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 15:00 ` Cephus®
@ 2005-01-20 15:11 ` Duncan Sands
2005-01-20 15:29 ` Ole-Hjalmar Kristensen
2005-01-20 16:52 ` Martin Krischik
2 siblings, 0 replies; 10+ messages in thread
From: Duncan Sands @ 2005-01-20 15:11 UTC (permalink / raw)
To: comp.lang.ada; +Cc: Cephus®
> Anyone have any ideas what is going on?
Add /usr/gnat/bin to the front of your $PATH.
D.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 15:00 ` Cephus®
2005-01-20 15:11 ` Duncan Sands
@ 2005-01-20 15:29 ` Ole-Hjalmar Kristensen
2005-01-20 16:52 ` Martin Krischik
2 siblings, 0 replies; 10+ messages in thread
From: Ole-Hjalmar Kristensen @ 2005-01-20 15:29 UTC (permalink / raw)
You probably need to do something like the following:
setenv PATH /usr/gnat/bin:$PATH
rehash
I assume you already have another gcc on your system, and that the
error message
"gcc: b~hello.adb: Ada compiler not installed on this system"
is coming from that one.
BTW., gnatmake hello should be sufficient to compile and link your
program, no need to start gcc explicitly.
>>>>> "C" == Cephus� <beau.elliott@gmail.com> writes:
C> I am running TSL version 2.2
C> I can compile an Ada program by using:
C> /usr/gnat/bin/gcc -c hello.adb
C> but, I can't create the object program when I try this:
C> /usr/gnat/bin/gcc -c hello.adb
C> /usr/gnat/bin/gnatmake hello.adb
C> I get the error:
C> gnatbind -x hello.ali
C> gnatmake: error, unable to locate gnatbind
C> Now I have looked and gnatbind is located in the /usr/gnat/bin folder.
C> Anyone have any ideas what is going on?
C> I even try to do it the long way by doing:
C> /usr/gnat/bin/gcc -c hello.adb <--works
C> /usr/gnat/bin/gnatbind hello <--works
C> /usr/gnat/bin/gnatlink hello <--Error
C> Error Message:
C> gcc: b~hello.adb: Ada compiler not installed on this system
--
C++: The power, elegance and simplicity of a hand grenade.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 15:00 ` Cephus®
2005-01-20 15:11 ` Duncan Sands
2005-01-20 15:29 ` Ole-Hjalmar Kristensen
@ 2005-01-20 16:52 ` Martin Krischik
2 siblings, 0 replies; 10+ messages in thread
From: Martin Krischik @ 2005-01-20 16:52 UTC (permalink / raw)
Cephusᅵ wrote:
> I am running TSL version 2.2
>
> I can compile an Ada program by using:
> /usr/gnat/bin/gcc -c hello.adb
>
> but, I can't create the object program when I try this:
> /usr/gnat/bin/gcc -c hello.adb
> /usr/gnat/bin/gnatmake hello.adb
>
> I get the error:
> gnatbind -x hello.ali
> gnatmake: error, unable to locate gnatbind
>
> Now I have looked and gnatbind is located in the /usr/gnat/bin folder.
> Anyone have any ideas what is going on?
I allready told you:
ᅵᅵᅵᅵᅵᅵᅵᅵPATH=/usr/gnat/bin:${PATH}
But only for normal users and not for root.
With Regards
Martin
--
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Help installing GNAT 3.15p on a linux machine
2005-01-20 3:51 Help installing GNAT 3.15p on a linux machine Beau Elliott
` (2 preceding siblings ...)
2005-01-20 8:32 ` Bobby D. Bryant
@ 2005-01-20 22:22 ` f
3 siblings, 0 replies; 10+ messages in thread
From: f @ 2005-01-20 22:22 UTC (permalink / raw)
On Wed, 19 Jan 2005 19:51:49 -0800, Beau Elliott wrote:
> Can anyone help me with my install of GNAT 3.15p. I downloaded the
> linux version from http://libre.act-europe.fr/GNAT/
>
> I then used:
> gunzip -c gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz | tar xf -
>
> I then used the doconfig (using option 2) script to create the
> doinstall file.
>
> Once I did this, I ran the doinstall file and it finished.
>
> I then wrote a hello world program to test it out,
>
> I typed:
>
> gcc -c hello.adb
>
> and then I got an error saying: Ada compiler not installed on this
> system.
>
> Can anyone help me fix this problem? I know this is not necessarily a
> Ada problem, but I assume some of you use linux and probably use this
> compiler so maybe some of you can help me solve my problem. I would
> really like to use Ada in a linux environment. Thanks in advance!
I haven't read any other replies so I apologize if this is a repeat:
gcc a front end to the compilers, g++, etc.
If you haven't rebuilt gcc to include ada support, you cannot expect gcc
to compile your ada files for you. You want to use gnatmake (try typing
gnat<TAB> in your shell and you should see all possible completions)
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-01-20 22:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-20 3:51 Help installing GNAT 3.15p on a linux machine Beau Elliott
2005-01-20 4:21 ` Cephus®
2005-01-20 9:15 ` Martin Krischik
2005-01-20 15:00 ` Cephus®
2005-01-20 15:11 ` Duncan Sands
2005-01-20 15:29 ` Ole-Hjalmar Kristensen
2005-01-20 16:52 ` Martin Krischik
2005-01-20 8:23 ` Duncan Sands
2005-01-20 8:32 ` Bobby D. Bryant
2005-01-20 22:22 ` f
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox