Re: AnRe: latest update to BigSur 11.1 broke gcc

2020-12-16 Thread Ken Cunningham
I recall this discussion and commit from last year about how gcc finds it’s SDK 
to use:

https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=24ec3cc957c4181d8da9972cb2aa212a3e0cec1c
 



Notably, at this moment in time, if the SDKROOT is set to “/“ gcc will ignore 
it…. hah hah.

Ken




AnRe: latest update to BigSur 11.1 broke gcc

2020-12-16 Thread Chris Jones

I tried it myself, and switching to --with-build-sysroot with gcc10 on big sur 
does seem to build. I haven't had time to run any tests to see exactly what 
this means w.r.t. the default sdk search paths. But in any case I think the 
best advice is anyway to explicitly set it yourself, using one of the numerous 
methods (command line flag, SDKROOT, or use xcrun) in which case whatever the 
default search paths  are does not really make much difference. If we do decide 
to switching to the above then what this means in practise I think is just it 
enforces that users will have to do this, rather than it sometimes working for 
them.

Out of interest what happens with the macports clang ports ? If no default path 
to an sdk is set there, presumably users are also required with these compilers 
to always explicitly give the sdk they wish to use, via similar methods ?

Chris 

> On 16 Dec 2020, at 3:42 pm, Ken Cunningham  
> wrote:
> 
> 
> I'll try it. Things have changed in gcc -- after all, we don't bake any such 
> path into our clang installs, and they don't exhibit this issue.
> 
> K
> 
>> On Dec 16, 2020, at 02:38, Christopher Jones  
>> wrote:
>> 
>> From a combination of my memory, and reading the tickets referenced in the 
>> gcc port file, if we don’t use 
>> —with-sysroot we would need to use --with-build-sysroot in order for the 
>> build to work, and last time that was tried it didn’t work correctly.
>> 
>>> On 16 Dec 2020, at 3:37 am, Ken Cunningham 
>>>  wrote:
>>> 
>>> we might just delete this line from the portfile, perhaps:
>>> 
>>> 
>>>  configure.args-append --with-sysroot="${configure.sdkroot}"
>> 


Re: latest update to BigSur 11.1 broke gcc

2020-12-16 Thread Ken Cunningham
I'll try it. Things have changed in gcc -- after all, we don't bake any such 
path into our clang installs, and they don't exhibit this issue.

K

> On Dec 16, 2020, at 02:38, Christopher Jones  wrote:
> 
> From a combination of my memory, and reading the tickets referenced in the 
> gcc port file, if we don’t use 
> —with-sysroot we would need to use --with-build-sysroot in order for the 
> build to work, and last time that was tried it didn’t work correctly.
> 
>> On 16 Dec 2020, at 3:37 am, Ken Cunningham  
>> wrote:
>> 
>> we might just delete this line from the portfile, perhaps:
>> 
>> 
>>  configure.args-append --with-sysroot="${configure.sdkroot}"
> 


Re: latest update to BigSur 11.1 broke gcc

2020-12-16 Thread Christopher Jones
From a combination of my memory, and reading the tickets referenced in the gcc 
port file, if we don’t use 
—with-sysroot we would need to use --with-build-sysroot in order for the build 
to work, and last time that was tried it didn’t work correctly.

> On 16 Dec 2020, at 3:37 am, Ken Cunningham  
> wrote:
> 
> we might just delete this line from the portfile, perhaps:
> 
> 
>  configure.args-append --with-sysroot="${configure.sdkroot}"



smime.p7s
Description: S/MIME cryptographic signature


Re: latest update to BigSur 11.1 broke gcc

2020-12-15 Thread Ken Cunningham
we might just delete this line from the portfile, perhaps:


 configure.args-append --with-sysroot="${configure.sdkroot}"

Re: latest update to BigSur 11.1 broke gcc

2020-12-15 Thread Ken Cunningham
> --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk

