[AWS] gnatlink fails with aws hello world example on debian 4.0
Ludovic Brenta
ludovic at ludovic-brenta.org
Wed Dec 3 16:54:38 CET 2008
Selon Andreas Schipplock:
> Hi,
> I'm using Debian 4.0 "Etch" and I installed the following packages:
> gnat and libaws-dev
>
> Consider the following example that I copied from the documentation:
> http://pastie.org/329687
> I created the following project file "default.gpr":
> http://pastie.org/329693
> I am compiling this with: "gnatmake -Pdefault.gpr"
> I am getting the following gnatlink error: http://pastie.org/329697
>
> If I compile a simple hello world, it's working just fine as expected:
> http://pastie.org/329688
>
> I have no idea what's going wrong here. If you could give me a hand, I
> would be happy :).
It looks like gnatmake forgets to link your program with
/usr/lib/libaws.so.
Theoretically, this is how it should work: your project file does a "with
"aws"" which loads /usr/share/ada/adainclude/aws.gpr. This file contains
a stanza like this:
package Linker is
for Default_Switches ("Ada") use ("-laws");
end Linker;
which causes gnatmake to link your program with /usr/lib/libaws.so
(provided by package libaws-dev), which is a symbolic link to
/usr/lib/libaws.so.2.2 (provided by package libaws2.2), which is the real
shared library.
Apparently, this scenario is broken somewhere on your machine. Please make
sure:
- which aws.gpr you actually use (e.g. "gnat ls -v -Pdefault.gpr")
- that both packages libaws-dev and libaws2.2 are installed
- that both the symbolic link and the shared library are present
Also, the output of "gnatmake -v -Pdefault.gpr" might be useful.
HTH
--
Ludovic Brenta.
More information about the AWS
mailing list