[MacPorts] #58895: gcc9: search path for standard libraries is incomplete/incorrect
MacPorts
noreply at macports.org
Thu Oct 24 16:07:16 UTC 2019
#58895: gcc9: search path for standard libraries is incomplete/incorrect
---------------------+----------------------
Reporter: prbuen | Owner: (none)
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gcc9 |
---------------------+----------------------
Comment (by tesch1):
I've just had the same problem with plain gcc9. Recompiling gcc9 with the
above (onerous) suggestion also fixed the issue for me.
{{{
uname -a
Darwin x.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14
PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
}}}
And now I have:
{{{
$ gcc tmp.c -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0
/lto-wrapper
Target: x86_64-apple-darwin18
Configured with:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.2.0/configure
--prefix=/opt/local --build=x86_64-apple-darwin18 --enable-
languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc9
--includedir=/opt/local/include/gcc9 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-9 --with-
local-prefix=/opt/local --with-system-zlib --disable-nls --program-
suffix=-mp-9 --with-gxx-include-dir=/opt/local/include/gcc9/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
--disable-tls --with-pkgversion='MacPorts gcc9 9.2.0_1' --with-
sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 9.2.0 (MacPorts gcc9 9.2.0_1)
COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.14.0'
'-asm_macosx_version_min=10.14' '-mtune=core2'
/opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0/cc1 -quiet -v
-D__DYNAMIC__ tmp.c -fPIC -quiet -dumpbase tmp.c -mmacosx-version-
min=10.14.0 -mtune=core2 -auxbase tmp -version -o
/var/folders/vm/vg3cc4zj117639xwt_zdq4r40000gn/T//ccBfmQWr.s
GNU C17 (MacPorts gcc9 9.2.0_1) version 9.2.0 (x86_64-apple-darwin18)
compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version
4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/opt/local/include"
ignoring nonexistent directory "/opt/local/lib/gcc9/gcc/x86_64-apple-
darwin18/9.2.0/../../../../../x86_64-apple-darwin18/include"
ignoring nonexistent directory
"/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/include
/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/include-fixed
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks
End of search list.
GNU C17 (MacPorts gcc9 9.2.0_1) version 9.2.0 (x86_64-apple-darwin18)
compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version
4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 48d9ff446d0fbf05163bfaf9ac8ba459
tmp.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
1 | main(){ return 1; }
| ^~~~
COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.14.0' '-mtune=core2'
/opt/local/bin/as -arch x86_64 -v -force_cpusubtype_ALL -mmacosx-version-
min=10.14 -o /var/folders/vm/vg3cc4zj117639xwt_zdq4r40000gn/T//ccIp7jxi.o
/var/folders/vm/vg3cc4zj117639xwt_zdq4r40000gn/T//ccBfmQWr.s
clang version 8.0.1 (tags/RELEASE_801/final)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-8.0/bin
"/opt/local/libexec/llvm-8.0/bin/clang" -cc1as -triple x86_64-apple-
macosx10.14.0 -filetype obj -main-file-name ccBfmQWr.s -target-cpu penryn
-fdebug-compilation-dir /Users/michaeltesch/src/turbobadger -dwarf-debug-
producer clang version 8.0.1 (tags/RELEASE_801/final) -dwarf-version=4
-mrelocation-model pic -o
/var/folders/vm/vg3cc4zj117639xwt_zdq4r40000gn/T//ccIp7jxi.o
/var/folders/vm/vg3cc4zj117639xwt_zdq4r40000gn/T//ccBfmQWr.s
COMPILER_PATH=/opt/local/libexec/gcc/x86_64-apple-
darwin18/9.2.0/:/opt/local/libexec/gcc/x86_64-apple-
darwin18/9.2.0/:/opt/local/libexec/gcc/x86_64-apple-
darwin18/:/opt/local/lib/gcc9/gcc/x86_64-apple-
darwin18/9.2.0/:/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/
LIBRARY_PATH=/opt/local/lib/gcc9/gcc/x86_64-apple-
darwin18/9.2.0/:/opt/local/lib/gcc9/gcc/x86_64-apple-
darwin18/9.2.0/../../../
COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.14.0' '-mtune=core2'
/opt/local/libexec/gcc/x86_64-apple-darwin18/9.2.0/collect2 -syslibroot
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/ -dynamic -arch
x86_64 -macosx_version_min 10.14.0 -weak_reference_mismatches non-weak -o
a.out -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0
-L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/../../..
/var/folders/vm/vg3cc4zj117639xwt_zdq4r40000gn/T//ccIp7jxi.o
-no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v
collect2 version 9.2.0
/opt/local/bin/ld -syslibroot
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/ -dynamic -arch
x86_64 -macosx_version_min 10.14.0 -weak_reference_mismatches non-weak -o
a.out -L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0
-L/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0/../../..
/var/folders/vm/vg3cc4zj117639xwt_zdq4r40000gn/T//ccIp7jxi.o
-no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v
@(#)PROGRAM:ld PROJECT:ld64-512.4
BUILD 05:06:53 Aug 16 2019
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386
x86_64 x86_64h armv6m armv7k armv7m armv7em
Library search paths:
/opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0
/opt/local/lib/gcc9
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib
Framework search paths:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/
}}}
which notably does not include `/usr/lib` .
--
Ticket URL: <https://trac.macports.org/ticket/58895#comment:28>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list