gcc is supposed to respond to the SDKROOT env var now, and base sets this (most 
of the time … sigh).

perhaps we should find a way to stop baking in —with-sysroot altogether now…

Ken

Re: latest update to BigSur 11.1 broke gcc

2020-12-15 Thread Andreas Skarlatoudis via macports-users
Hi Chris, 

thanks for the reply. I got a feeling that the problem you describe is behind 
this error but I didn’t know how to fix it. 
I’ve added the export you suggest in my profile and it worked. 

Thanks again for the help, much appreciated! 

Andreas  


Dr. Seismologist

> On Dec 15, 2020, at 2:12 PM, Christopher Jones  
> wrote:
> 
> Hi,
> 
> This is another consequence of a change Apple has introduced with macOS11 
> which is the SDK version now changes on every incremental OS update. So 
> updating from 11.0 to 11.1 (and I presume Xcode 12.3) you now have SDK 11.1, 
> not 11.0, and thus the current build of gcc, which has the sys root to the 
> 11.0 baked into it, now fails.
> 
> A quick workaround is to set in your shell SDKROOT to point to the new path 
> to the 11.1 SDK. I use
> 
> export SDKROOT=`xcrun --show-sdk-path`
> 
> in my ~/.profile which does this for each shell.
> 
> This is almost certainly not the only issue this change in SDK versioning is 
> going to cause, and its likely going to take a while to figure out what to do 
> in MacPorts. One option, for ports which have this problem is to configure 
> them to use the versionless SDK path at configuration time, at least on macOS 
> 11 and newer… This has other issues, but for now it seems the lesser evil to 
> me…
> 
> Chris
> 
>> On 15 Dec 2020, at 9:23 pm, Andreas Skarlatoudis via macports-users 
>> > > wrote:
>> 
>> Hello all, 
>> 
>> I’m working on a MBP, 2018 model and yesterday I updated to the latest 
>> version of BigSur. Since then I cannot compile any fortran code and the 
>> error I get is 
>> 
>> ld: library not found for -lSystem
>> collect2: error: ld returned 1 exit status
>> 
>> 
>> I have tried both gcc9 and gcc10
>> 
>> gfortran -v gives this output :
>> 
>> Using built-in specs.
>> COLLECT_GCC=gfortran
>> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin20/10.2.0/lto-wrapper
>> Target: x86_64-apple-darwin20
>> Configured with: 
>> /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/gcc10/work/gcc-10.2.0/configure
>>  --prefix=/opt/local --build=x86_64-apple-darwin20 
>> --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit 
>> --libdir=/opt/local/lib/gcc10 --includedir=/opt/local/include/gcc10 
>> --infodir=/opt/local/share/info --mandir=/opt/local/share/man 
>> --datarootdir=/opt/local/share/gcc-10 --with-local-prefix=/opt/local 
>> --with-system-zlib --disable-nls --program-suffix=-mp-10 
>> --with-gxx-include-dir=/opt/local/include/gcc10/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 
>>  --enable-host-shared --disable-tls 
>> --with-pkgversion='MacPorts gcc10 10.2.0_4' 
>> --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
>> Thread model: posix
>> Supported LTO compression algorithms: zlib
>> gcc version 10.2.0 (MacPorts gcc10 10.2.0_4) 
>> 
>> I’ve removed and reinstalled MacPorts and all packages but it didn’t help.
>> 
>> Any ideas what may be the problem here? 
>> 
>> Thanks in advance for your help
>> 
>> Andreas 
>> 
>> Dr. Seismologist
>> 
> 



Re: latest update to BigSur 11.1 broke gcc

2020-12-15 Thread Christopher Jones
Hi,

This is another consequence of a change Apple has introduced with macOS11 which 
is the SDK version now changes on every incremental OS update. So updating from 
11.0 to 11.1 (and I presume Xcode 12.3) you now have SDK 11.1, not 11.0, and 
thus the current build of gcc, which has the sys root to the 11.0 baked into 
it, now fails.

