comp.lang.ada
 help / color / mirror / Atom feed
From: R Tyler Croy <tyler@linux.com>
Subject: Re: Packaging and linking shared Ada libraries
Date: 07 Mar 2011 18:30:54 GMT
Date: 2011-03-07T18:30:54+00:00	[thread overview]
Message-ID: <4d75245e$0$22170$742ec2ed@news.sonic.net> (raw)
In-Reply-To: m2zkp7v1tx.fsf@pushface.org

Simon Wright <simon@pushface.org> wrote:
> R Tyler Croy <tyler@linux.com> writes:
> 
>> I'm trying to figure out how to package up and use XML/Ada for
>> openSUSE and I'm having a bit of trouble trying to figure what
>> actually needs to be packaged.
>>
>> Right now I'm packaging up the .so and the .ads files and trying to
>> use them but to no avail:
>>
>>     tyler@spinach:~/source> gnatmake -aI/usr/include/xmlada -aO/usr/lib64 test.adb -largs -lxmlada
>>     gnatmake: "dom-readers.adb" not found
>>     tyler@spinach:~/source> 
> 
> Tyler,
> 
> Is there any reason why you don't just
> ./configure
> make
> make install
> ?
> 
> I end up with (more or less) the following under $prefix:
> 
> - include/xmlada/<sources>
> - lib/<various .so's>
> - lib/gnat/<various .gpr's>
> - lib/xmlada/relocatable/<shared binaries, .ali's>
> - lib/xmlada/static/<debug binaries, .ali's>
> 
> and the GPRs are exactly where GNAT built for $prefix expects them.

The problem is that the upstream (from AdaCore) packages don't "cooperate" with
overriding variables for building and installing.

openSUSE has some packaging guidelines that the build scripts for XML/Ada and
GPRbuild don't "fit" with unfortunately.

Looking at some of Ludovic's packages, he's actually defined a debian build
.gpr file and adds a Makefile to use that .gpr to build, then place the files
he needs in the appropriate directories. I'm following a similar approach.

> I'm not sure of the exact rules for when the Ada source files in the
> library require .adb's, but certainly they're needed for generics and
> where the spec uses pragma Inline. I think you need to make sure the
> corresponding .alis are read-only.
> 
> A good deal of the work is done by library gpr's, see
> http://www.adacore.com/wp-content/files/auto_update/gprbuild-docs/html/gprbuild_ug.html#Library-Projects

Thanks for the link, I hadn't seen it specifically, but some of the things it
mentions I've seen elsewhere on the interwebs :)


Cheers

-- 
- R. Tyler Croy
--------------------------------------
    Code: http://github.com/rtyler



  reply	other threads:[~2011-03-07 18:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07  5:32 Packaging and linking shared Ada libraries R Tyler Croy
2011-03-07  7:15 ` Simon Wright
2011-03-07 18:30   ` R Tyler Croy [this message]
2011-03-08 10:48     ` Ludovic Brenta
2011-03-07  9:55 ` Ludovic Brenta
2011-03-07 18:27   ` R Tyler Croy
2011-03-07 13:27 ` Julian Leyh
replies disabled

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