Main Page | Report Page

 

  Computers Forum Index » Computer Languages (ADA) » trying to compile gnat

Author Message
Schüle Daniel
Posted: Sat May 27, 2006 6:13 pm
 
Hello

I am failing to compile gnat
the compilation goes fine but no gnatmake is generated
I was trying different gcc releases

gcc-3.2.tar.bz2
gcc-3.3.4.tar.bz2
gcc-3.4.0.tar.bz2
gcc-4.1.1.tar.bz2

tar xjf gcc-4.1.1.tar.bz2
cd gcc-4.1.1
../configure --prefix=/myLocation --enable-languages=c,c++,ada

also I tried to compile from parts, eg

gcc-4.1.1
gcc-ada-4.1.1.tar.bz2
gcc-core-4.1.1.tar.bz2
gcc-g++-4.1.1.tar.bz2
gcc-testsuite-4.1.1.tar.bz2

cd gcc-4.1.1
../configure --prefix=/myLocation --enable-languages=c,c++,ada

I am somewhat confused, gcc and g++ are genereated and
I can compile with them, so what's wrong with ada?

Regards, Daniel
 
Schüle Daniel
Posted: Sun May 28, 2006 12:57 am
 
[...]

Quote:
gcc-4.1.1
gcc-ada-4.1.1.tar.bz2
gcc-core-4.1.1.tar.bz2
gcc-g++-4.1.1.tar.bz2
gcc-testsuite-4.1.1.tar.bz2

cd gcc-4.1.1
./configure --prefix=/myLocation --enable-languages=c,c++,ada

I am somewhat confused, gcc and g++ are genereated and
I can compile with them, so what's wrong with ada?

Regards, Daniel

Do you have a previous version of GNAT installed? Since GNAT is
written in Ada, you need an Ada compiler to bootstrap it.

no, I don't have GNAT installed, so I guess I am experiencing
egg chicken problem.
Is there no C written version of Ada compiler?

Quote:

What "make" command do you use, after the configure? It should be
"make bootstrap" or "make bootstrap-lean".

make bootstrap

Quote:

The GNAT tools (gnatmake etc) should then normally appear in the gcc
subdirectory.

no gnatmake on my system

Quote:
More details here: http://ada.krischik.com/


thx, I will look for solutions

Regards, Daniel
 
Jeffrey Creem
Posted: Sun May 28, 2006 6:24 am
 
Schüle Daniel wrote:
Quote:
Hello

I am failing to compile gnat
the compilation goes fine but no gnatmake is generated
I was trying different gcc releases

gcc-3.2.tar.bz2
gcc-3.3.4.tar.bz2
gcc-3.4.0.tar.bz2
gcc-4.1.1.tar.bz2

tar xjf gcc-4.1.1.tar.bz2
cd gcc-4.1.1
./configure --prefix=/myLocation --enable-languages=c,c++,ada


You also got some other good advice...But here is some more


1) You appear to be configuring within the source directory. This is not
the recommended way of doing the build
2) There may very well be language and/or target specific requirements
you need to follow. Read the notes at gcc.gnu.org
3) Use something prebuilt

What is your host os?
 
Martin Krischik
Posted: Sun May 28, 2006 12:29 pm
 
Schüle Daniel wrote:

Quote:
I am failing to compile gnat
the compilation goes fine but no gnatmake is generated
I was trying different gcc releases

Suggested reading:

http://ada.krischik.com/index.php/Articles/CompileGcc
http://ada.krischik.com/index.php/Articles/CompileGNATGPL
http://ada.krischik.com/index.php/Articles/CompileGNATPro

