Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Your good nature will bring you unbounded happiness.


devel / comp.lang.ada / Re: Weird error emanating from GNAT binder: duplicat "gnatS"

SubjectAuthor
* Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
`* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
 `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Niklas Holsti
  `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
   +* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jeffrey R.Carter
   |+- Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
   |`* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Simon Wright
   | `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
   |  `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Niklas Holsti
   |   `- Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jeffrey R.Carter
   `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
    `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Simon Wright
     `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
      `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
       `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry
        `* Re: Weird error emanating from GNAT binder: duplicat "gnatS"R R
         `- Re: Weird error emanating from GNAT binder: duplicat "gnatS"Jerry

1
Weird error emanating from GNAT binder: duplicat "gnatS"

<365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9354&group=comp.lang.ada#9354

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:622a:1b18:b0:3bd:17aa:49b2 with SMTP id bb24-20020a05622a1b1800b003bd17aa49b2mr511835qtb.5.1676938300257;
Mon, 20 Feb 2023 16:11:40 -0800 (PST)
X-Received: by 2002:a05:6808:209e:b0:379:ed2a:be6d with SMTP id
s30-20020a056808209e00b00379ed2abe6dmr682309oiw.129.1676938300026; Mon, 20
Feb 2023 16:11:40 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Mon, 20 Feb 2023 16:11:39 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=184.98.162.11; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG
NNTP-Posting-Host: 184.98.162.11
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>
Subject: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Tue, 21 Feb 2023 00:11:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3086
 by: Jerry - Tue, 21 Feb 2023 00:11 UTC

I have the following program...

with Common;
procedure Test_gnatS_Problem is
begin
null;
end Test_gnatS_Problem;

which is complied with GNAT 12.2.0 on MacOS 12.5. This minimal example is of course reduced from a useful program of mine. I am not including the gpr file here unless someone wants to see it. The output is...

Compile
[Ada] Test_gnatS_Problem.adb
[Ada] common.adb
[Ada] signal_processing.adb
[Ada] GSL_Thin.adb
GSL_Thin.adb:27:09: warning: unreachable code [enabled by default]
[Ada] numerical_recipes.adb
numerical_recipes.adb:209:13: warning: unreachable code [enabled by default]
[Ada] signals.adb
Bind
[gprbind] Test_gnatS_Problem.bexch
[Ada] Test_gnatS_Problem.ali
b__Test_gnatS_Problem.ads:582:30: error: external name duplicates name given at line 578
gprbind: compilation of binder generated file failed
gprbuild: unable to bind Test_gnatS_Problem.adb

I don't believe the warnings are germain. Here are a few lines from the referenced b__Test_gnatS_Problem.ads...

575 u00267 : constant Version_32 := 16#db4cf09e#;
576 pragma Export (C, u00267, "ada__strings__superboundedS");
577 u00268 : constant Version_32 := 16#b5988c27#;
578 pragma Export (C, u00268, "gnatS");
579 u00269 : constant Version_32 := 16#1a69b526#;
580 pragma Export (C, u00269, "gnat__os_libS");
581 u00270 : constant Version_32 := 16#b5988c27#;
582 pragma Export (C, u00270, "gnatS");
583 u00271 : constant Version_32 := 16#aebf1ee6#;
584 pragma Export (C, u00271, "system__byte_swappingS");

From the docs' listing of compiler switches...

-gnatS Print package Standard

Possibly relevant is that common and signal_processiung "with" eacb other and I have added a "limited with Signal_Processing" to common.ads.

I have no idea what is happening. I have compiled these sources zillions of times without seeing this problem. There is no reported problem with the source files, only the b_ file.

Jerry

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9355&group=comp.lang.ada#9355

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a0c:8c88:0:b0:56e:bfd7:8b38 with SMTP id p8-20020a0c8c88000000b0056ebfd78b38mr905671qvb.24.1677020346855;
Tue, 21 Feb 2023 14:59:06 -0800 (PST)
X-Received: by 2002:a05:6808:148b:b0:378:5c05:16e3 with SMTP id
e11-20020a056808148b00b003785c0516e3mr1751220oiw.171.1677020346578; Tue, 21
Feb 2023 14:59:06 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.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: Tue, 21 Feb 2023 14:59:06 -0800 (PST)
In-Reply-To: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@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>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Tue, 21 Feb 2023 22:59:06 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1381
 by: Jerry - Tue, 21 Feb 2023 22:59 UTC

