[MacPorts] #59727: gcc9: fails to link properly (-lSystem no found)
MacPorts
noreply at macports.org
Tue Nov 19 16:17:49 UTC 2019
#59727: gcc9: fails to link properly (-lSystem no found)
------------------------+--------------------
Reporter: akimd | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.2
Resolution: | Keywords:
Port: gcc8 gcc9 |
------------------------+--------------------
Description changed by ryandesign:
Old description:
> Hi,
>
> It feels wrong to report this: I saw no-one reporting it, yet I have had
> the problem for about one week, starting when I upgraded to Xcode 11.2.1
> on my macOS 10.14.6, and found no ticket about it... I guess I did not
> look at the right place.
>
> {{{
> $ cat foo.c
> int main () {
> return 42;
> }
> $ gcc-mp-7 foo.c
> $ ./a.out ; echo $?
> 42
> $ gcc-mp-8 foo.c
> ld: library not found for -lSystem
> collect2: error: ld returned 1 exit status
> $ gcc-mp-9 foo.c
> ld: library not found for -lSystem
> collect2: error: ld returned 1 exit status
> }}}
>
> FWIW, gcc7 used to fail too, but since I rerun {xcode-select --install}
> it works. I uninstalled gcc9 and reinstall it, to no avail.
>
> I don't know what information might help you.
>
> {{{
> $ gcc-mp-7 -v
> Using built-in specs.
> COLLECT_GCC=gcc-mp-7
> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/7.5.0
> /lto-wrapper
> Target: x86_64-apple-darwin18
> Configured with:
> /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc7/gcc7/work/gcc-7.5.0/configure
> --prefix=/opt/local --build=x86_64-apple-darwin18 --enable-
> languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc7
> --includedir=/opt/local/include/gcc7 --infodir=/opt/local/share/info
> --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-7
> --with-local-prefix=/opt/local --with-system-zlib --disable-nls
> --program-suffix=-mp-7 --with-gxx-include-
> dir=/opt/local/include/gcc7/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 gcc7 7.5.0_0' --with-
> sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
> Thread model: posix
> gcc version 7.5.0 (MacPorts gcc7 7.5.0_0)
> $ gcc-mp-8 -v
> Using built-in specs.
> COLLECT_GCC=gcc-mp-8
> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/8.3.0
> /lto-wrapper
> Target: x86_64-apple-darwin18
> Configured with:
> /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc8/gcc8/work/gcc-8.3.0/configure
> --prefix=/opt/local --build=x86_64-apple-darwin18 --enable-
> languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc8
> --includedir=/opt/local/include/gcc8 --infodir=/opt/local/share/info
> --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-8
> --with-local-prefix=/opt/local --with-system-zlib --disable-nls
> --program-suffix=-mp-8 --with-gxx-include-
> dir=/opt/local/include/gcc8/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 gcc8 8.3.0_4' --with-
> sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
> Thread model: posix
> gcc version 8.3.0 (MacPorts gcc8 8.3.0_4)
> $ gcc-mp-9 -v
> Using built-in specs.
> COLLECT_GCC=gcc-mp-9
> 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_bblocal_var_buildworker_ports_build_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=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
> Thread model: posix
> gcc version 9.2.0 (MacPorts gcc9 9.2.0_1)
> }}}
>
> Also, port 2.6.2's diagnose reports that Xcode 11.2 is supported, but not
> Xcode 11.2.1. But...
>
> Finally, there's no "maintainer" registered in the port. Cheers!
New description:
Hi,
It feels wrong to report this: I saw no-one reporting it, yet I have had
the problem for about one week, starting when I upgraded to Xcode 11.2.1
on my macOS 10.14.6, and found no ticket about it... I guess I did not
look at the right place.
{{{
$ cat foo.c
int main () {
return 42;
}
$ gcc-mp-7 foo.c
$ ./a.out ; echo $?
42
$ gcc-mp-8 foo.c
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
$ gcc-mp-9 foo.c
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
}}}
FWIW, gcc7 used to fail too, but since I rerun `xcode-select --install` it
works. I uninstalled gcc9 and reinstall it, to no avail.
I don't know what information might help you.
{{{
$ gcc-mp-7 -v
Using built-in specs.
COLLECT_GCC=gcc-mp-7
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/7.5.0
/lto-wrapper
Target: x86_64-apple-darwin18
Configured with:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc7/gcc7/work/gcc-7.5.0/configure
--prefix=/opt/local --build=x86_64-apple-darwin18 --enable-
languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc7
--includedir=/opt/local/include/gcc7 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-7 --with-
local-prefix=/opt/local --with-system-zlib --disable-nls --program-
suffix=-mp-7 --with-gxx-include-dir=/opt/local/include/gcc7/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 gcc7 7.5.0_0' --with-
sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 7.5.0 (MacPorts gcc7 7.5.0_0)
$ gcc-mp-8 -v
Using built-in specs.
COLLECT_GCC=gcc-mp-8
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/8.3.0
/lto-wrapper
Target: x86_64-apple-darwin18
Configured with:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc8/gcc8/work/gcc-8.3.0/configure
--prefix=/opt/local --build=x86_64-apple-darwin18 --enable-
languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc8
--includedir=/opt/local/include/gcc8 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-8 --with-
local-prefix=/opt/local --with-system-zlib --disable-nls --program-
suffix=-mp-8 --with-gxx-include-dir=/opt/local/include/gcc8/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 gcc8 8.3.0_4' --with-
sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 8.3.0 (MacPorts gcc8 8.3.0_4)
$ gcc-mp-9 -v
Using built-in specs.
COLLECT_GCC=gcc-mp-9
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_bblocal_var_buildworker_ports_build_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=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 9.2.0 (MacPorts gcc9 9.2.0_1)
}}}
Also, port 2.6.2's diagnose reports that Xcode 11.2 is supported, but not
Xcode 11.2.1. But...
Finally, there's no "maintainer" registered in the port. Cheers!
--
--
Ticket URL: <https://trac.macports.org/ticket/59727#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list