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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!aioe.org!XkhLYGh9FeaGRJtDGav81g.user.46.165.242.75.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Problem with gpr file after updating GNAT Date: Mon, 05 Dec 2022 17:16:10 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <3f881d33-40c0-4c30-96c1-9df82bbddbb0n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: gioia.aioe.org; logging-data="63627"; posting-host="XkhLYGh9FeaGRJtDGav81g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:wXq3QK/RJz/Vf/UnlSPRVOVSWuM= Xref: reader01.eternal-september.org comp.lang.ada:64673 List-Id: Jerry 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.