[MacPorts] #57937: gcc9 @9-20181007_1: Compiler fails for trivial program indicating that _stdio.h is missing (also fails for gcc7 and gcc8).

MacPorts noreply at macports.org
Tue Jan 22 13:45:55 UTC 2019


#57937: gcc9 @9-20181007_1: Compiler fails for trivial program indicating that
_stdio.h is missing (also fails for gcc7 and gcc8).
--------------------------------------+----------------------------
 Reporter:  aszostak-partner-eso-org  |      Owner:  (none)
     Type:  defect                    |     Status:  new
 Priority:  Normal                    |  Milestone:
Component:  ports                     |    Version:  2.5.4
 Keywords:                            |       Port:  gcc7 gcc8 gcc9
--------------------------------------+----------------------------
 When I attempt to use gcc9 from MacPorts to compile the following trivial
 program conftest.c,
 {{{
 #include <stdio.h>
 int
 main ()
 {
 FILE *f = fopen ("conftest.out", "w");
  return ferror (f) || fclose (f) != 0;

   ;
   return 0;
 }
 }}}
 I get the following error:
 {{{
 $ /opt/local/bin/gcc-mp-9 -o conftest -pipe -Os -m64 -I/opt/local/include
 -L/opt/local/lib -Wl,-headerpad_max_install_names conftest.c
 In file included from conftest.c:2:
 /opt/local/lib/gcc9/gcc/x86_64-apple-darwin17/9.0.0/include-
 fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory
 78 | #include <_stdio.h>
    |          ^~~~~~~~~~
 compilation terminated.
 }}}

 I also get the same error if trying to compile with gcc7:
 {{{
 $ /opt/local/bin/gcc-mp-7 -o conftest -pipe -Os -m64 -I/opt/local/include
 -L/opt/local/lib -Wl,-headerpad_max_install_names conftest.c
 In file included from conftest.c:2:0:
 /opt/local/lib/gcc7/gcc/x86_64-apple-darwin17/7.4.0/include-
 fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory
  #include <_stdio.h>
           ^~~~~~~~~~
 compilation terminated.
 }}}
 And the same error with gcc8:
 {{{
 $ /opt/local/bin/gcc-mp-8 -o conftest -pipe -Os -m64 -I/opt/local/include
 -L/opt/local/lib -Wl,-headerpad_max_install_names conftest.c
 In file included from conftest.c:2:
 /opt/local/lib/gcc8/gcc/x86_64-apple-darwin17/8.2.0/include-
 fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory
  #include <_stdio.h>
           ^~~~~~~~~~
 compilation terminated.
 }}}

 This is happening on MacOS 10.13.6 with Xcode command line tools 9.

-- 
Ticket URL: <https://trac.macports.org/ticket/57937>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list