Lloyd Thomas
Lloyd Thomas

Reputation: 356

Ada - aspect identifier expected

I've recently started using the gnatcoll, gnatcoll_sql, gnatcoll_postgres libraries within GNAT GPS Community Edition.

My default.gpr file looks like this..


with "gnatcoll";
with "gnatcoll_postgres";



project Default is

   for Source_Dirs use ("src");
   for Object_Dir use "obj";
   for Main use ("main.adb");

   package Compiler is
      for Switches ("ada") use ("-gnat12");
   end Compiler;

end Default;

My main file looks like this

with gnatcoll.SQL.Postgres;  use gnatcoll.SQL.Postgres;
with gnatcoll.SQL.Exec;      use gnatcoll.SQL.Exec;
with Ada.Text_IO;            use Ada.Text_IO;


procedure Main is

begin


   Ada.Text_IO.Put_Line("Test");



end Main;

When I Execute I receive the following error message...

gprbuild -d -P/home/parallels/Documents/Ada Projects/Connect to Database 2/default.gpr -XGNATCOLL_OS=unix -XBUILD=PROD -XXMLADA_BUILD=static -XLIBRARY_TYPE=static -XGNATCOLL_CORE_BUILD=static -XGNATCOLL_BUILD=static /home/parallels/Documents/Ada Projects/Connect to Database 2/src/main.adb
gcc -c -gnat12 main.adb
gnatcoll-sql.ads:747:12: aspect identifier expected
gnatcoll-strings_impl.ads:315:10: aspect identifier expected
gnatcoll-strings_impl.ads:318:52: aspect identifier expected
gnatcoll-strings_impl.ads:393:15: aspect identifier expected
gnatcoll-strings_impl.ads:396:51: aspect identifier expected
gprbuild: *** compilation phase failed
[2020-04-22 09:36:12] process exited with status 4, 6% (1/16), elapsed time: 00.75s
[2020-04-22 10:00:24] Could not locate executable on path: xterm

I'm dubious to attempt to alter this code, as it's within the gnatcoll library. Please can anyone advise me if I should alter the code within gnatcoll-strings_impl.ads & gnatcoll-sql.ads Or is there another solution?

I couldn't include the gnatcoll-strings_impl.ads & gnatcoll-sql.ads files below for reference, as they're too large! Here are some screen shots for reference...

enter image description here

enter image description here

enter image description here

Added 29/04/20


Builder results
    /home/parallels/gnatcoll-db/sql/gnatcoll-sql_impl.adb
        30:14 warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
    /home/parallels/gnatcoll-db/sql/gnatcoll-sql_impl.ads
        30:14 warning: license of withed unit "GNATCOLL.Refcount" may be inconsistent
    /home/parallels/opt/GNAT/2019/include/gnatcoll/gnatcoll-atomic.ads
        38:29 "-" not declared in "Atomic_Counters"
        104:37 "=" not declared in "Atomic_Counters"
        97:33 ">" not declared in "Atomic_Counters"
        35:52 "Atomic_Unsigned" not declared in "Atomic_Counters"

Added 02/05/20


[parallels@localhost ~]$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[parallels@localhost ~]$ sudo yum -y install gcc
[sudo] password for parallels: 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * epel: mirrors.coreix.net
 * extras: mirror.netweaver.uk
 * updates: www.mirrorservice.org
Package gcc-4.8.5-39.el7.x86_64 already installed and latest version
Nothing to do
[parallels@localhost ~]$ 

Upvotes: 1

Views: 589

Answers (0)

Related Questions