comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry <list_email@icloud.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
Date: Thu, 23 Feb 2023 16:34:31 -0800 (PST)	[thread overview]
Message-ID: <8f22b571-4661-4e00-b893-ed52e6184810n@googlegroups.com> (raw)
In-Reply-To: <b78aedc7-2652-46cb-86c1-12045bb0f46an@googlegroups.com>

On Thursday, February 23, 2023 at 5:28:48 PM UTC-7, Jerry wrote:
> More info. 
> 
> * I reduced the MWE to not referencing Common package—it’s now only a main program. 
> * I changed file name and program name to lower case. 
> * I stripped down my .gpr file to nearly bare minimum. 
> * Observe presence or absence of “with GNAT.OS_Lib” in main and “for Casing use "mixedcase”” in .gpr. 
> Results summary: 
> * Compiling with gnatmake works always. 
> * Compiling with gprbuild shows dependence between presence or absence of the two lines. Details follow. 
> * Recall that I am on MacOS. I have had to use the “mixedcase” flag to mitigate other problems in the past. 
> * My current workaround is to not use GNAT.OS_Lib which is sub-optimal. 
> 
> 
> Main program (Lower-case file and procedure names), test_gnats_problem.adb 
> 
> -- with GNAT.OS_Lib; -- <<<<< 
> procedure test_gnats_problem is 
> begin 
> null; 
> end test_gnats_problem; 
> 
> =========================================================== 
> 
> Build command, gprbuild: 
> 
> gprbuild -p /Users/jb/Documents/Programs/Ada/Code/My_Projects/TextMate_Sampling/build.gpr 
> 
> GPR file, build.gpr: 
> 
> project Build is 
> for Source_Dirs use 
> ("/Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snippets_and_Notes"); 
> for Object_Dir use "build-normal"; 
> for Exec_Dir use "product-normal"; 
> 
> for Main use ("test_gnats_problem.adb"); 
> 
> package Builder is 
> for Default_Switches ("Ada") use ("-gnat12"); 
> for Executable ("test_gnats_problem.adb") use "run"; 
> end Builder; 
> 
> package Naming is 
> -- for Casing use "mixedcase"; -- <<<<< 
> end Naming; 
> end Build; 
> 
> 
> Results: Y Compiles, N Does not compile 
> 
> for Casing use "mixedcase" -- for Casing use "mixedcase" 
> with GNAT.OS_Lib N Y 
> -- with GNAT.OS_Lib Y Y 
> 
> gprbuild Output: 
> 
> Compile 
> [Ada] test_gnats_problem.adb 
> Bind 
> [gprbind] test_gnats_problem.bexch 
> [Ada] test_gnats_problem.ali 
> b__test_gnats_problem.ads:144:30: error: external name duplicates name given at line 50
> gprbind: compilation of binder generated file failed
> gprbuild: unable to bind test_gnats_problem.adb 
> 
> =========================================================== 
> 
> Build command, gnatmake, with output. 
> Produces the same result (compiles) with or without “with GNAT.OS_Lib” 
> 
> $ gnatmake /Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snippets_and_Notes/test_gnats_problem.adb 
> gcc -c -I/Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snippets_and_Notes/ -I- /Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snippets_and_Notes/test_gnats_problem.adb
> gnatbind -x test_gnats_problem.ali 
> gnatlink test_gnats_problem.ali
Google Groups clobbered my indentation. Here is the little "Y" and "N" table in another form:

Compiles with either or both of "with GNAT.OS_Lib", "for Casing use "mixedcase"" absent.
Doesn't compile with both of "with GNAT.OS_Lib", "for Casing use "mixedcase"" present.

Jerry

  reply	other threads:[~2023-02-24  0:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21  0:11 Weird error emanating from GNAT binder: duplicat "gnatS" Jerry
2023-02-21 22:59 ` Jerry
2023-02-22  5:53   ` Niklas Holsti
2023-02-22  8:50     ` Jerry
2023-02-22  9:37       ` Jeffrey R.Carter
2023-02-22  9:49         ` Jerry
2023-02-22 14:26         ` Simon Wright
2023-02-23  6:34           ` Jerry
2023-02-23 12:57             ` Niklas Holsti
2023-02-24 20:22               ` Jeffrey R.Carter
2023-02-22  9:39       ` Jerry
2023-02-23 13:16         ` Simon Wright
2023-02-23 19:33           ` Jerry
2023-02-24  0:28             ` Jerry
2023-02-24  0:34               ` Jerry [this message]
2023-02-24  8:07                 ` R R
2023-02-26  5:30                   ` Jerry
replies disabled

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