[MacPorts] #53758: gcc6 @6.3.0_2: g++ fails to find stdc++ includes when -isysroot set
MacPorts
noreply at macports.org
Thu Mar 9 06:53:33 UTC 2017
#53758: gcc6 @6.3.0_2: g++ fails to find stdc++ includes when -isysroot set
----------------------+-------------------
Reporter: ibethune | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.4.0
Keywords: | Port: gcc6
----------------------+-------------------
I just did a 'port upgrade outdated' which installed gcc6 @6.3.0_2
(previously I had @6.2.0_2). The following example is now failing for me
since the upgrade:
{{{
Iains-MacBook-Pro:Desktop ibethune$ cat test.cpp
#include <string>
int main(int argc, char **argv) { return 0; }
Iains-MacBook-Pro:Desktop ibethune$ g++ -v
-isysroot=/Developer/SDKs/MacOSX10.9.sdk/ -o test test.cpp
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin16/6.3.0
/lto-wrapper
Target: x86_64-apple-darwin16
Configured with:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc6/gcc6/work/gcc-6.3.0/configure
--prefix=/opt/local --build=x86_64-apple-darwin16 --enable-
languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc6
--includedir=/opt/local/include/gcc6 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-6 --with-
local-prefix=/opt/local --with-system-zlib --disable-nls --program-
suffix=-mp-6 --with-gxx-include-dir=/opt/local/include/gcc6/c++/ --with-
gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-
isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto
--enable-libstdcxx-time --with-build-config=bootstrap-debug --with-
as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-
ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--with-pkgversion='MacPorts gcc6 6.3.0_2' --with-sysroot=
Thread model: posix
gcc version 6.3.0 (MacPorts gcc6 6.3.0_2)
COLLECT_GCC_OPTIONS='-v' '-isysroot' '=/Developer/SDKs/MacOSX10.9.sdk/'
'-o' 'test' '-mmacosx-version-min=10.12.4' '-asm_macosx_version_min=10.12'
'-shared-libgcc' '-mtune=core2'
/opt/local/libexec/gcc/x86_64-apple-darwin16/6.3.0/cc1plus -quiet -v
-D__DYNAMIC__ -isysroot =/Developer/SDKs/MacOSX10.9.sdk/ test.cpp -fPIC
-quiet -dumpbase test.cpp -mmacosx-version-min=10.12.4 -mtune=core2
-auxbase test -version -o
/var/folders/fk/ljxr9h0x2zx1lcjrtskgv02r0000gn/T//ccnNmN3P.s
GNU C++14 (MacPorts gcc6 6.3.0_2) version 6.3.0 (x86_64-apple-darwin16)
compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version
3.1.4, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"=/Developer/SDKs/MacOSX10.9.sdk/opt/local/include/gcc6/c++/"
ignoring nonexistent directory
"=/Developer/SDKs/MacOSX10.9.sdk/opt/local/include/gcc6/c++//x86_64-apple-
darwin16"
ignoring nonexistent directory
"=/Developer/SDKs/MacOSX10.9.sdk/opt/local/include/gcc6/c++//backward"
ignoring nonexistent directory
"=/Developer/SDKs/MacOSX10.9.sdk/opt/local/include"
ignoring nonexistent directory "/opt/local/lib/gcc6/gcc/x86_64-apple-
darwin16/6.3.0/../../../../../x86_64-apple-darwin16/include"
ignoring nonexistent directory
"=/Developer/SDKs/MacOSX10.9.sdk/usr/include"
ignoring nonexistent directory
"=/Developer/SDKs/MacOSX10.9.sdk//System/Library/Frameworks"
ignoring nonexistent directory
"=/Developer/SDKs/MacOSX10.9.sdk//Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.3.0/include
/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.3.0/include-fixed
End of search list.
GNU C++14 (MacPorts gcc6 6.3.0_2) version 6.3.0 (x86_64-apple-darwin16)
compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version
3.1.4, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d36822ecd9de6fb879bb93e66b8d0005
test.cpp:1:18: fatal error: string: No such file or directory
#include <string>
^
compilation terminated.
}}}
With the previous versions (e.g. gcc5) it also searches under directory
{{{/opt/local/include/gcc5/c++/}}}. So how should I build using gcc6
targetting an old macOS SDK?
--
Ticket URL: <https://trac.macports.org/ticket/53758>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list