Mind you: The texts are old and with newer gcc's compiling becomes easier
(i.E. a lot of the --enable- options are now default and "make -C gcc
gnatlib-shared gnattools;" is not needed any more.

If you like some newer script files you can download them form The GNU Ada
Project:

http://svn.sourceforge.net/viewcvs.cgi/gnuada/trunk/rpm/SPECS/
http://svn.sourceforge.net/viewcvs.cgi/gnuada/trunk/tar/configure/

Those scripts are up to date for the most current gcc sources. I would also
invite you to join The GNU Ada Project [1]. The project if open for all
operating system.

Martin

[1] http://gnuada.sourceforge.net/
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
 
Martin Krischik
Posted: Sun May 28, 2006 12:36 pm
 
Schüle Daniel wrote:

Quote:
no, I don't have GNAT installed, so I guess I am experiencing
egg chicken problem.
Is there no C written version of Ada compiler?

You can download an Ada compiler from the following sites:

http://gnuada.sourceforge.net
https://libre2.adacore.com/

If you can't find a compiler for the platform you want to use then you will
need to cross compile.

Martin
--
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
 
Schüle Daniel
Posted: Sun May 28, 2006 11:10 pm
 
Ok, this is where I am now

I have those dirs and files

build
gcc-4.1.1
gcc-ada-4.1.1.tar.bz2
gcc-core-4.1.1.tar.bz2
gcc-g++-4.1.1.tar.bz2
gcc-testsuite-4.1.1.tar.bz2

cd build

.../gcc-4.1.1/configure --prefix=/pool/inst --enable-bootstrap
--enable-languages=c,c++,ada
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... gnatbind
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16
$$f1 $$f2
checking for correct version of gmp.h... yes
checking for MPFR... yes
configure: error:
The following requested languages could not be built: ada
Recognised languages are: c,ada,c++,obj-c++,treelang

ok, configure say no Ada installed
but the following works

root@mond---[21:01:48]---/pool/software2/gcc/new/build # gnatmake
/pool/PROG/ada/1/main.adb
gnatgcc -c -I/pool/PROG/ada/1/ -I- /pool/PROG/ada/1/main.adb
gnatbind -x main.ali
gnatlink main.ali

it compiles

root@mond---[21:02:26]---/pool/software2/gcc/new/build #
/pool/PROG/ada/1/main
begin
200
end

and executes

this last step was not working yesterday
I installed gnat binaries and set PATH accordingly
I can call gnatmake and build ELF executables

What am I missing now?
Any help approciated.

Regards, Daniel
 
Jeffrey Creem
Posted: Mon May 29, 2006 1:00 am
 
Schüle Daniel wrote:
Quote:
Ok, this is where I am now

I have those dirs and files

build
gcc-4.1.1
gcc-ada-4.1.1.tar.bz2
gcc-core-4.1.1.tar.bz2
gcc-g++-4.1.1.tar.bz2
gcc-testsuite-4.1.1.tar.bz2

cd build

../gcc-4.1.1/configure --prefix=/pool/inst --enable-bootstrap
--enable-languages=c,c++,ada
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... gnatbind
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16
$$f1 $$f2
checking for correct version of gmp.h... yes
checking for MPFR... yes
configure: error:
The following requested languages could not be built: ada
Recognised languages are: c,ada,c++,obj-c++,treelang

ok, configure say no Ada installed
but the following works

root@mond---[21:01:48]---/pool/software2/gcc/new/build #
gnatmake /pool/PROG/ada/1/main.adb
gnatgcc -c -I/pool/PROG/ada/1/ -I- /pool/PROG/ada/1/main.adb
gnatbind -x main.ali
gnatlink main.ali

Looks like you are running one of those GNAT distributions where the
compiler driver for gnat is gnatgcc instead of just plain old gcc. This
has caused more problems with builds like this. perhaps you can do
something with export CC=gnatgcc before the configure. The basic problem
is that (I think) configure does not know how to find gnatgcc, it is
looking for a gcc that knows Ada.

What host OS is this?
 
Schüle Daniel
Posted: Mon May 29, 2006 2:11 am
 
[...]

Quote:
Looks like you are running one of those GNAT distributions where the
compiler driver for gnat is gnatgcc instead of just plain old gcc. This
has caused more problems with builds like this. perhaps you can do
something with export CC=gnatgcc before the configure. The basic problem
is that (I think) configure does not know how to find gnatgcc, it is
looking for a gcc that knows Ada.

thank you a lot
it solved the problem

Quote:
What host OS is this?

Linux SuSE 9.0

Regards, Daniel
 
 
Page 1 of 1    
All times are GMT
The time now is Fri Apr 18, 2014 11:06 am