[MacPorts] #59113: gcc-mp-8

MacPorts noreply at macports.org
Thu Sep 26 07:32:46 UTC 2019


#59113: gcc-mp-8
----------------------+--------------------
 Reporter:  abyrvalk  |      Owner:  (none)
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  base      |    Version:
 Keywords:            |       Port:
----------------------+--------------------
 It seems to be a typical bug (internet search tells me), but I cannot deal
 with it. After the recent upgrade to Xcode version 11.0 (11A420a), the gcc
 installed from macports fails to compile:

 A simple code (test.cc):
 {{{
 #include <iostream>

 int main(void)
 {
   std::cout << "Hello world\n";

   return 0;
 }
 }}}

 {{{
 $ g++-mp-8 test.cc
 In file included from /opt/local/include/gcc8/c++/bits/postypes.h:40,
                  from /opt/local/include/gcc8/c++/iosfwd:40,
                  from /opt/local/include/gcc8/c++/ios:38,
                  from /opt/local/include/gcc8/c++/ostream:38,
                  from /opt/local/include/gcc8/c++/iostream:39,
                  from test.cc:1:
 /opt/local/include/gcc8/c++/cwchar:44:10: fatal error: wchar.h: No such
 file or directory
  #include <wchar.h>
           ^~~~~~~~~
 compilation terminated.
 }}}


 I have all the header files in /usr/include, together with commandline
 tools from Xcode. If I explicitly add include path the error changes but I
 have no success:

 {{{
 $ g++-mp-8 -I/usr/include test.cc
 In file included from
 /opt/local/include/gcc8/c++/ext/string_conversions.h:41,
                  from
 /opt/local/include/gcc8/c++/bits/basic_string.h:6400,
                  from /opt/local/include/gcc8/c++/string:52,
                  from
 /opt/local/include/gcc8/c++/bits/locale_classes.h:40,
                  from /opt/local/include/gcc8/c++/bits/ios_base.h:41,
                  from /opt/local/include/gcc8/c++/ios:42,
                  from /opt/local/include/gcc8/c++/ostream:38,
                  from /opt/local/include/gcc8/c++/iostream:39,
                  from test.cc:1:
 /opt/local/include/gcc8/c++/cstdlib:75:15: fatal error: stdlib.h: No such
 file or directory
  #include_next <stdlib.h>
                ^~~~~~~~~~
 compilation terminated.
 }}}

 wchar.h and stdlib.h are both in /usr/include. The Apple Clang compiles
 the code successfully.
 Is it a problem of my environment variables or my system configuration by
 port?

 iOS 10.14.6, Xcode 11.0

 {{{
 $ port installed | grep gcc
   gcc8 @8.3.0_4 (active)
   gcc_select @0.1_8 (active)
   libgcc @2.0_2 (active)
   libgcc8 @8.3.0_5 (active)
   libgcc9 @9.2.0_0 (active)
 }}}

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


More information about the macports-tickets mailing list