2020-07-31 23:03 UTC, Matthias Koeppe:
> On Friday, July 31, 2020 at 3:51:45 PM UTC-7, Dima Pasechnik wrote:
>> On Fri, Jul 31, 2020 at 11:41 PM Samuel Lelièvre:
>> > 2020-07-31 22:26 UTC, Dima Pasechnik:
>> > > >> I decided to configure with
>> > > >>
>> > > >> --with-system-gcc=no --with-system-gfortran=no
>> > >
>> > > --with-system-gcc must be yes on macOS, I think.
>> > > You actually cannot build Sage with "real" gcc/g++ on macOS,
>> > > you need system's gcc/g++, which is actually not gcc/g++, but clang/clang++
>> > >
>> > > system-gcc will come from Xcode, not from Homebrew.
>> > In fact, you can set `--with-system-gcc=no`, and Sage will build
>> > its own `gcc` (using the system `clang` to do so), and then use
>> > that `gcc` and its `gfortran` to build most other packages.
>> Does this still work?
> Not "still", rather "again", i.e., since Sage 9.1.
> This configuration is called "homebrew-macos-standard-gcc_spkg".
> Unfortunately, there are indeed several packages that do not
> succeed to build with the installed gcc, as you can see in this run.
> Some of these build failures are already tracked.
> For example: https://trac.sagemath.org/ticket/29613
> I have marked it as "minor" because, as you say, there is little point
> in using the gcc from the SPKG when both the XCode "gcc" (clang)
> and the homebrew compilers are better options.
If Sage is built in /Applications/SageMath, that folder could be
copied to a different computer running the same version
of macOS, and hopefully everything would work regardless
of whether the other computer had Conda, Homebrew,
Apple's Command Line Tools for Developers, or Xcode.
Not completely sure about that but want to give it a try!
> Samuel -- please do open the ticket - for the broken logic of the
> --with-system-XYZ arguments.
I will do that. The issue is not macOS-specific if I understand
correctly: if one wanted to build Sage's with its own gcc and
gfortran on another platform, the gcc it builds would also have
gfortran and thus trying to build gfortran would complain that
it was already built as part of gcc, is that correct?
Is the following another instance of the same broken logic?
leads to both gmp and mpir being built.
Expected: mpir needs to be built but not gmp,
and thus we skip building gmp.
Workaround: leave out `--with-system-gmp`.