On Monday, February 20, 2023 at 5:11:41 PM UTC-7, Jerry wrote:
> I have the following program...

Please let me summarize my problem: I have an Ada program which GNAT indicates has no errors but which it refuses to compile.

Jerry

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<k5loupF7kt3U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9356&group=comp.lang.ada#9356

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.holsti@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
Date: Wed, 22 Feb 2023 07:53:29 +0200
Organization: Tidorum Ltd
Lines: 27
Message-ID: <k5loupF7kt3U1@mid.individual.net>
References: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>
<022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net jeGMjohcN5YR6T1lUoAK4APVbGXl74YvyYE5kesrKaAOH4ziWI
Cancel-Lock: sha1:rIBwr4vbKNvdfYeqqEa+R+roqq4=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.6.1
Content-Language: en-US
In-Reply-To: <022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>
 by: Niklas Holsti - Wed, 22 Feb 2023 05:53 UTC

On 2023-02-22 0:59, Jerry wrote:
> On Monday, February 20, 2023 at 5:11:41 PM UTC-7, Jerry wrote:
>> I have the following program...
>
> Please let me summarize my problem: I have an Ada program which GNAT
> indicates has no errors but which it refuses to compile.
>
> Jerry

Well, as you have shown only a part of the source code, it becomes a
guessing game for us others... but, since the compiler is pointing to an
error in a compiler-generated file, it seems likely that there is some
kind of compiler bug here. This bug seems to be activated by the
"limited with", if that is the main thing that you have changed since
the program last compiled successfully.

The compiler bug could be in the generation of the compiler-generated
file, or it could be a bug in checking the source code, with the effect
of not detecting or not reporting some error (illegality) in your source
code, which then somehow propagates within the compiler and makes the
compiler generate the faulty compiler-generated file.

You might report the bug to AdaCore, and/or try other versions of GNAT,
or othe Ada compilers. But the quickest way to continue is probably to
find a work-around, for example change the architecture so that you do
not need the "limited with" that seems to be triggering the problem.

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9357&group=comp.lang.ada#9357

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a0c:8c46:0:b0:571:efc8:ee06 with SMTP id o6-20020a0c8c46000000b00571efc8ee06mr609482qvb.24.1677055822293;
Wed, 22 Feb 2023 00:50:22 -0800 (PST)
X-Received: by 2002:a05:6808:1484:b0:378:5c05:16e3 with SMTP id
e4-20020a056808148400b003785c0516e3mr35335oiw.171.1677055821966; Wed, 22 Feb
2023 00:50:21 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Wed, 22 Feb 2023 00:50:21 -0800 (PST)
In-Reply-To: <k5loupF7kt3U1@mid.individual.net>
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> <k5loupF7kt3U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Wed, 22 Feb 2023 08:50:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4189
 by: Jerry - Wed, 22 Feb 2023 08:50 UTC

On Tuesday, February 21, 2023 at 10:53:33 PM UTC-7, Niklas Holsti wrote:
> On 2023-02-22 0:59, Jerry wrote:
> > On Monday, February 20, 2023 at 5:11:41 PM UTC-7, Jerry wrote:
> >> I have the following program...
> >
> > Please let me summarize my problem: I have an Ada program which GNAT
> > indicates has no errors but which it refuses to compile.
> >
> > Jerry
> Well, as you have shown only a part of the source code, it becomes a
> guessing game for us others... but, since the compiler is pointing to an
> error in a compiler-generated file, it seems likely that there is some
> kind of compiler bug here. This bug seems to be activated by the
> "limited with", if that is the main thing that you have changed since
> the program last compiled successfully.
>
> The compiler bug could be in the generation of the compiler-generated
> file, or it could be a bug in checking the source code, with the effect
> of not detecting or not reporting some error (illegality) in your source
> code, which then somehow propagates within the compiler and makes the
> compiler generate the faulty compiler-generated file.
>
> You might report the bug to AdaCore, and/or try other versions of GNAT,
> or othe Ada compilers. But the quickest way to continue is probably to
> find a work-around, for example change the architecture so that you do
> not need the "limited with" that seems to be triggering the problem.

