Thanks for your prompt reply (on a weekend!), Ian.  
But I think we’re missing the point (see red text)… 

> On Aug 31, 2024, at 11:01 PM, Iain Sandoe <i...@sandoe.co.uk> wrote:
> 
> Hello Andy,
> 
>> On 31 Aug 2024, at 23:14, Andy Miller via Gcc <gcc@gcc.gnu.org> wrote:
> 
>> After apparently easily installing GCC 14.2 into macOS 12.7.4, 
>> directly from https://gcc.gnu.org/gcc-14/ 
> 
> Please identify:
> 
> 0. Which macOS architecture you are installing on (Arm64 is not supported by 
> upstream yet, but there is a development branch)

MacBook Pro (Retina, 15-inch, Mid 2015)
2.8 GHz Quad-Core Intel Core i7


> 1.  the version of XCode command line tools (or xcode app) you are using to 
> build this.

Xcode-14.0.1

> 2.  the configuration line you used.  

Well, you’re not likely to find that helpful, as such “lines” are generated 
by a script or process in a very complex installation process for ATLAS 
<https://sourceforge.net/projects/math-atlas/>. 

Here’s a snippet of one of hundreds of such errors (after 3 small successes)… 

gcc -I/tmp/Atlas/src/..//CONFIG/include  -g -w -o xisgcc 
/tmp/Atlas/src/..//CONFIG/src/IsGcc.c atlconf_misc.o 
gcc -I/tmp/Atlas/src/..//CONFIG/include  -g -w -c 
/tmp/Atlas/src/..//CONFIG/src/probe_comp.c
gcc -I/tmp/Atlas/src/..//CONFIG/include  -g -w -o xprobe_comp probe_comp.o 
atlconf_misc.o 
rm -f config1.out
/Applications/Xcode.app/Contents/Developer/usr/bin/make atlas_run 
atldir=/tmp/Atlas/build exe=xprobe_comp redir=config1.out \
                args="-v 0 -o atlconf.txt -O 12 -A 43 -Si nof77 0 -V 976   -b 
64 -d b /tmp/Atlas/build"
cd /tmp/Atlas/build ; ./xprobe_comp -v 0 -o atlconf.txt -O 12 -A 43 -Si nof77 0 
-V 976   -b 64 -d b /tmp/Atlas/build > config1.out
In file included from /tmp/Atlas/src/..//CONFIG/src/backend/comptestC.c:1:
/opt/local/lib/gcc14/gcc/x86_64-apple-darwin21/14.2.0/include-fixed/stdio.h:80:14:
 error: expected ';' before 'extern'
   80 | __BEGIN_DECLS
      |              ^
      |              ;
   81 | extern FILE *__stdinp;


> 
>> I find that it is unusable, because… 
>> 
>> The files in gcc14/…/14.2.0/include-fixed/ , which have been auto-edited by 
>> script fixincludes, contain the undefined (& deprecated 
>> <https://www.gnu.org/software/libtool/manual/html_node/C-header-files.html>) 
>> symbols: 
>> __BEGIN_DECLS and __END_DECLS !
> 
> We do not have any control over what the OS headers use - you can file a 
> Feedback with Apple to make queries / observations to them 
> (https://feedbackassistant.apple.com).

But you do have such control over the (very few) headers in  
gcc14/…/14.2.0/include-fixed/ ! 
(That was the whole point of my message — see above.) 
One such Gnu-modified <https://www.gnu.org/software/autogen/fixinc.html> header 
begins thusly… 

/*  DO NOT EDIT THIS FILE.

    It has been auto-edited by fixincludes from:

        
"/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/stdio.h"

    This had to be done to correct non-standard usages in the
    original, manufacturer supplied header file.  */

#ifndef FIXINC_WRAP_STDIO_H_STDIO_STDARG_H
#define FIXINC_WRAP_STDIO_H_STDIO_STDARG_H 1
        .
        .

So I guess someone may have fed unfortunate choices into fixincludes.  
———

I installed gnu compilers instead of using clang because some 
ATLAS documentation warned that clang was very inefficient 
for this very compute-intensive system.  (Their installer even does 
detailed cpu timing tests to determine how to configure their codes 
to optimize performance!)  

But now I see a possibly more recent comment that modern clang 
is not so bad.  So how can I prevent any install process from finding 
and using gnu compilers (without deleting them from /opt/local)?  

I ask also because I have another different problem porting pgplot 
<https://sites.astro.caltech.edu/~tjp/pgplot/>.  
Is MacPorts mixing in clang stuff while using your gfortran? … 

:debug:build build phase started at Sat Aug 31 20:30:32 PDT 2024
:notice:build --->  Building pgplot
:debug:build Executing org.macports.build (pgplot)
        |
        |
:info:build make: Entering directory 
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pgplot/pgplot/work/build'
:info:build /opt/local/bin/gfortran-mp-14 -c -Os -fno-backslash 
-fallow-argument-mismatch 
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_pgplot/pgplot/work/pgplot/src/pgarro.f
:info:build clang (LLVM option parsing): Unknown command line argument 
'-x86-pad-for-align=false'.  Try: 'clang (LLVM option parsing) --help'
:info:build clang (LLVM option parsing): Did you mean '--x86-slh-loads=false'?
:info:build make: *** [pgarro.o] Error 1

Thanks!

Andy


>> Also also stdio.h fails to include the missing  _stdio.h which fails to 
>> include the missing  secure/_common.h  ! 
> 
> The release was tested on macOS 12.6.7 x86_64 and with the development branch 
> on both x86_64 and aarch64 (arm64) - so I expect we’ll be able to solve your 
> issues.
> 
> thanks
> Iain
> 

Reply via email to