From: Simon Wright <simon@pushface.org>
Subject: Re: Problem with gpr file after updating GNAT
Date: Mon, 05 Dec 2022 17:16:10 +0000 [thread overview]
Message-ID: <lywn757ov9.fsf@pushface.org> (raw)
In-Reply-To: 3f881d33-40c0-4c30-96c1-9df82bbddbb0n@googlegroups.com
Jerry <list_email@icloud.com> writes:
> And here is the complaint from GNAT when I try to build:
> build.gpr:61:19: "Uniform_Aperture_Sum.adb" is not a source of project "build"
> gprbuild: problems with main sources
I didn't get that, but I did get it if the two filenames were cased
differently (and Egil's 'package Naming' suggestion didn't fix
it). Different casing doesn't cause problems with an x86_64 gprbuild.
The reason is very probably to be found here in the GCC sources:
https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/adaint.c#L599
__gnat_get_file_names_case_sensitive (void)
{
if (file_names_case_sensitive_cache == -1)
{
const char *sensitive = getenv ("GNAT_FILE_NAME_CASE_SENSITIVE");
if (sensitive != NULL
&& (sensitive[0] == '0' || sensitive[0] == '1')
&& sensitive[1] == '\0')
file_names_case_sensitive_cache = sensitive[0] - '0';
else
{
/* By default, we suppose filesystems aren't case sensitive on
Windows and Darwin (but they are on arm-darwin). */
#if defined (WINNT) || defined (__DJGPP__) \
|| (defined (__APPLE__) && !(defined (__arm__) || defined (__arm64__)))
file_names_case_sensitive_cache = 0;
#else
file_names_case_sensitive_cache = 1;
#endif
}
}
return file_names_case_sensitive_cache;
}
which is Wrong; file names are case-insensitive on Darwin, x86_64 or
aarch64 (aka arm64).
On the other hand, it's gprbuild that's complaining.
Anyway, try "export GNAT_FILE_NAME_CASE_SENSITIVE=0".
Or, of course, you could use lower-case filenames for all Ada source.
next prev parent reply other threads:[~2022-12-05 17:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 8:47 Problem with gpr file after updating GNAT Jerry
2022-12-05 12:30 ` Egil H H
2022-12-05 17:16 ` Simon Wright [this message]
2022-12-06 10:56 ` 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