Since my most recent post, and before I read this note from Niklas, I
* Removed the circular dependency between packages common and signal_processing and consequently was able to remove the "limited with" clause.
* Reinstalled the compiler.
Neither of these had any effect--the problem remains.

To NIklas's note:
* I would be happy to supply all of the code but it is very long, thousands of lines across several packages.
* Yes, a possible compiler hiccup; but I have no clue or power to figure out what is wrong, since it is not pointing to my code.
* The "limited with" has been in the code for a few years; the problem that I am reporting has begun only about 2-3 days ago. At that point, I was adding a function to common.adb and common.ads; upon recompiling, the bug appeared. When I restored those files from backup, the problem remained. To be clear, the "limited with" has been present for a long time with successful compilation until 2-3 days ago.
* As far as I know, which is pretty far, the source code hasn't changed. As we all know, those are famous last words. :-| But the compiler isn't point to my code.
* As I wrote above, I re-wrote the code and removed the "limited with."

I am an individual researcher with no resources outside of bothering people such as those on this list, and at this point my work has come to a screeching halt.

Jerry

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<tt4nok$1fe4m$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9358&group=comp.lang.ada#9358

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
Date: Wed, 22 Feb 2023 10:37:24 +0100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <tt4nok$1fe4m$1@dont-email.me>
References: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>
<022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>
<k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 22 Feb 2023 09:37:25 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="34227b80dd9365e1b2a7a8952aa0d862";
logging-data="1554582"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fr73uM4bQx6Y8Le2hE/ZkKGgjvtZalfM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.7.1
Cancel-Lock: sha1:cCX5qs8tH59FiyYnJX8PLowG1oM=
In-Reply-To: <f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>
Content-Language: en-US
 by: Jeffrey R.Carter - Wed, 22 Feb 2023 09:37 UTC

On 2023-02-22 09:50, Jerry wrote:
>
> Since my most recent post, and before I read this note from Niklas, I
> * Removed the circular dependency between packages common and signal_processing and consequently was able to remove the "limited with" clause.

> * The "limited with" has been in the code for a few years; the problem that I am reporting has begun only about 2-3 days ago. At that point, I was adding a function to common.adb and common.ads; upon recompiling, the bug appeared. When I restored those files from backup, the problem remained. To be clear, the "limited with" has been present for a long time with successful compilation until 2-3 days ago.

> * As far as I know, which is pretty far, the source code hasn't changed. As we all know, those are famous last words. :-| But the compiler isn't point to my code.

The first two statements seem to contradict the third. I will presume that you
have returned the code to the state that previously built successfully, and are
still getting the problem.

Something must have changed (unless GNAT 12 has a time bomb). How long have you
been using the version of the compiler that gives you the error?

I would suggest deleting all compiler artifacts: .ali, .o[bj], executable, and
trying again.

You could also try using gnatmake without a project file rather than gprbuild or
gnatmake with a project file to see if that has any effect.

GNAT 12 has significant known errors that prevent it from compiling legal code.
I'm sticking with V11[.3] until they're resolved. You might need to do the same.

--
Jeff Carter
“If it can't be expressed in figures,
it is not science--it is opinion.”
The Notebooks of Lazarus Long
210

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<d87b4b85-48db-473f-b4d7-47d19d890fddn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9359&group=comp.lang.ada#9359

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ad4:57c4:0:b0:570:f1a0:996f with SMTP id y4-20020ad457c4000000b00570f1a0996fmr944079qvx.2.1677058780597;
Wed, 22 Feb 2023 01:39:40 -0800 (PST)
X-Received: by 2002:a05:6870:2e0d:b0:16d:8e4a:fe38 with SMTP id
oi13-20020a0568702e0d00b0016d8e4afe38mr1013948oab.291.1677058780271; Wed, 22
Feb 2023 01:39:40 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Wed, 22 Feb 2023 01:39:40 -0800 (PST)
In-Reply-To: <f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@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> <k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d87b4b85-48db-473f-b4d7-47d19d890fddn@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Wed, 22 Feb 2023 09:39:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2576
 by: Jerry - Wed, 22 Feb 2023 09:39 UTC

