From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:2190:b0:71f:b917:f4ec with SMTP id g16-20020a05620a219000b0071fb917f4ecmr2216686qka.15.1677198527699; Thu, 23 Feb 2023 16:28:47 -0800 (PST) X-Received: by 2002:a05:6808:9a4:b0:37a:d91c:da8e with SMTP id e4-20020a05680809a400b0037ad91cda8emr507296oig.10.1677198527386; Thu, 23 Feb 2023 16:28:47 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 23 Feb 2023 16:28:47 -0800 (PST) In-Reply-To: <9e4d44f2-9bb5-4c8b-91d5-0e96045a0d0cn@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=184.98.162.11; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG NNTP-Posting-Host: 184.98.162.11 References: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com> <022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com> <9e4d44f2-9bb5-4c8b-91d5-0e96045a0d0cn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS" From: Jerry Injection-Date: Fri, 24 Feb 2023 00:28:47 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:64979 List-Id: More info. * I reduced the MWE to not referencing Common package=E2=80=94it=E2=80=99s = 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 =E2=80=9Cwith GNAT.OS_Lib=E2=80=9D in main= and =E2=80=9Cfor Casing use "mixedcase=E2=80=9D=E2=80=9D in .gpr. Results summary: * Compiling with gnatmake works always. * Compiling with gprbuild shows dependence between presence or absence of t= he two lines. Details follow. * Recall that I am on MacOS. I have had to use the =E2=80=9Cmixedcase=E2=80= =9D 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; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D Build command, gprbuild: gprbuild -p /Users/jb/Documents/Programs/Ada/Code/My_Projects/TextMate_Samp= ling/build.gpr GPR file, build.gpr: project Build is for Source_Dirs use=20 ("/Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snippe= ts_and_Notes"); for Object_Dir use "build-normal"; for Exec_Dir use "product-normal"; =20 for Main use ("test_gnats_problem.adb"); =20 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 C= asing 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 give= n at line 50 gprbind: compilation of binder generated file failed gprbuild: unable to bind test_gnats_problem.adb =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D Build command, gnatmake, with output. Produces the same result (compiles) with or without =E2=80=9Cwith GNAT.OS_L= ib=E2=80=9D $ gnatmake /Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snipp= ets_and_Notes/test_gnats_problem.adb gcc -c -I/Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snippet= s_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