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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,72973cb941b9d7ea,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.136.33 with SMTP id px1mr4627610pbb.7.1336180080681; Fri, 04 May 2012 18:08:00 -0700 (PDT) Path: pr3ni4986pbb.0!nntp.google.com!news1.google.com!postnews.google.com!r9g2000yqd.googlegroups.com!not-for-mail From: Jerry Newsgroups: comp.lang.ada Subject: gprbuild worked for GNAT GPL 2010, fails for 2011 edition Date: Fri, 4 May 2012 18:08:00 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 97.117.199.83 Mime-Version: 1.0 X-Trace: posting.google.com 1336180080 5487 127.0.0.1 (5 May 2012 01:08:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 5 May 2012 01:08:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r9g2000yqd.googlegroups.com; posting-host=97.117.199.83; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7_3; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-05-04T18:08:00-07:00 List-Id: I'm on OS X 10.7.3 (Lion) and recently changed the Ada tools from Adacore's 2010 GPL edition to their 2011 edition. Unfortunately, my _simple_ project build process using gprbuild now fails, where it worked with the 2010 edition. The problem is in making a project file for externally built libraries. (I find the GPRbuild's user guide a little vague on this subject.) The external library in question is that made by cmake during the PLplot installation. There are two libraries: the "core" PLplot library which is compiled from C and which I am linking sucessfully (see PLplot_Library_1 below). The other kind of library contains the Ada bindings (which I wrote) which are built (from cmake) using gnatmake. As I see it, there are two versions of this library: (1) a dynamic library which lives at /usr/local/plplot/lib/libplplotadad.dylib and (2) an Ada-style library directory containing the .ali and .o files for the Ada bindings which is at /usr/local/plplot_build_dir/bindings/ada/CMakeFiles/plplotadad.dir (I don't know which of these is preferred, if either. I'm not getting either one to work.) For my own work, I can arrange for the PLplot bindings to be re-compiled from source but I prefer to link to the pre- built library because I think that is the way that users would work and it provides me with a small bit of testing to work this way. Note that the PLplot_Library_2 uses for Library_Dir use "/usr/local/plplot/lib/ada/adalib/plplotadad"; which contains the bindings' .ali files but not .o files--this worked for 2010 but seems to be a problem for 2011. However, when I reference the directory mentioned above which does contain both .o and .ali files, the process still fails. In one of my attempts, the process aborted, asking for the sources for the Ada bindings. Why would sources be required for a pre-built library? Now, using the 2011 edition, using the below project files which work for 2010, the process fails with gcc: /usr/local/plplot/lib/ada/adalib/plplotadad//libplplotadad.a: No such file or directory Incidentally, if I build the library using 2010 and try to link with 2011, failure happens with fatal error: file plplot.ali is incorrectly formatted make sure you are using consistent versions of gcc/gnatbind Sorry for the long post. Jerry -- Library for core (C) PLplot functionality; this works. library project PLplot_Library_1 is for Externally_Built use "true"; for Library_Dir use "/usr/local/plplot/lib"; for Library_Name use "plplotd"; for Library_Kind use "dynamic"; end PLplot_Library_1; -- Library for Ada bindings; worked for Adacore 2010, broken for 2011. library project PLplot_Library_2 is for Externally_Built use "true"; for Source_Dirs use ("/usr/local/plplot/share/ada/adainclude/ plplotadad"); for Library_Dir use "/usr/local/plplot/lib/ada/adalib/plplotadad"; for Library_Name use "plplotadad"; end PLplot_Library_2; -- Main project file with "PLplot_Library_1"; with "PLplot_Library_2"; project Build is for Source_Dirs use ("source", "/Users/me/Documents/Programs/Ada/Code/My_Code/Specialized/ Sampling", "/Users/me/Documents/Programs/Ada/Code/My_Code/Specialized/Sampling/ Post-processing", "/Users/me/Documents/Programs/Ada/Code/My_Code/My_Tools"); for Object_Dir use "build-normal"; for Exec_Dir use "."; for Main use ("third.adb"); package Builder is for Default_Switches ("Ada") use ("-O2", "-gnat05", "-gnato"); for Executable ("third.adb") use "product-normal/run"; end Builder; package Compiler is end Compiler; package Binder is end Binder; package Linker is end Linker; end Build;