On Wednesday, February 22, 2023 at 1:50:23 AM UTC-7, Jerry wrote:
> On Tuesday, February 21, 2023 at 10:53:33 PM UTC-7, Niklas Holsti wrote:

I just remembered something that I forgot to mention. In December 2022 I got a new MacBook Pro with an Apple M1 Pro CPU. Consequently, I installed Simon's ARM compiler from https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-12.2.0-aarch64. When I restored common.adb and common.ads from backup, as I mentioned above after the problem appeared, I noticed that they were last edited in September 2022. Surely these files were recompiled with the new compiler in December 2022, right? Is it possible that I have been running old binaries for common.ads/b under the translator Rosetta 2 without realizing it? That the new compiler decided that these files didn't need to be recompiled because it saw the old x86-64 binaries ? Or that these files were compiled for the first time with the new compiler only 2-3 days ago, revealing a compiler bug? To be clear, I have been running successfully, since December 2022, other main programs that link to common and its dependencies—I had no need to edit common until 2-3 days ago.

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<aa09356a-38f9-4ef2-a265-a7d1e8b823c6n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9360&group=comp.lang.ada#9360

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:405b:0:b0:3bd:142a:cb21 with SMTP id j27-20020ac8405b000000b003bd142acb21mr1004066qtl.0.1677059381215;
Wed, 22 Feb 2023 01:49:41 -0800 (PST)
X-Received: by 2002:a05:6808:152a:b0:383:cdd2:c066 with SMTP id
u42-20020a056808152a00b00383cdd2c066mr96571oiw.95.1677059380923; Wed, 22 Feb
2023 01:49:40 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Wed, 22 Feb 2023 01:49:40 -0800 (PST)
In-Reply-To: <tt4nok$1fe4m$1@dont-email.me>
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> <k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com> <tt4nok$1fe4m$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aa09356a-38f9-4ef2-a265-a7d1e8b823c6n@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Wed, 22 Feb 2023 09:49:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3772
 by: Jerry - Wed, 22 Feb 2023 09:49 UTC

On Wednesday, February 22, 2023 at 2:37:27 AM UTC-7, Jeffrey R.Carter wrote:
> On 2023-02-22 09:50, Jerry wrote:
> >
> > Since my most recent post, and before I read this note from Niklas, I
> > * Removed the circular dependency between packages common and signal_processing and consequently was able to remove the "limited with" clause.
> > * The "limited with" has been in the code for a few years; the problem that I am reporting has begun only about 2-3 days ago. At that point, I was adding a function to common.adb and common.ads; upon recompiling, the bug appeared. When I restored those files from backup, the problem remained. To be clear, the "limited with" has been present for a long time with successful compilation until 2-3 days ago.
>
> > * As far as I know, which is pretty far, the source code hasn't changed.. As we all know, those are famous last words. :-| But the compiler isn't point to my code.
> The first two statements seem to contradict the third. I will presume that you
> have returned the code to the state that previously built successfully, and are
> still getting the problem.
That is correct. Only after experiencing the problem with what I believe is the original code did I remove the limited with, and the problem remains without the limited with.
>
> Something must have changed (unless GNAT 12 has a time bomb). How long have you
> been using the version of the compiler that gives you the error?
Please see my previous post which I was writing at the time of your post. I think it answers your question.
>
> I would suggest deleting all compiler artifacts: .ali, .o[bj], executable, and
> trying again.
I did that. Multiple times. No help.
>
> You could also try using gnatmake without a project file rather than gprbuild or
> gnatmake with a project file to see if that has any effect.
I thought about that but I'm not sure how to do it. I guess the easiest way would be to make a new directory and put copies of the needed files in it so I don't have to make a bunch of weird switches.
>
> GNAT 12 has significant known errors that prevent it from compiling legal code.
Wow. Good to know.
> I'm sticking with V11[.3] until they're resolved. You might need to do the same.

