comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: gprbuild worked for GNAT GPL 2010, fails for 2011 edition
Date: Mon, 07 May 2012 07:10:17 +0100
Date: 2012-05-07T07:10:17+01:00	[thread overview]
Message-ID: <m2ehqwttbq.fsf@pushface.org> (raw)
In-Reply-To: a04a8d21-896a-4d61-b219-26092b0df09a@r9g2000yqd.googlegroups.com

Jerry <lanceboyle@qwest.net> 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




  reply	other threads:[~2012-05-07  6:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05  1:08 gprbuild worked for GNAT GPL 2010, fails for 2011 edition Jerry
2012-05-07  6:10 ` Simon Wright [this message]
2012-05-08  4:02   ` Jerry
2012-05-09  7:36     ` Simon Wright
2012-05-10  1:19       ` Jerry
2012-05-10  7:26         ` Ludovic Brenta
2012-05-11  1:01           ` Jerry
2012-05-15  6:13             ` Simon Wright
replies disabled

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