comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Can't compile FOSDEM 2014 Ada Task Pools demo on Debian jessie
Date: Mon, 19 Jan 2015 21:44:16 +0100
Date: 2015-01-19T21:44:16+01:00	[thread overview]
Message-ID: <87sif6mrfj.fsf@ludovic-brenta.org> (raw)
In-Reply-To: m9g0bm$9a6$1@news.albasani.net

Dirk Heinrichs writes on comp.lang.ada:
> I'm trying to compile the Ada Task Pools demo from FOSDEM 2014[1] on Debian 
> jessie, but I'm getting the following error:
>
> % gprbuild -P fosdem2013.gpr                                                                                       
> gnatgcc -c -gnat2012 -g -O0 -gnatafoy -gnatVa -gnatwa fosdem2013.adb
> xcb_value_list_g.ads:14:04: size clause not allowed for variable length type
> gprbuild: *** compilation phase failed
>
> Did I miss anything?

My fault.  Here is a patch which I forgot to commit and publish in my
tarball.  Note that this error appeared in gnat-4.9 and did not exist
(IIRC) in gnat-4.8.

Revision: e9679c7bae046fc7d9d85a0cf69cf5a81428746a
Parent:   e334b694201e321a33be72323aace48b614594b1
Author:   Ludovic Brenta
Date:     2014-12-28T11:28:10
Branch:   org.ludovic-brenta.xcb

Changelog: 

* Add a binding to the Expose event.
* xcb.gpr: correct the Library_Name.
* xcb_value_list_g.ads: remove rep clause for Mask_T as it is
  incompatible with gnat-4.9.

Changes against parent e334b694201e321a33be72323aace48b614594b1

  patched  xcb.ads
  patched  xcb.gpr
  patched  xcb_value_list_g.adb
  patched  xcb_value_list_g.ads

============================================================
--- xcb.ads	c57578058fb5f90962b1cd37d86bc3a7479479d7
+++ xcb.ads	7cdc0398c04aeae7863c15bb0d2b7f2c43d421cb
@@ -304,6 +304,12 @@ package XCB is
                   State         : Interfaces.Unsigned_16;
                   Same_Screen   : Interfaces.Unsigned_8;
                   Pad_Button    : Interfaces.Unsigned_8;
+               when Expose =>
+                  Expose_Event_Window         : XCB.Window.T;
+                  Expose_X, Expose_Y          : Interfaces.Unsigned_16;
+                  Expose_Width, Expose_Height : Interfaces.Unsigned_16;
+                  Count                       : Interfaces.Unsigned_16;
+                  Expose_Pad                  : Interfaces.Unsigned_16;
                when Configure_Notify =>
                   Configure_Event_Window      : XCB.Window.T;
                   Configured_Window           : XCB.Window.T;
============================================================
--- xcb.gpr	7bdc5629c63c21fab02656b3b6f22ab507a0029c
+++ xcb.gpr	3620ab57cbb97f6d1879b5d68b2af8e05670343f
@@ -1,7 +1,7 @@ library project XCB is
 library project XCB is
    for Source_Dirs use (".");
    for Library_ALI_Dir use "lib";
-   for Library_Name use "libxadabinding.so.0";
+   for Library_Name use "xadabinding.so.0";
    for Library_Kind use "dynamic";
    for Library_Dir use "lib";
    for Object_Dir use ".o";
============================================================
--- xcb_value_list_g.adb	788761105d54168635193747918c0f7eabbe386f
+++ xcb_value_list_g.adb	abf12bb134098f2962dd9123162fa02d44f51c5c
@@ -5,7 +5,8 @@ package body XCB_Value_List_G is
    function Mask_Of (Values : in T) return Interfaces.Unsigned_32 is
       Result   : Mask_T := (others => False);
       Last_Key : Key_T := Key_T'First;
-      function To_Integer is new Ada.Unchecked_Conversion (Mask_T, Interfaces.Unsigned_32);
+      function To_Integer is
+         new Ada.Unchecked_Conversion (Mask_T, Interfaces.Unsigned_32);
    begin
       for K in Values'Range loop
          pragma Assert (K = Values'First or else Values (K).Key > Last_Key);
============================================================
--- xcb_value_list_g.ads	f00a24a7d141e65c285fdf4a20bbd1405fca9db7
+++ xcb_value_list_g.ads	5b6dbb60d2d16adfe87a88dcb481fc0b32886b7b
@@ -8,10 +8,9 @@ package XCB_Value_List_G is
       Value  : Interfaces.Unsigned_32;
    end record;
    type T is array (Positive range <>) of Key_Value_Pair_T;
-   
+
    type Mask_T is array (Key_T) of Boolean;
    pragma Pack (Mask_T);
-   for Mask_T'Size use 32;
    pragma Warnings (Off, Mask_T); -- unused bits
 
    function Mask_Of (Values : in T) return Interfaces.Unsigned_32;


  reply	other threads:[~2015-01-19 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-18 10:02 Can't compile FOSDEM 2014 Ada Task Pools demo on Debian jessie Dirk Heinrichs
2015-01-19 20:44 ` Ludovic Brenta [this message]
2015-01-20 18:52   ` Dirk Heinrichs
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox