comp.lang.ada
 help / color / mirror / Atom feed
From: "Nasser M. Abbasi" <nma@12000.org>
Subject: Re: what to use in place of old gnatbl in newer GNAT ?
Date: Thu, 05 Jul 2012 06:39:37 -0500
Date: 2012-07-05T06:39:37-05:00	[thread overview]
Message-ID: <jt3udp$kbe$2@speranza.aioe.org> (raw)
In-Reply-To: m2r4sqwkl6.fsf@pushface.org

On 7/5/2012 5:47 AM, Simon Wright wrote:

>
> I would use gnatmake!
>
> cxbi: cxbi.adb ifinc.o
>        gnatmake cxbi.adb -largs ifinc.o -lgfortran
>
> or if you prefer
>
> cxbi: cxbi.adb ifinc.o
>        gnatmake cxbi.adb =static -largs ifinc.o -lgfortran -lm
>

Thanks Simon!, yes this did it.

> However, neither seems to work! With GCC:
>
> Target: x86_64-apple-darwin11
<snip>
> gcc version 4.7.0 (GCC)
>
> I get
>
> $ ./cxbi
> Integer number passing:
> mode: in out in/out
> Ada send:
>            1          1          1
>   Fortran get:
>             1           1           1
>   Fortran send:
>             2           2           2
> Ada recieve:
>            1          2          2
> Ada send:
>           -1         -1         -1
>   Fortran get:
>            -1          -1          -1
>   Fortran send:
>             0           0           0
> Ada recieve:
>           -1          0          0
>

Yes, I got now the same result from the above one test. I am using
gfortran 5.6 and gnat 2012 on Linux.  But at least now it is possible
to build these tests, so now will be able to see what is the
problem. This lapack binding is _very_ old. It might have
bugs in it. It is also not complete, the lapada/test/interf/README
file mentions some issues not fixed at the end.

But at least one can build Ada program to call Lapack 77 function now.

I working on documenting all these things, and making
notes of all the changes made. When all is done, will make
a new tar file of the binding with the fixes (Assuming I can
fix the problems :)

-------------------------------------
>echo $LD_LIBRARY_PATH
/usr/lib/i386-linux-gnu/:/usr/lib/atlas-base/:/usr/lib/atlas-base/atlas/

>gnatmake -v
GNATMAKE GPL 2012 (20120509)

>gfortran -v
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

>gnatmake cxbi.adb -largs ifinc.o -lgfortran -lm
gnatbind -x cxbi.ali
gnatlink cxbi.ali ifinc.o -lgfortran -lm

>./cxbi
Integer number passing:
mode: in out in/out
Ada send:
           1          1          1
  Fortran get:
            1           1           1
  Fortran send:
            2           2           2
Ada recieve:
           1          2          2
Ada send:
          -1         -1         -1
  Fortran get:
           -1          -1          -1
  Fortran send:
            0           0           0
Ada recieve:
          -1          0          0
>
-------------------------------


thanks again Simon for your help.

--Nasser



  reply	other threads:[~2012-07-05 11:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05  0:44 what to use in place of old gnatbl in newer GNAT ? Nasser M. Abbasi
2012-07-05  8:38 ` Simon Wright
2012-07-05 10:47 ` Simon Wright
2012-07-05 11:39   ` Nasser M. Abbasi [this message]
2012-07-05 11:41   ` Simon Wright
2012-07-05 12:02     ` Nasser M. Abbasi
replies disabled

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