A quick workaround is to set in your shell SDKROOT to point to the new path to 
the 11.1 SDK. I use

export SDKROOT=`xcrun --show-sdk-path`

in my ~/.profile which does this for each shell.

This is almost certainly not the only issue this change in SDK versioning is 
going to cause, and its likely going to take a while to figure out what to do 
in MacPorts. One option, for ports which have this problem is to configure them 
to use the versionless SDK path at configuration time, at least on macOS 11 and 
newer… This has other issues, but for now it seems the lesser evil to me…

Chris

> On 15 Dec 2020, at 9:23 pm, Andreas Skarlatoudis via macports-users 
>  wrote:
> 
> Hello all, 
> 
> I’m working on a MBP, 2018 model and yesterday I updated to the latest 
> version of BigSur. Since then I cannot compile any fortran code and the error 
> I get is 
> 
> ld: library not found for -lSystem
> collect2: error: ld returned 1 exit status
> 
> 
> I have tried both gcc9 and gcc10
> 
> gfortran -v gives this output :
> 
> Using built-in specs.
> COLLECT_GCC=gfortran
> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin20/10.2.0/lto-wrapper
> Target: x86_64-apple-darwin20
> Configured with: 
> /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/gcc10/work/gcc-10.2.0/configure
>  --prefix=/opt/local --build=x86_64-apple-darwin20 
> --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit 
> --libdir=/opt/local/lib/gcc10 --includedir=/opt/local/include/gcc10 
> --infodir=/opt/local/share/info --mandir=/opt/local/share/man 
> --datarootdir=/opt/local/share/gcc-10 --with-local-prefix=/opt/local 
> --with-system-zlib --disable-nls --program-suffix=-mp-10 
> --with-gxx-include-dir=/opt/local/include/gcc10/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 
>  --enable-host-shared --disable-tls 
> --with-pkgversion='MacPorts gcc10 10.2.0_4' 
> --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
> Thread model: posix
> Supported LTO compression algorithms: zlib
> gcc version 10.2.0 (MacPorts gcc10 10.2.0_4) 
> 
> I’ve removed and reinstalled MacPorts and all packages but it didn’t help.
> 
> Any ideas what may be the problem here? 
> 
> Thanks in advance for your help
> 
> Andreas 
> 
> Dr. Seismologist
> 



smime.p7s
Description: S/MIME cryptographic signature


latest update to BigSur 11.1 broke gcc

2020-12-15 Thread Andreas Skarlatoudis via macports-users
Hello all, 

I’m working on a MBP, 2018 model and yesterday I updated to the latest version 
of BigSur. Since then I cannot compile any fortran code and the error I get is 

ld: library not found for -lSystem
collect2: error: ld returned 1 exit status


I have tried both gcc9 and gcc10

gfortran -v gives this output :

Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin20/10.2.0/lto-wrapper
Target: x86_64-apple-darwin20
Configured with: 
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/gcc10/work/gcc-10.2.0/configure
 --prefix=/opt/local --build=x86_64-apple-darwin20 
--enable-languages=c,c++,objc,obj-c++,lto,fortran,jit 
--libdir=/opt/local/lib/gcc10 --includedir=/opt/local/include/gcc10 
--infodir=/opt/local/share/info --mandir=/opt/local/share/man 
--datarootdir=/opt/local/share/gcc-10 --with-local-prefix=/opt/local 
--with-system-zlib --disable-nls --program-suffix=-mp-10 
--with-gxx-include-dir=/opt/local/include/gcc10/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 
 --enable-host-shared --disable-tls 
--with-pkgversion='MacPorts gcc10 10.2.0_4' 
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (MacPorts gcc10 10.2.0_4) 

I’ve removed and reinstalled MacPorts and all packages but it didn’t help.

Any ideas what may be the problem here? 

Thanks in advance for your help

Andreas 

Dr. Seismologist