โŒ About FreshRSS

Normal view

There are new articles available, click to refresh the page.
Before yesterdayNews from the Ada programming language world

GPRbuild: relocation truncated to fit R_X86_64

I'm dealing with huge global lists in Ada. When building I'm getting the error during linking: relocation truncated to fit R_X86_64_PC32 and link of main.adb failed. I saw that GCC has the flag -mcmodel=medium, is there something similar for gprbuild or does anyone has a hint how to deal with huge global lists?

Thanks in advance.

Ada GNAT.SOCKETS.SOCKET_ERROR:[11] Resource temporarily unavailable

I'm using the following socket server on windows, which works fine. When I try to execute this code on linux I get the following error message:

GNAT.SOCKETS.SOCKET_ERROR:[11] Resource temporarily unavailable

Does anybody has a hint whats going wrong?

Thanks a lot in advance.

with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Sockets; use GNAT.Sockets;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;

procedure Server is
   Channel : Stream_Access;
   Server : Socket_Type;
   Address : Sock_Addr_Type;
   Socket : Socket_Type;
   receive_str : Unbounded_String;
   Receive_Character : Character;
begin
   Put_Line("Server Config Started...");
   Create_Socket(Socket => Server);
   Set_Socket_Option(Socket => Server, Level => Socket_Level, Option => (Name => Reuse_Address, Enabled => True));
   Set_Socket_Option(Server, Socket_Level, (Receive_Timeout, Timeout => 1.0));
   Bind_Socket(Server, Address => (Family => Family_Inet, Addr => Inet_Addr("127.0.0.2"), Port => 65432));
   Listen_Socket(Server);

   loop
      Accept_Socket(Server, Socket, Address);
      receive_str := To_Unbounded_String("");
      Channel := Stream(Socket);
      loop
         Character'Read(Channel, Receive_Character);
         exit when Receive_Character = '@';
         Append(receive_str, Receive_Character);
      end loop;
      Put_Line("ReceiveStr" & To_String(receive_str));
      String'Write(Channel, "OK123");
   end loop;
end Server;
โŒ
โŒ