Not sure what the Mac/ARM situation is with V11.
Jerry

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<ly7cw9lqs7.fsf@pushface.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9361&group=comp.lang.ada#9361

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: simon@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
Date: Wed, 22 Feb 2023 14:26:48 +0000
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <ly7cw9lqs7.fsf@pushface.org>
References: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>
<022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>
<k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>
<tt4nok$1fe4m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="6ea4b2ba6838424905c28f0564e7c159";
logging-data="1627781"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19H3YDGjmuUfGoM5tX0Pemdbc21r6NIYOI="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin)
Cancel-Lock: sha1:Zqr8fXE3RQSiAT8zLR93lvqiWqs=
sha1:MRj/poRDbEAOUetxCWbE4EK8g3s=
 by: Simon Wright - Wed, 22 Feb 2023 14:26 UTC

"Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> writes:

> You could also try using gnatmake without a project file rather than
> gprbuild or gnatmake with a project file to see if that has any
> effect.

If you give gnatmake a project file and it finds gprbuild on the PATH,
it'll delegate to gprbuild.

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<eee74164-490d-4794-8d3d-d31d7ffe9f13n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9366&group=comp.lang.ada#9366

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:9d7:b0:71f:b8ba:ff43 with SMTP id y23-20020a05620a09d700b0071fb8baff43mr1420477qky.1.1677134077133;
Wed, 22 Feb 2023 22:34:37 -0800 (PST)
X-Received: by 2002:a05:6870:2195:b0:16e:2bc7:7715 with SMTP id
l21-20020a056870219500b0016e2bc77715mr1267276oae.223.1677134076880; Wed, 22
Feb 2023 22:34:36 -0800 (PST)
Path: i2pn2.org!i2pn.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: Wed, 22 Feb 2023 22:34:36 -0800 (PST)
In-Reply-To: <ly7cw9lqs7.fsf@pushface.org>
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> <k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com> <tt4nok$1fe4m$1@dont-email.me>
<ly7cw9lqs7.fsf@pushface.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eee74164-490d-4794-8d3d-d31d7ffe9f13n@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Thu, 23 Feb 2023 06:34:37 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1824
 by: Jerry - Thu, 23 Feb 2023 06:34 UTC

I deleted lines from common.adb and common.ads piecemeal until I arrived at this MWE:

with Common;
procedure Test_gnatS_Problem is
begin
null;
end Test_gnatS_Problem;

package body Common is
procedure Dummy is
begin
null;
end Dummy;
end Common;

with GNAT.OS_Lib; -- Error disappears when this line is removed.
package Common is
procedure Dummy;
end Common;

Surely this is enough for someone to work with in fixing this problem.

Jerry

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<k5p66gFnmmtU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9367&group=comp.lang.ada#9367

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.holsti@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
Date: Thu, 23 Feb 2023 14:57:52 +0200
Organization: Tidorum Ltd
Lines: 32
Message-ID: <k5p66gFnmmtU1@mid.individual.net>
References: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>
<022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>
<k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>
<tt4nok$1fe4m$1@dont-email.me> <ly7cw9lqs7.fsf@pushface.org>
<eee74164-490d-4794-8d3d-d31d7ffe9f13n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net vImp/BXnVDm7kDut73UUvQSPnqPhzoHjbS+/fEe2bYZD2wwwlr
Cancel-Lock: sha1:zJv8GE9VOpLCCI4WiGWAtM6pS58=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.6.1
Content-Language: en-US
In-Reply-To: <eee74164-490d-4794-8d3d-d31d7ffe9f13n@googlegroups.com>
 by: Niklas Holsti - Thu, 23 Feb 2023 12:57 UTC

On 2023-02-23 8:34, Jerry wrote:
> I deleted lines from common.adb and common.ads piecemeal until I arrived at this MWE:
>
> with Common;
> procedure Test_gnatS_Problem is
> begin
> null;
> end Test_gnatS_Problem;
>
> package body Common is
> procedure Dummy is
> begin
> null;
> end Dummy;
> end Common;
>
> with GNAT.OS_Lib; -- Error disappears when this line is removed.
> package Common is
> procedure Dummy;
> end Common;
>
> Surely this is enough for someone to work with in fixing this problem.
>
> Jerry

Compiles with no error (including the "with" clause) on my system, which
is an oldish one:

