Menu

#56 Compilation failed with alire and gnat_native 12.2.1.

2.1
closed
Blady
None
2023-01-28
2023-01-28
No

Hi Ada community,

I am learning Ada and try to build a webapp with gnoga.
I use alire and gnat_native 12.2.1 to create a new alire crate.

alr init codefirst_dockerproxy_clientweb --bin
cd codefirst_dockerproxy_clientweb
alr with gnoga
# everything works fine

and then I edit the default created src/codefirst_dockerproxy_clientweb.adb

with gnoga;

procedure Codefirst_Dockerproxy_Clientweb is
begin
   null;
end Codefirst_Dockerproxy_Clientweb;

and alr build

Setup
   [mkdir]        object directory for project Lib_UXStrings1
   [mkdir]        library directory for project Lib_UXStrings1
   [mkdir]        object directory for project Lib_Gnoga
   [mkdir]        library directory for project Lib_Gnoga
   [mkdir]        object directory for project Codefirst_Dockerproxy_Clientweb
   [mkdir]        exec directory for project Codefirst_Dockerproxy_Clientweb
Compile
   [Ada]          codefirst_dockerproxy_clientweb.adb
   [Ada]          uxstrings-text_io-text_streams.adb
   [Ada]          uxstrings-formatting.adb
   [Ada]          uxstrings-hash.adb
   [Ada]          uxstrings-conversions.adb
   [Ada]          uxstrings-hash_case_insensitive.adb
   [Ada]          uxstrings1.adb
   [Ada]          uxstrings-text_io1.adb
uxstrings1.ads:93:81: error: strings are delimited by double quote character
uxstrings1.ads:96:81: error: strings are delimited by double quote character
uxstrings1.ads:108:92: error: strings are delimited by double quote character
uxstrings1.ads:111:73: error: strings are delimited by double quote character
uxstrings-text_io1.adb:142:21: warning: formal parameter "File" is not referenced [-gnatwf]
uxstrings-text_io1.adb:142:46: warning: formal parameter "Mode" is not referenced [-gnatwu]
uxstrings-text_io1.adb:144:36: warning: Reset unimplemented [enabled by default]
uxstrings-text_io1.adb:152:21: warning: formal parameter "File" is not referenced [-gnatwf]
uxstrings-text_io1.adb:154:36: warning: Reset unimplemented [enabled by default]
uxstrings-text_io1.adb:352:21: warning: formal parameter "File" is not referenced [-gnatwu]
uxstrings-text_io1.adb:354:36: warning: Flush unimplemented [enabled by default]
uxstrings-text_io1.adb:364:36: warning: Flush unimplemented [enabled by default]
uxstrings-text_io1.adb:372:31: warning: formal parameter "File" is not referenced [-gnatwu]
uxstrings-text_io1.adb:372:52: warning: formal parameter "To" is not referenced [-gnatwu]
uxstrings-text_io1.adb:374:36: warning: Set_Line_Length unimplemented [enabled by default]
uxstrings-text_io1.adb:382:31: warning: formal parameter "To" is not referenced [-gnatwu]
uxstrings-text_io1.adb:384:36: warning: Set_Line_Length unimplemented [enabled by default]
...

Here is my toolchain:

CRATE       VERSION       STATUS    NOTES                               
gprbuild    22.0.1        Default                                       
gprbuild    2021.0.0+0778 Available Provided by system package: gprbuild
gnat_native 11.2.4        Available                                     
gnat_native 12.2.1        Default                                       

How can I solve this ?

Thanks

Discussion

  • Blady

    Blady - 2023-01-28
    • status: open --> accepted
    • assigned_to: Blady
    • Milestone: 1.6 --> 2.1
     
  • Blady

    Blady - 2023-01-28

    Hi Thomas,
    This is a side effect of gprbuild with Alire which overloads compilation options of UXStrings with those of the main program. I haven't yet found a fix.
    A possible work around consists by adding -gnatW8 in compilation options of your main program.
    Regards, Pascal.

     
    • Anonymous

      Anonymous - 2023-01-28

      Hi Pascal,
      Thanks, the workaround works like a charm.
      Thomas

       
  • Blady

    Blady - 2023-01-28
    • status: accepted --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB