Package: libxmlada-dev
Version: 3.0-5
Severity: minor
Tags: patch
> Hello,
>
> I've been trying to "with" the xmlada.gpr file that is included in your
> package of libxmlada (I'm on kubuntu jaunty, so the package version is
> 3.0-5ubuntu1).
>
> If I just do a 'with "xmlada"' I get lots and lots of undefined
> references, like these:
> xxxx-xmlreaders.o:(.rodata+0x218): undefined reference to
> `sax__readers__start_dtd'
> xxxx-xmlreaders.o:(.rodata+0x21c): undefined reference to
> `sax__readers__end_dtd'
> (and so on)
>
> I'm not at all well versed in the gpr syntax, and the gpr file of the
> project that I'm trying to compile is rather complex, but I figured out
> a way of getting it to compile:
> I changed it to look very much like the gpr file included with
> libtemplates_parser:
>
> -------
> project XmlAda is
> for Source_Dirs use ("/usr/share/ada/adainclude/xmlada");
> for Library_Name use "xmlada";
> for Library_ALI_Dir use "/usr/lib/ada/adalib/xmlada";
> for Library_Dir use "/usr/lib";
> for Library_Kind use "dynamic";
> for Externally_Built use "true";
> end XmlAda;
>
> When I do this it all compiles nicely with just the usual 'with
> "xmlada"'
>
> How is the xmlada gpr file meant to be used? And why is it different
> from the templates_parser gpr file (I believe that package is also
> maintained by you)?
templates_parser.gpr is a "library project file" and it causes gnatmake
to
link the program with libtemplates_parser.so implicitly. When you changed
xmlada.gpr, you achieved the same effect. The Debian Policy for Ada
mandates that all libraries come with a library project file.
Unfortunately, in the case of libxmlada, the library project file caused
trouble when building PolyORB; so, we reverted its library project file
to a regular project file (without the Library_* attributes) in 3.0-3.
The bug is that we forgot to revert the documentation as well.
xmlada.gpr
now being a regular project file, you need to link your program with
libxmlada.so explicitly from your project file, like so:
with "xmlada";
project My_Program is
...
package Linker is
for Default_Switches (Ada) use XMLAda.Ada_Switches;
end Linker;
end My_Program;
If you need additional linker switches, use something like
package Linker is
for Default_Switches (Ada) use XMLAda.Ada_Switches & ("-lmy_lib");
end Linker;
I'm opening a bug to the Debian bug tracking system with this mail. The
next version of libxmlada-dev will have a library project file whether
PolyORB likes it or not :)
--
Ludovic Brenta.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]