GNAT Community 2019 (20190517-83)
MacOS Mojave

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<lyy1ooo734.fsf@pushface.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9368&group=comp.lang.ada#9368

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: simon@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
Date: Thu, 23 Feb 2023 13:16:15 +0000
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <lyy1ooo734.fsf@pushface.org>
References: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>
<022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>
<k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>
<d87b4b85-48db-473f-b4d7-47d19d890fddn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="212e44ea330652d7fb4499b4ba4dbf12";
logging-data="1983849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180ODKb16g01a4fSNQlWJ37bTSv0PiUK3U="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin)
Cancel-Lock: sha1:yhL1WdIsfmTPbh5pGJd0075MPqo=
sha1:q7GTkSDMAJbhjeAu2ZtUitZQG94=
 by: Simon Wright - Thu, 23 Feb 2023 13:16 UTC

Jerry <list_email@icloud.com> writes:

> On Wednesday, February 22, 2023 at 1:50:23 AM UTC-7, Jerry wrote:
>> On Tuesday, February 21, 2023 at 10:53:33 PM UTC-7, Niklas Holsti wrote:
>
> I just remembered something that I forgot to mention. In December 2022
> I got a new MacBook Pro with an Apple M1 Pro CPU. Consequently, I
> installed Simon's ARM compiler from
> https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-12.2.0-aarch64.
> When I restored common.adb and common.ads from backup, as I mentioned
> above after the problem appeared, I noticed that they were last edited
> in September 2022. Surely these files were recompiled with the new
> compiler in December 2022, right? Is it possible that I have been
> running old binaries for common.ads/b under the translator Rosetta 2
> without realizing it? That the new compiler decided that these files
> didn't need to be recompiled because it saw the old x86-64 binaries ?
> Or that these files were compiled for the first time with the new
> compiler only 2-3 days ago, revealing a compiler bug? To be clear, I
> have been running successfully, since December 2022, other main
> programs that link to common and its dependencies—I had no need to
> edit common until 2-3 days ago.

Building your downstream demo on M1 Mac Mini with gcc-12.2.0 (an x86_64
compiler running under Rosetta),

$ /opt/gcc-12.2.0/bin/gnatmake test_gnats_problem.adb
gcc -c test_gnats_problem.adb
gcc -c common.adb
gnatbind -x test_gnats_problem.ali
gnatlink test_gnats_problem.ali
$ file common.o
common.o: Mach-O 64-bit object x86_64

Building with the aarch64 version of the same compiler,

$ /opt/gcc-12.2.0-aarch64/bin/gnatmake test_gnats_problem
gcc -c test_gnats_problem.adb
gcc -c common.adb
gnatbind -x test_gnats_problem.ali
gnatlink test_gnats_problem.ali
$ file common.o
common.o: Mach-O 64-bit object arm64

and then rebuilding for x86_64,

$ /opt/gcc-12.2.0/bin/gnatmake test_gnats_problem.adb
gcc -c test_gnats_problem.adb
gcc -c common.adb
gnatbind -x test_gnats_problem.ali
gnatlink test_gnats_problem.ali
$ file common.o
common.o: Mach-O 64-bit object x86_64

