[AWS] AWS segfault bug?

Ian Broster ian at broster.co.uk
Fri Aug 20 11:35:47 CEST 2004


Pascal,

>  > % nm lib/libaws.a | grep aws__net__sets__thin__pollfdIP
>  >           U aws__net__sets__thin__pollfdIP
>
> I'm not sure this is so weird. What makes you think there is
> a problem there ?

Follow through this example to see the problem:

# in AWS:
% make clean
% make build_lib
...
% ls -l src/aws-net-sets-thin.*
src/aws-net-sets-thin.ads

% make install
...
% cd /myapp/src/report_srv
% make
gnatmake  -XBUILD=debug -XDEMO= -L/usr/ianb/local/lib -Pwcalc.gpr
gnatbind -s -I- -x
/local/d1p3/ianb/stuff/rapita/rapitime/src/report_srv/obj/wserver.ali
error: "aws-net-sets-thin.ali" not found, "aws-net-sets-thin.ads" must be
compiled
gnatmake: *** bind failed.
make: *** [wcalc] Error 4

So, the build of AWS library did not do anything for the .ads. Which
as you say, is not surprising. But a .ali is still needed for the bind.

Alternatively, continuing:

% make build_demos
...
% make install
...
% ls -l src/aws-net-sets-thin.*
src/aws-net-sets-thin.ads
src/aws-net-sets-thin.ali
src/aws-net-sets-thin.o

Well, fom the demos, gnatmake can be clever and do the .ali and .o for
the imported function. But of course, this .o won't be in the library
because the library is always made first.


% make
gnatmake  -XBUILD=debug -XDEMO= -L/usr/ianb/local/lib -Pwcalc.gpr
gnatbind -s -I- -x
/local/d1p3/ianb/stuff/rapita/rapitime/src/report_srv/obj/wserver.ali
gnatlink
/local/d1p3/ianb/stuff/rapita/rapitime/src/report_srv/obj/wserver.ali
-L/local/d1p3/ianb/pkg/AWS/lib -laws -o
/local/d1p3/ianb/stuff/rapita/rapitime/bin/wserver
/local/d1p3/ianb/pkg/AWS/lib/libaws.a(aws-net-sets.o)(.text+0x53e): In
function `aws__net__sets___elabs':
/local/d1p3/ianb/pkg/aws-2.0p/src/aws-net-sets.ads:120: undefined
reference to `aws__net__sets__thin__pollfdIP'
collect2: ld returned 1 exit status
gnatlink: cannot call /usr/ianb/local/gnat/bin/gcc
gnatmake: *** link failed.
make: *** [wcalc] Error 4

Finally, the way to actually get is to make the library to work is
% make build
...
% make build_lib   # the object and ali are still there from building the
demos
...
% make install

works.

ian



-- 
Dr Ian Broster


More information about the AWS mailing list