comp.lang.ada
 help / color / mirror / Atom feed
* Help with getting GNAT Ada running on 64-bit Gentoo Linux
@ 2004-08-23  2:53 Larry Elmore
  2004-08-23  5:17 ` Ludovic Brenta
  0 siblings, 1 reply; 7+ messages in thread
From: Larry Elmore @ 2004-08-23  2:53 UTC (permalink / raw)


Are there any pointers out there that provide any help with this 
process? I've seen 64-bit GNAT rpms for SuSe, but that doesn't seem to 
have much help for soeone using Gentoo.

Thanks in advance for any advice or pointers.

--Larry



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

* Re: Help with getting GNAT Ada running on 64-bit Gentoo Linux
  2004-08-23  2:53 Help with getting GNAT Ada running on 64-bit Gentoo Linux Larry Elmore
@ 2004-08-23  5:17 ` Ludovic Brenta
  2004-08-23 23:54   ` Larry Elmore
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Brenta @ 2004-08-23  5:17 UTC (permalink / raw)


Larry Elmore writes:
> Are there any pointers out there that provide any help with this
> process? I've seen 64-bit GNAT rpms for SuSe, but that doesn't seem
> to have much help for soeone using Gentoo.
>
> Thanks in advance for any advice or pointers.
>
> --Larry

This depends on what 64-bit platform you are targetting.  I think your
best bet is to look at GCC 3.4.1; the GNAT in there supports several
64-bit platforms.

-- 
Ludovic Brenta.



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

* Re: Help with getting GNAT Ada running on 64-bit Gentoo Linux
  2004-08-23  5:17 ` Ludovic Brenta
@ 2004-08-23 23:54   ` Larry Elmore
  2004-08-24 23:12     ` Cesar Rabak
  0 siblings, 1 reply; 7+ messages in thread
From: Larry Elmore @ 2004-08-23 23:54 UTC (permalink / raw)


Ludovic Brenta wrote:
> Larry Elmore writes:
> 
>>Are there any pointers out there that provide any help with this
>>process? I've seen 64-bit GNAT rpms for SuSe, but that doesn't seem
>>to have much help for soeone using Gentoo.
>>
>>Thanks in advance for any advice or pointers.
>>
>>--Larry
> 
> 
> This depends on what 64-bit platform you are targetting.  I think your
> best bet is to look at GCC 3.4.1; the GNAT in there supports several
> 64-bit platforms.

Oops, sorry -- amd64. I posted this a couple of weeks ago on the Gentoo 
amd64 forum, but no responses. The stumbling block for me is that you 
need a working Ada compiler to compile Ada support in gcc, but I can't 
get 32-bit GNAT working on 64-bit Gentoo so I can compile a 64-bit 
version. :-(

--Larry



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

* Re: Help with getting GNAT Ada running on 64-bit Gentoo Linux
  2004-08-23 23:54   ` Larry Elmore
@ 2004-08-24 23:12     ` Cesar Rabak
  2005-02-27  1:47       ` Dwight Schauer
  0 siblings, 1 reply; 7+ messages in thread
From: Cesar Rabak @ 2004-08-24 23:12 UTC (permalink / raw)


Larry Elmore escreveu:
> Ludovic Brenta wrote:
> 
>> Larry Elmore writes:
>>
>>> Are there any pointers out there that provide any help with this
>>> process? I've seen 64-bit GNAT rpms for SuSe, but that doesn't seem
>>> to have much help for soeone using Gentoo.
>>>
>>> Thanks in advance for any advice or pointers.
>>>
>>> --Larry
>>
>>
>>
>> This depends on what 64-bit platform you are targetting.  I think your
>> best bet is to look at GCC 3.4.1; the GNAT in there supports several
>> 64-bit platforms.
> 
> 
> Oops, sorry -- amd64. I posted this a couple of weeks ago on the Gentoo 
> amd64 forum, but no responses. The stumbling block for me is that you 
> need a working Ada compiler to compile Ada support in gcc, but I can't 
> get 32-bit GNAT working on 64-bit Gentoo so I can compile a 64-bit 
> version. :-(
> 
Crosscompiling couldn't be an option for you?

-- 
Cesar Rabak
GNU/Linux User 52247.
Get counted: http://counter.li.org/




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

* Re: Help with getting GNAT Ada running on 64-bit Gentoo Linux
  2004-08-24 23:12     ` Cesar Rabak
@ 2005-02-27  1:47       ` Dwight Schauer
  2005-02-27 10:40         ` Duncan Sands
  0 siblings, 1 reply; 7+ messages in thread
From: Dwight Schauer @ 2005-02-27  1:47 UTC (permalink / raw)


I've compiled gcc/gnat 3.4.3 on fedora core 3 prefixed to a different
path than /. I had to disable multilib in order for it to build. The
resulting installation seems to work. I copied it to a gentoo amd64,
and it works on there as well. I tried it with some small ada programs
and they compiled and ran the same as they do on fedora core 3. I'm
having problems using it in the ebuild to bootstrap the cross
compiler. It is not not passing the sanitty check.

---< start clip >---
>>> Unpacking source...
>>> Unpacking gcc-core-3.4.3.tar.bz2 to /var/tmp/portage/gnat-3.43/work
>>> Unpacking gcc-ada-3.4.3.tar.bz2 to /var/tmp/portage/gnat-3.43/work
>>> Source unpacked.
creating cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking for a BSD compatible install... /bin/install -c
cc1: error: unrecognised debug output level "natpgn"
*** The command '/opt/local-tools/host-gcc-ada-3.4.3/bin/gnatgcc -o
conftest -O -gnatpgn   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

!!! ERROR: dev-lang/gnat-3.43 failed.
!!! Function src_compile, Line 80, Exitcode 1
!!! configure failed
!!! If you need support, post the topmost build error, NOT this status
message.
---< end clip >---

I can use that gnatgcc to compile other c programs.

If I set my path to /opt/local-tools/host-gcc-ada-3.4.3/bin/ I can use
gnatmake and what not, but I don't like have a kludged development
environment.

To compile it on fedora core 3 I basically just took the ebuild for
gcc gnat 3.4.3 and hacked it up a bit in regular bash script and
prefixed
it to /opt/local-tools/host-gcc-ada-3.4.3/

While I might be able to use it that way, I'd rather get it working in
the gentoo portage system.




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

* Re: Help with getting GNAT Ada running on 64-bit Gentoo Linux
  2005-02-27  1:47       ` Dwight Schauer
@ 2005-02-27 10:40         ` Duncan Sands
  2005-03-26  8:45           ` Dwight Schauer
  0 siblings, 1 reply; 7+ messages in thread
From: Duncan Sands @ 2005-02-27 10:40 UTC (permalink / raw)
  To: Dwight Schauer; +Cc: comp.lang.ada

On Sat, 2005-02-26 at 17:47 -0800, Dwight Schauer wrote:
> I've compiled gcc/gnat 3.4.3 on fedora core 3 prefixed to a different
> path than /. I had to disable multilib in order for it to build. The
> resulting installation seems to work. I copied it to a gentoo amd64,
> and it works on there as well. I tried it with some small ada programs
> and they compiled and ran the same as they do on fedora core 3. I'm
> having problems using it in the ebuild to bootstrap the cross
> compiler. It is not not passing the sanitty check.

Hi Dwight, it may be worth trying gcc from CVS in a few days time.
I think current CVS already contains a number of build fixes for Ada,
and I hear that a major rework is about to be committed.  Maybe these
changes will fix your problem.

All the best,

Duncan.




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

* Re: Help with getting GNAT Ada running on 64-bit Gentoo Linux
  2005-02-27 10:40         ` Duncan Sands
@ 2005-03-26  8:45           ` Dwight Schauer
  0 siblings, 0 replies; 7+ messages in thread
From: Dwight Schauer @ 2005-03-26  8:45 UTC (permalink / raw)


I checked out GCC from CVS on a Fedora Core 3 X86_64 box. I
bootstrapped GCC 4.0.0 20050325 (prerelease) with full gnat/ada support
using gnatgcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3) . I installed
it to an alternate directory. (Not /usr).

I copied it over to my gentoo amd64 box (a no multilib profile) and
after a bit of mucking around was able to get the same bootstrap
working on Gentoo. I had to symlink gnatgcc to gcc in the alternate bin
directory, as some parts of the compile were using gcc rather than the
CC or ADAC variable and were breaking as result. I put that alternate
bin directory as the first one in executeable path in my build script.
Since the gcc symlink is in the path first, the one in /usr/bin is not
used.

I was able to successfully bootstrap again on Gentoo amd64 using the
gnatgcc built on Gentoo amd64.

I've not tried to make a Gentoo ebuild for it yet.

Here is the script I used to build it:

#!/bin/bash

function bye
{
        exit ${1}
}

function die
{
        echo "*** ${1}"
        echo "*** error at line ${BASH_LINENO[$i]}"
        echo "*** fatal"
        bye -1
}

S=../../gcc-cvs/gcc


#export PATH=/opt/local-tools/host-gcc-ada-3.4.3/bin:${PATH}
#export CC=/opt/local-tools/host-gcc-ada-3.4.3/bin/gnatgcc
#export ADAC=/opt/local-tools/host-gcc-ada-3.4.3/bin/gnatgcc

export PATH=/opt/local-tools/host-gnat-cvs-gcc4/bin:${PATH}

#export PATH=/opt/local-tools/host-gnat-cvs/bin:${PATH}
#export CC=/opt/local-tools/host-gnat-cvs/bin/gnatgcc
#export ADAC=/opt/local-tools/host-gnat-cvs/bin/gnatgcc


INSTALL_PREFIX=/opt/local-tools
TARGET_COMPILER=host-gnat-cvs-gcc4-native
PREFIX=${INSTALL_PREFIX}/${TARGET_COMPILER}

function configure_gnat
{
        ${S}/configure --prefix=${PREFIX} \
        --program-prefix=gnat \
        --enable-languages="c,ada" \
        --enable-libada \
        --with-gcc \
        --with-gnu-ld \
        --with-gnu-as \
        --enable-threads=posix \
        --disable-shared \
        --with-system-zlib \
        --disable-nls \
        --libdir=${PREFIX}/lib/ada \
        --libexecdir=${PREFIX}/libexec/ada \
        --mandir=${PREFIX}/share/man \
        --infodir=${PREFIX}/share/info \
        --disable-multilib \
        || die "configure failed"
}

configure_gnat
make bootstrap || die "bootstrap failed"
##make -C gcc gnatlib_and_tools || die "gnatlib_and_tools failed"
make -C gcc/ada gnatlib || die "gnatlib"
make || die "make"
make install || die "make install"

echo '****'
echo done
echo '****'




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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-23  2:53 Help with getting GNAT Ada running on 64-bit Gentoo Linux Larry Elmore
2004-08-23  5:17 ` Ludovic Brenta
2004-08-23 23:54   ` Larry Elmore
2004-08-24 23:12     ` Cesar Rabak
2005-02-27  1:47       ` Dwight Schauer
2005-02-27 10:40         ` Duncan Sands
2005-03-26  8:45           ` Dwight Schauer

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