so the compiler recognises the change and recompiles (I think this is
because the date of g-os_lib.ads has changed, even though the checksum
hasn't).

The situation might be different if you compile with 'gnatmake -m'.

If you try to link with incompatible architectures, the linker will
refuse (as I just found when rebuilding alr using an x86_64 compiler,
when the previous build was with aarch64; in that case, the source that
led to the problem was unchanged, down to the file dates).

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<9e4d44f2-9bb5-4c8b-91d5-0e96045a0d0cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9381&group=comp.lang.ada#9381

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:7002:0:b0:3bf:b822:e6e4 with SMTP id x2-20020ac87002000000b003bfb822e6e4mr286861qtm.4.1677180812606;
Thu, 23 Feb 2023 11:33:32 -0800 (PST)
X-Received: by 2002:a05:6870:3a26:b0:16a:b48f:33f with SMTP id
du38-20020a0568703a2600b0016ab48f033fmr309422oab.9.1677180812360; Thu, 23 Feb
2023 11:33:32 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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 11:33:32 -0800 (PST)
In-Reply-To: <lyy1ooo734.fsf@pushface.org>
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> <k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com> <d87b4b85-48db-473f-b4d7-47d19d890fddn@googlegroups.com>
<lyy1ooo734.fsf@pushface.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9e4d44f2-9bb5-4c8b-91d5-0e96045a0d0cn@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Thu, 23 Feb 2023 19:33:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1904
 by: Jerry - Thu, 23 Feb 2023 19:33 UTC

On Thursday, February 23, 2023 at 6:16:19 AM UTC-7, Simon Wright wrote:

> If you try to link with incompatible architectures, the linker will
> refuse (as I just found when rebuilding alr using an x86_64 compiler,
> when the previous build was with aarch64; in that case, the source that
> led to the problem was unchanged, down to the file dates).
That's useful info. So still not able to explain the mystery of why and when this problem appeared on my system.

Jerry

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<b78aedc7-2652-46cb-86c1-12045bb0f46an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9383&group=comp.lang.ada#9383

  copy link   Newsgroups: comp.lang.ada
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: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!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> <k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com> <d87b4b85-48db-473f-b4d7-47d19d890fddn@googlegroups.com>
<lyy1ooo734.fsf@pushface.org> <9e4d44f2-9bb5-4c8b-91d5-0e96045a0d0cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b78aedc7-2652-46cb-86c1-12045bb0f46an@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Fri, 24 Feb 2023 00:28:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jerry - Fri, 24 Feb 2023 00:28 UTC

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

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<8f22b571-4661-4e00-b893-ed52e6184810n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9384&group=comp.lang.ada#9384

  copy link   Newsgroups: comp.lang.ada
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: i2pn2.org!i2pn.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: <b78aedc7-2652-46cb-86c1-12045bb0f46an@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> <k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com> <d87b4b85-48db-473f-b4d7-47d19d890fddn@googlegroups.com>
<lyy1ooo734.fsf@pushface.org> <9e4d44f2-9bb5-4c8b-91d5-0e96045a0d0cn@googlegroups.com>
<b78aedc7-2652-46cb-86c1-12045bb0f46an@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: list_email@icloud.com (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
 by: Jerry - Fri, 24 Feb 2023 00:34 UTC

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

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<a7f38955-3b68-4a30-b864-a7bade8c4e0bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9385&group=comp.lang.ada#9385

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:8cd:0:b0:742:700c:94dd with SMTP id 196-20020a3708cd000000b00742700c94ddmr420243qki.15.1677226027572;
Fri, 24 Feb 2023 00:07:07 -0800 (PST)
X-Received: by 2002:a05:6870:c7a7:b0:16e:1dad:3ab5 with SMTP id
dy39-20020a056870c7a700b0016e1dad3ab5mr810906oab.3.1677226027285; Fri, 24 Feb
2023 00:07:07 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Fri, 24 Feb 2023 00:07:06 -0800 (PST)
In-Reply-To: <8f22b571-4661-4e00-b893-ed52e6184810n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=160.46.252.69; posting-account=mOyWBQoAAAD7S-NBmMUOr9hRClcL0vqR
NNTP-Posting-Host: 160.46.252.69
References: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>
<022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com> <k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com> <d87b4b85-48db-473f-b4d7-47d19d890fddn@googlegroups.com>
<lyy1ooo734.fsf@pushface.org> <9e4d44f2-9bb5-4c8b-91d5-0e96045a0d0cn@googlegroups.com>
<b78aedc7-2652-46cb-86c1-12045bb0f46an@googlegroups.com> <8f22b571-4661-4e00-b893-ed52e6184810n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7f38955-3b68-4a30-b864-a7bade8c4e0bn@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: rrr.eee.27@gmail.com (R R)
Injection-Date: Fri, 24 Feb 2023 08:07:07 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2067
 by: R R - Fri, 24 Feb 2023 08:07 UTC

Jerry schrieb am Freitag, 24. Februar 2023 um 01:34:33 UTC+1:

> 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.

look for the casing of gnat.ads, g-os_lib.ads and g-os_lib.adb on your system. The lines 578 and 582 refer to the spec of gnat, hence the capital S in gnatS. It seems to me to be included twice because of the mixed casing, perhaps from different locations.

R

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<ttb6aa$2a2c2$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9388&group=comp.lang.ada#9388

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
Date: Fri, 24 Feb 2023 21:22:34 +0100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <ttb6aa$2a2c2$1@dont-email.me>
References: <365f84cf-29ae-4857-8dfe-e3bfa2191f9dn@googlegroups.com>
<022bbc8b-8764-4562-900a-7143fabd394cn@googlegroups.com>
<k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com>
<tt4nok$1fe4m$1@dont-email.me> <ly7cw9lqs7.fsf@pushface.org>
<eee74164-490d-4794-8d3d-d31d7ffe9f13n@googlegroups.com>
<k5p66gFnmmtU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 24 Feb 2023 20:22:34 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="2652e59ce035a88971ee0ef0561ab440";
logging-data="2427266"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Mei0rmBOUNL+KZmJT9KGdmMPk510xu0E="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.7.1
Cancel-Lock: sha1:C3vSf3BCGPhwcocFI+t01Ns8w10=
Content-Language: en-US
In-Reply-To: <k5p66gFnmmtU1@mid.individual.net>
 by: Jeffrey R.Carter - Fri, 24 Feb 2023 20:22 UTC

On 2023-02-23 13:57, Niklas Holsti wrote:
>
> Compiles with no error (including the "with" clause) on my system, which is an
> oldish one:

And on Linus with GNAT 11.3.

--
Jeff Carter
"Saving keystrokes is the job of the text editor,
not the programming language."
Preben Randhol
64

Re: Weird error emanating from GNAT binder: duplicat "gnatS"

<3a1c8c24-29ea-41ea-86ba-ad0a3f748b90n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9391&group=comp.lang.ada#9391

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:6214:246f:b0:56e:9c55:1bab with SMTP id im15-20020a056214246f00b0056e9c551babmr1729747qvb.4.1677389428456;
Sat, 25 Feb 2023 21:30:28 -0800 (PST)
X-Received: by 2002:a05:6808:d49:b0:37f:b1ac:6b90 with SMTP id
w9-20020a0568080d4900b0037fb1ac6b90mr2022199oik.0.1677389428212; Sat, 25 Feb
2023 21:30:28 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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: Sat, 25 Feb 2023 21:30:27 -0800 (PST)
In-Reply-To: <a7f38955-3b68-4a30-b864-a7bade8c4e0bn@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> <k5loupF7kt3U1@mid.individual.net>
<f3a5d119-04b9-48d5-9e6e-ea548c7795a4n@googlegroups.com> <d87b4b85-48db-473f-b4d7-47d19d890fddn@googlegroups.com>
<lyy1ooo734.fsf@pushface.org> <9e4d44f2-9bb5-4c8b-91d5-0e96045a0d0cn@googlegroups.com>
<b78aedc7-2652-46cb-86c1-12045bb0f46an@googlegroups.com> <8f22b571-4661-4e00-b893-ed52e6184810n@googlegroups.com>
<a7f38955-3b68-4a30-b864-a7bade8c4e0bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3a1c8c24-29ea-41ea-86ba-ad0a3f748b90n@googlegroups.com>
Subject: Re: Weird error emanating from GNAT binder: duplicat "gnatS"
From: list_email@icloud.com (Jerry)
Injection-Date: Sun, 26 Feb 2023 05:30:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2336
 by: Jerry - Sun, 26 Feb 2023 05:30 UTC

On Friday, February 24, 2023 at 1:07:08 AM UTC-7, R R wrote:
> Jerry schrieb am Freitag, 24. Februar 2023 um 01:34:33 UTC+1:
>
> > 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.
> look for the casing of gnat.ads, g-os_lib.ads and g-os_lib.adb on your system. The lines 578 and 582 refer to the spec of gnat, hence the capital S in gnatS. It seems to me to be included twice because of the mixed casing, perhaps from different locations.
>
> R
Those three filenames are all lowercase.

Jerry


devel / comp.lang.ada / Re: Weird error emanating from GNAT binder: duplicat "gnatS"

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor