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 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 qr8mr12069322pbc.0.1336371021169; Sun, 06 May 2012 23:10:21 -0700 (PDT) Path: pr3ni13367pbb.0!nntp.google.com!news2.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: gprbuild worked for GNAT GPL 2010, fails for 2011 edition Date: Mon, 07 May 2012 07:10:17 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="GhzCuPrEZ+dInccd0W7aSw"; logging-data="11876"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+BJ0aEUddDVR0gBBeZg1h8tEzWHskqxoM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (darwin) Cancel-Lock: sha1:4kf7NB8FXhW4OFKOygrfJlk6ZRY= sha1:ZIatOzhp89EOgE8gJg0qIlwOOyE= Content-Type: text/plain; charset=us-ascii Date: 2012-05-07T07:10:17+01:00 List-Id: Jerry writes: > 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 This looks like the directory where the library (I think it'll be a static library, libplplotadad.a, by default) is initially compiled before the .ali files and the constructed .a are moved to the proper place. > 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. This looks like the target directory, which should contain a single .a and no .o's. > 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? In the same way as the sources to the standard library are needed; the .ali files are only a partial representation of the source, the full source is needed to compile against. > 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 I don't know why this should have changed. You've shown us three .gpr files, but I'd expect there to be a fourth, which tells gprbuild how to build libplplotadad.a. The BCs have a gpr[1] for use when the library is installed, which has Externlly_Built set to True, and a gpr[2] for use while building the library. These two gprs use entirely different file structures; I use Make to install the built library into its destination. gprbuild copies the .a and .ali files from the Object_Dir into the Library_Dir, but doesn't touch the source files unless you're defining a stand-alone library (in which case I think you would definitely need a 'build' and a 'use' gpr). I'm only slowly coming to grips with this, there's info at [3]. [1] http://booch95.svn.sourceforge.net/viewvc/booch95/trunk/bc.gpr-for-installation?revision=1495&view=markup [2] http://booch95.svn.sourceforge.net/viewvc/booch95/trunk/bc.gpr?revision=1477&view=markup [3] http://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html#Library-Projects