From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,973b2ff14841b514 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.40 with SMTP id qr8mr9470196pbc.0.1341488380955; Thu, 05 Jul 2012 04:39:40 -0700 (PDT) Path: l9ni10938pbj.0!nntp.google.com!news1.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: what to use in place of old gnatbl in newer GNAT ? Date: Thu, 05 Jul 2012 06:39:37 -0500 Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: nma@12000.org NNTP-Posting-Host: pfl4qxtMf5hoqRBBsHQhPQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-07-05T06:39:37-05:00 List-Id: 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 > 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