comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry <lanceboyle@qwest.net>
Subject: Re: gprbuild worked for GNAT GPL 2010, fails for 2011 edition
Date: Mon, 7 May 2012 21:02:26 -0700 (PDT)
Date: 2012-05-07T21:02:26-07:00	[thread overview]
Message-ID: <fd53d6c9-f6f0-4578-b55a-84b308b30fb2@d8g2000vbw.googlegroups.com> (raw)
In-Reply-To: m2ehqwttbq.fsf@pushface.org

On May 6, 11:10 pm, Simon Wright <si...@pushface.org> wrote:

To save time, just skip to my last comment about the "good news." 8^)

> Jerry <lancebo...@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.

Good guess. But it is a .dylib and is a couple directories up. There
is no libplplotadad.a on my computer, so obviously it was built
without the default static. However, the .o and .ali _are_ in this
directory, plplotadad.dir, before being installed elsewhere.

> > 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.

It contains only .ali files, no .a or .dylib. (As I said, setting
Library_Dir here worked for the 2010 GPL. I thought it looked funny at
the time but it worked so I never thought about it again, until now.

> > 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.

But I was asked for sources to complete the linking. (I' pretty sure--
I might have misread this--if the process didn't find any .ali then it
also would ask for sources for compilation.)

> > 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.

I don't either, which is why I got confused. I can (and have, a few
times) reverted everything back to the 2010 GPL and PLplot_Library_2
as described and it really does work without any .dylib or .a in
  /usr/local/plplot/lib/ada/adalib/plplotadad

> 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 PLplot guys with their cmake smarts use gnatmake to make
libplplotadad.dylib. So I would guess it's in their largs rather than
another .gpr.

So here's the good news. I moved

  /usr/local/plplot/lib/libplplotadad.0.0.0.dylib
  /usr/local/plplot/lib/libplplotadad.0.dylib
  /usr/local/plplot/lib/libplplotadad.dylib

to

  /usr/local/plplot/lib/ada/adalib/plplotadad

which also contains the .ali files (and nothing else), and the link
succeeded. Thanks for pointing me in this direction.

The 2010 mystery notwithstanding, I think the problem is solved. I'll
tell the PLplot team to move the .dylib and its symlinks to the other
directory and we should be done.

Thanks once again, Simon.

Jerry



  reply	other threads:[~2012-05-08  4:08 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
2012-05-08  4:02   ` Jerry [this message]
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