Ludovic Brenta wrote:
> Package: polyorb
> Version: 2.6.0~20090423-1
> Severity: serious
> Justification: FTBFS on kfreebsd-amd64
> 
> Excerpt from the buildd log:
> 
> Running all 35 scenario files from: 
> /build/buildd-polyorb_2.6.0~20090423-1-kfreebsd-amd64-XNmMrY/polyorb-2.6.0~20090423/testsuite/scenarios
[snip]
>  35 scenarios executed,
>  42 out of 86 tests passed
> make[1]: *** [run_tests] Error 1
> make[1]: Leaving directory 
> `/build/buildd-polyorb_2.6.0~20090423-1-kfreebsd-amd64-XNmMrY/polyorb-2.6.0~20090423'
> make: *** [build-stamp] Error 2
> dpkg-buildpackage: error: /usr/bin/fakeroot debian/rules binary-arch gave 
> error exit status 2

There is a problem with the GNAT.Sockets binding on this architecture:

polyorb.utils.tcp_access_points: bind failed: [22] Invalid argument

raised GNAT.SOCKETS.SOCKET_ERROR : [22] Invalid argument
==> Process terminated abnormally <==

The thick binding procedure GNAT.Sockets.Bind_Socket() (which polyorb
uses) calls GNAT.Sockets.Thin.C_Bind(), which is just a pragma import
for (eg)libc bind().

While this works on amd64:

--

with Ada.Text_IO;

with Interfaces.C.Strings;

pragma Warnings (off);
with GNAT.Sockets.Thin_Common;
with GNAT.Sockets.Constants;
with GNAT.Sockets.Thin;
pragma Warnings (on);

use GNAT.Sockets;

procedure Bind_Socket is
   package C renames Interfaces.C;
   use type C.int;

   Socket : C.int;
   Res    : C.int;
   Sin    : aliased Thin_Common.Sockaddr_In;
   Len    : constant C.int := Sin'Size / 8;
begin
   Sin.Sin_Addr := Thin_Common.Inaddr_Any;
   Sin.Sin_Port := 5786;

   Ada.Text_IO.Put_Line ("Sin size:" & Sin'Size'Img);
   Ada.Text_IO.Put_Line ("Len     :" & Len'Img);

   Socket := Thin.C_Socket (Domain   => Constants.AF_INET,
                            Typ      => Constants.SOCK_STREAM,
                            Protocol => 0);

   Res := Thin.C_Bind (Socket, Sin'Address, Len);

   Ada.Text_IO.Put_Line ("RESULT  :" & Res'Img);

   if Res = -1 then
      Ada.Text_IO.Put_Line
        (C.Strings.Value
           (Thin.Socket_Error_Message
              (Errno => Thin.Socket_Errno)));
   end if;
end Bind_Socket;

--

~/work/sockets$ ./bind_socket
Sin size: 128
Len     : 16
RESULT  : 0

It fails on kfreebsd-amd64:

~/work/sockets$ ./bind_socket
Sin size: 128
Len     : 16
RESULT  :-1
Invalid argument

Maybe Sockaddr_In is incorrectly aligned for the FreeBSD kernel?



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to