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:a37:6443:0:b0:742:7044:97bc with SMTP id y64-20020a376443000000b00742704497bcmr158672qkb.6.1677198872430; Thu, 23 Feb 2023 16:34:32 -0800 (PST) X-Received: by 2002:a05:6830:335f:b0:68b:cbcf:c24b with SMTP id l31-20020a056830335f00b0068bcbcfc24bmr977202ott.4.1677198872198; Thu, 23 Feb 2023 16:34:32 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.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:34:31 -0800 (PST) In-Reply-To: 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: <8f22b571-4661-4e00-b893-ed52e6184810n@googlegroups.com> Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS" From: Jerry Injection-Date: Fri, 24 Feb 2023 00:34:32 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 5172 Xref: reader01.eternal-september.org comp.lang.ada:64980 List-Id: On Thursday, February 23, 2023 at 5:28:48=E2=80=AFPM UTC-7, Jerry wrote: > More info.=20 >=20 > * I reduced the MWE to not referencing Common package=E2=80=94it=E2=80=99= s now only a main program.=20 > * I changed file name and program name to lower case.=20 > * I stripped down my .gpr file to nearly bare minimum.=20 > * Observe presence or absence of =E2=80=9Cwith GNAT.OS_Lib=E2=80=9D in ma= in and =E2=80=9Cfor Casing use "mixedcase=E2=80=9D=E2=80=9D in .gpr.=20 > Results summary:=20 > * Compiling with gnatmake works always.=20 > * Compiling with gprbuild shows dependence between presence or absence of= the two lines. Details follow.=20 > * 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.=20 > * My current workaround is to not use GNAT.OS_Lib which is sub-optimal.= =20 >=20 >=20 > Main program (Lower-case file and procedure names), test_gnats_problem.ad= b=20 >=20 > -- with GNAT.OS_Lib; -- <<<<<=20 > procedure test_gnats_problem is=20 > begin=20 > null;=20 > end test_gnats_problem;=20 >=20 > =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=20 >=20 > Build command, gprbuild:=20 >=20 > gprbuild -p /Users/jb/Documents/Programs/Ada/Code/My_Projects/TextMate_Sa= mpling/build.gpr=20 >=20 > GPR file, build.gpr:=20 >=20 > project Build is=20 > for Source_Dirs use=20 > ("/Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snippets_and= _Notes");=20 > for Object_Dir use "build-normal";=20 > for Exec_Dir use "product-normal";=20 >=20 > for Main use ("test_gnats_problem.adb");=20 >=20 > package Builder is=20 > for Default_Switches ("Ada") use ("-gnat12");=20 > for Executable ("test_gnats_problem.adb") use "run";=20 > end Builder;=20 >=20 > package Naming is=20 > -- for Casing use "mixedcase"; -- <<<<<=20 > end Naming;=20 > end Build;=20 >=20 >=20 > Results: Y Compiles, N Does not compile=20 >=20 > for Casing use "mixedcase" -- for Casing use "mixedcase"=20 > with GNAT.OS_Lib N Y=20 > -- with GNAT.OS_Lib Y Y=20 >=20 > gprbuild Output:=20 >=20 > Compile=20 > [Ada] test_gnats_problem.adb=20 > Bind=20 > [gprbind] test_gnats_problem.bexch=20 > [Ada] test_gnats_problem.ali=20 > b__test_gnats_problem.ads:144:30: error: external name duplicates name gi= ven at line 50 > gprbind: compilation of binder generated file failed > gprbuild: unable to bind test_gnats_problem.adb=20 >=20 > =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=20 >=20 > Build command, gnatmake, with output.=20 > Produces the same result (compiles) with or without =E2=80=9Cwith GNAT.OS= _Lib=E2=80=9D=20 >=20 > $ gnatmake /Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Sni= ppets_and_Notes/test_gnats_problem.adb=20 > gcc -c -I/Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_and_Snipp= ets_and_Notes/ -I- /Users/jb/Documents/Programs/Ada/Code/My_Code/Examples_a= nd_Snippets_and_Notes/test_gnats_problem.adb > gnatbind -x test_gnats_problem.ali=20 > gnatlink test_gnats_problem.ali Google Groups clobbered my indentation. Here is the little "Y" and "N" tabl= e in another form: Compiles with either or both of "with GNAT.OS_Lib", "for Casing use "mixedc= ase"" absent. Doesn't compile with both of "with GNAT.OS_Lib", "for Casing use "mixedcase= "" present. Jerry