OSX Catalina works

1,010 views
Skip to first unread message

Volker Braun

unread,
Oct 13, 2019, 4:26:52 AM10/13/19
to sage-devel
I just upgraded the OSX buildbot and Sage works in case anybody is wondering. This is the first time in years that the latest OSX release doesn't introduce major toolchain issues and/or scrambles the filesystem, hope this starts a trend ;-) 

David Joyner

unread,
Oct 13, 2019, 9:56:31 AM10/13/19
to sage-devel
On Sun, Oct 13, 2019 at 4:26 AM Volker Braun <vbrau...@gmail.com> wrote:
I just upgraded the OSX buildbot and Sage works in case anybody is wondering. This is the first time in years that the latest OSX release doesn't introduce major toolchain issues and/or scrambles the filesystem, hope this starts a trend ;-) 

I can't get the pre-10.15 binaries to work (error in executing python 2.7), 
nor can I get the source to compile on 10.15.1 (stalls out on compiling
gfortran-7.4.0). I haven't tried the app version though.
This is on a late 2013 macbook pro.

 

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/069eafdb-e5c7-42cc-a72d-d9ff11b1bf53%40googlegroups.com.

Dima Pasechnik

unread,
Oct 13, 2019, 10:04:57 AM10/13/19
to sage-devel
the fact that Homebrew is not yet ready for 10.15 speaks for itself.

John H Palmieri

unread,
Oct 13, 2019, 11:17:30 AM10/13/19
to sage-devel
A few days ago, after the Catalina release, I used Homebrew to build gcc, and it worked. Well, it built from source, which took a while, but it built a version of gfortran which worked well enough to build Sage. (As far as I know, it's completely functional, but the only reason I install gfortran is to be able to build Sage.)


On Sunday, October 13, 2019 at 7:04:57 AM UTC-7, Dima Pasechnik wrote:
the fact that Homebrew is not yet ready for 10.15 speaks for itself.

On Sun, 13 Oct 2019, 14:56 David Joyner, <wdjo...@gmail.com> wrote:
On Sun, Oct 13, 2019 at 4:26 AM Volker Braun <vbrau...@gmail.com> wrote:
I just upgraded the OSX buildbot and Sage works in case anybody is wondering. This is the first time in years that the latest OSX release doesn't introduce major toolchain issues and/or scrambles the filesystem, hope this starts a trend ;-) 

I can't get the pre-10.15 binaries to work (error in executing python 2.7), 
nor can I get the source to compile on 10.15.1 (stalls out on compiling
gfortran-7.4.0). I haven't tried the app version though.
This is on a late 2013 macbook pro.

 

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.

Samuel Lelievre

unread,
Oct 13, 2019, 3:24:44 PM10/13/19
to sage-devel
Sun 2019-10-13 08:26:52 UTC, Volker Braun:
That's good to hear, and there were people wondering.
See for instance this question on Ask Sage about SageMath
and macOS 10.15 "Catalina":

- How to unlock SageMath 8.8 on macOS 10.15 Catalina?

By "Sage works" do you mean any of the following?

- there are / there will be binaries for macOS 10.15 "Catalina"
- the SageMath 8.9 binaries for macOS 10.14 "Mojave"
  also work for macOS 10.15 "Catalina"
- on macOS 10.15 "Catalina" building SageMath 8.9 from
  source gives a version that works and is not "locked"


David Joyner

unread,
Oct 13, 2019, 3:43:11 PM10/13/19
to sage-devel
On Sun, Oct 13, 2019 at 11:17 AM John H Palmieri <jhpalm...@gmail.com> wrote:
A few days ago, after the Catalina release, I used Homebrew to build gcc, and it worked. Well, it built from source, which took a while, but it built a version of gfortran which worked well enough to build Sage. (As far as I know, it's completely functional, but the only reason I install gfortran is to be able to build Sage.)

I installed homebrew on OS10.15.1, promptly got a "10.15 is unsupported" warning,
tried to compile gcc, but that failed with another  "10.15 is unsupported" warning.



On Sunday, October 13, 2019 at 7:04:57 AM UTC-7, Dima Pasechnik wrote:
the fact that Homebrew is not yet ready for 10.15 speaks for itself.

On Sun, 13 Oct 2019, 14:56 David Joyner, <wdjo...@gmail.com> wrote:


On Sun, Oct 13, 2019 at 4:26 AM Volker Braun <vbrau...@gmail.com> wrote:
I just upgraded the OSX buildbot and Sage works in case anybody is wondering. This is the first time in years that the latest OSX release doesn't introduce major toolchain issues and/or scrambles the filesystem, hope this starts a trend ;-) 

I can't get the pre-10.15 binaries to work (error in executing python 2.7), 
nor can I get the source to compile on 10.15.1 (stalls out on compiling
gfortran-7.4.0). I haven't tried the app version though.
This is on a late 2013 macbook pro.

 

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/069eafdb-e5c7-42cc-a72d-d9ff11b1bf53%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAEQuuAW6EeWi91CH763omMKn5Obq12m5_t5usA8tUYvOvPKVEw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/6a3e69a5-fd42-4965-a6fe-4a24ee1e8567%40googlegroups.com.

kcrisman

unread,
Oct 14, 2019, 8:58:36 AM10/14/19
to sage-devel
On a possibly related note, I read somewhere that Catalina does not support 32-bit apps.  So I suppose using older binaries that were not compiled with this support (if that is even relevant to Sage, though at least for Cygwin at one point it was) may be problematic.

Volker Braun

unread,
Oct 14, 2019, 1:43:09 PM10/14/19
to sage-devel
Means: I successfully compiled Sage 8.9 on OSX Catalina with Xcode 11.0

Andrew

unread,
Oct 28, 2019, 8:01:18 PM10/28/19
to sage-devel
I (stupidly) upgraded to XCode 11.1 on catalina. I have succeeded in compiling sage with python2, not python 3, on an imac but can't get it to compile on a macbook pro with fairly similar specs.I am using homebrew and have:

ProductName:    Mac OS X
ProductVersion:    10.15
BuildVersion:    19A603
Xcode 11.1
Build version 11A1027

with gcc --version returning

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

When I try to compile sage is breaks with:

* package: givaro-4.1.1
  log file: /usr/local/src/sage/logs/pkgs/givaro-4.1.1.log
  build directory: /usr/local/src/sage/local/var/tmp/sage/build/givaro-4.1.1
* package: ntl-11.3.2
  log file: /usr/local/src/sage/logs/pkgs/ntl-11.3.2.log
  build directory: /usr/local/src/sage/local/var/tmp/sage/build/ntl-11.3.2

Sometimes I also get ntl failing to compile. I have compared the log files one the two machines but can't identify the problem. I attach the log files for givaro and ntl and the install.log from the machine that has the problem. Does anyone have any ideas how to fix this?

Andrew
ntl-11.3.2.log
givaro-4.1.1.log
install.log.gz

Dima Pasechnik

unread,
Oct 29, 2019, 2:51:02 AM10/29/19
to sage-devel
Did you run

xcode-select --install

after Xcode upgrade?
By the way, why don't you use NTL from brew?
https://formulae.brew.sh/formula/ntl#default

you can also make things easier by installing Flint and Arb into
homebrew, by using formulas from
https://github.com/dimpase/homebrew-science

Run

brew install dimpase/science/flint
brew install dimpase/science/arb

(these are source-only, so this will build packages from source)
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/695c9caa-6efe-49ad-a05f-100c49be7a93%40googlegroups.com.

Andrew

unread,
Oct 29, 2019, 7:45:53 AM10/29/19
to sage-devel
Thanks Dima


On Tuesday, 29 October 2019 17:51:02 UTC+11, Dima Pasechnik wrote:
Did you  run

xcode-select --install

after Xcode upgrade?

Yes, the command line tools are correctly installed but, as far as I can see, xcode-select --install  is no longer the correct way to check this because it results in the error:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates
 
By the way, why don't you use NTL from brew?
https://formulae.brew.sh/formula/ntl#default

you can also make things easier by installing Flint and Arb into
homebrew, by using formulas from
https://github.com/dimpase/homebrew-science

Run

brew install dimpase/science/flint
brew install dimpase/science/arb

Thanks. I didn't know that there were homebrew formulas for any of these. Unfortunately, neither of these work either, giving similar (but shorter) messages to the compilation errors with sage. Installing flint results in:

==> Downloading http://flintlib.org/flint-2.5.2.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/flint/2.5.2_1 --with-gmp=/usr/local/opt/gmp --with-mpfr=/u
==> make
Last 15 lines from /Users/andrew/Library/Logs/Homebrew/flint/02.make:
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:324:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:325:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:326:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
13 errors generated.
make[2]: *** [build/interfaces/NTL-interface.lo] Error 1
clang: error: no such file or directory: 'build/interfaces/NTL-interface.lo'
make[1]: *** [libflint-13.5.2.dylib] Error 1
make: *** [library] Error 2


and arb fails in the same way because it first tries to install flint.

Andrew


> To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.

Dima Pasechnik

unread,
Oct 29, 2019, 9:15:43 AM10/29/19
to sage-devel
try explicitly adding "-stdlib=libc++" to CXXLAGS and LDFLAGS.


To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/dcb00e7a-bd6f-4703-bfbb-e06c040d063d%40googlegroups.com.

John H Palmieri

unread,
Oct 29, 2019, 11:09:42 AM10/29/19
to sage-devel


On Tuesday, October 29, 2019 at 4:45:53 AM UTC-7, Andrew wrote:
Thanks Dima

On Tuesday, 29 October 2019 17:51:02 UTC+11, Dima Pasechnik wrote:
Did you  run

xcode-select --install

after Xcode upgrade?

Yes, the command line tools are correctly installed but, as far as I can see, xcode-select --install  is no longer the correct way to check this because it results in the error:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

After installing Xcode, did you run Xcode? Often it needs to be run once to install some components, and in particular the command line tools.

Samuel Lelièvre

unread,
Oct 29, 2019, 8:39:18 PM10/29/19
to Sage-devel
Tue 2019-10-29 11:46 UTC, Andrew:
>
> Thanks Dima
>
> On Tuesday, 29 October 2019 17:51:02 UTC+11, Dima Pasechnik wrote:
>>
>> Did you run
>>
>> xcode-select --install
>>
>> after Xcode upgrade?
>
>
> Yes, the command line tools are correctly installed but, as far as I can see,
> xcode-select --install is no longer the correct way to check this
> because it results in the error:
>
> xcode-select: error: command line tools are already installed, use "Software Update" to install updates

It's still the correct way; the error message is for trying to install
while it's already installed. Sometimes one needs to start XCode
once, and agree to the terms and conditions.

Andrew

unread,
Oct 30, 2019, 12:33:57 AM10/30/19
to sage-devel
Thanks everyone for their comments.

 > try explicitly adding "-stdlib=libc++" to CXXLAGS and LDFLAGS.

Adding these flags to the Makefile didn't change anything: the build again failed with givaro-4.1.1

> After installing Xcode, did you run Xcode?

Yes, of course! Xcode and the command line tools are both fully installed, with the terms and conditions agreed. The build would fail much earlier if this was not the case.

Just for fun I tried reinstalling Xcode (and the command line tools and then accepting the xcode conditions etc) but this made no difference in the sense that the sage build died at exactly the same place. Perhaps I should winding back to xcode 11?

Andrew

Dima Pasechnik

unread,
Oct 30, 2019, 2:41:33 AM10/30/19
to sage-devel
it seems to be related to Apple removing support for libstdc++.

Could it be that you have something related to "deployment target"
(MACOSX_DEPLOYMENT_TARGET ?) in your default environment variables, or
similar settings in Xcode?
Or perhaps CPLUS_INCLUDE_PATH is set somewhere?

Perhaps your "XcodeDefault.xctoolchain" - that's where that wretched
C++ cmath header comes from - is pointing to a wrong toolchain?
Can you search for the files named "cmath" on the machine?

Andrew

unread,
Oct 30, 2019, 8:14:13 AM10/30/19
to sage-devel
I don't have anything like MACOSX_DEPLOYMENT_TARGET or CPLUS_INCLUDE_PATH set and I'll paste the list of filenames contain cmath below.

I wonder if this is part of the problem. According to gcc--version:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

however, the gxx-include directory

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1

does not exist. I tried adding a link from here to

/Library/Developer/CommandLineTools/usr/include/c++/v1/

and setting CXXFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" but this didn't help.

Thanks again for your help!
Andrew
----
/Applications/GIMP.app/Contents/Resources/lib/python2.7/lib-dynload/cmath.so
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/lib-dynload/cmath.cpython-37m-darwin.so
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/cmath.rb
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/lib-dynload/cmath.cpython-37m-darwin.so
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/cmath.rb
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath
/Library/Ruby/Gems/2.6.0/specifications/default/cmath-1.0.0.gemspec
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cmath.so
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/cmath.rb
/System/Library/Templates/Data/Library/Ruby/Gems/2.6.0/specifications/default/cmath-1.0.0.gemspec
/opt/metasploit-framework/embedded/lib/ruby/2.4.0/cmath.rb
/usr/local/Cellar/boost/1.71.0/include/boost/compatibility/cpp_c_headers/cmath
/usr/local/Cellar/boost/1.71.0/include/boost/config/no_tr1/cmath.hpp
/usr/local/Cellar/boost/1.71.0/include/boost/phoenix/stl/cmath.hpp
/usr/local/Cellar/boost/1.71.0/include/boost/units/cmath.hpp
/usr/local/Cellar/ipython/7.8.0/libexec/vendor/lib/python3.7/site-packages/jedi/third_party/typeshed/stdlib/2and3/cmath.pyi
/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/cmath.cpython-37m-darwin.so
/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cmath.so
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/cmath.rb
/usr/local/Cellar/ruby/2.6.5/lib/ruby/gems/2.6.0/specifications/default/cmath-1.0.0.gemspec
/usr/local/src/sage/local/include/boost/compatibility/cpp_c_headers/cmath
/usr/local/src/sage/local/include/boost/config/no_tr1/cmath.hpp
/usr/local/src/sage/local/include/boost/phoenix/stl/cmath.hpp
/usr/local/src/sage/local/include/boost/units/cmath.hpp

Dima Pasechnik

unread,
Oct 30, 2019, 8:27:45 AM10/30/19
to sage-devel
I meant cmath files without extensions. These are C++ header files.
It appears there are two such files on the list. Are they different?


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/518a5813-7c1d-4d5d-85df-bf43398aef7c%40googlegroups.com.

Andrew

unread,
Oct 30, 2019, 11:58:38 PM10/30/19
to sage-devel


On Wednesday, 30 October 2019 23:27:45 UTC+11, Dima Pasechnik wrote:
I meant cmath files without extensions. These are C++ header files.
It appears there are two such files on the list. Are they different?

In the interim have have installed homebrew's gcc to see if this helps, but it doesn't. The cmath files that I now have on my system are:

-rw-r--r--  1 root    wheel  14515 23 Jul 03:08 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath
-rw-r--r--  1 root    wheel  14515 23 Jul 03:08 /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath

As you suspected, these two files are identical.

from homebrew's gcc:
-rw-r--r--  1 andrew  staff    619 14 Aug 22:29 /usr/local/Cellar/boost/1.71.0/include/boost/compatibility/cpp_c_headers/cmath
-rw-r--r--  1 andrew  staff  49094 12 Aug 17:58 /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/cmath
-rw-r--r--  1 andrew  staff   6570 12 Aug 17:58 /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/ext/cmath
-rw-r--r--  1 andrew  staff  43806 12 Aug 17:58 /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/tr1/cmath
-rw-r--r--  1 andrew  wheel    619 31 Oct 13:51 /usr/local/src/sage/local/include/boost/compatibility/cpp_c_headers/cmath

Andrew

John H Palmieri

unread,
Nov 1, 2019, 1:15:24 PM11/1/19
to sage-devel
If you have the time, could you try uninstalling Xcode and then reinstalling it? You might also try uninstalling and reinstalling homebrew's gcc and any other homebrew components that are relevant to Sage. There may be some remnants of previously installed software that is somehow interfering.

  John

John H Palmieri

unread,
Nov 1, 2019, 1:20:08 PM11/1/19
to sage-devel
I just upgraded a different machine to Catalina. This one didn't have Xcode or homebrew installed beforehand, so I installed Xcode, its command-line tools, and homebrew's gcc. Then I built Sage and it worked. I have now installed a bunch of other homebrew packages relevant to Sage, and the build is going fine. (I had to log out of the machine, so I had to interrupt the build, but it had made it past givaro and ntl, which were sticking points for another user in this thread.)

Thinking back on the other machine I upgraded, that one was also relatively "clean": no old Xcode or old homebrew stuff. So for those who are having problems, I wonder if uninstalling Xcode first would help. Maybe there are some other old libraries which should be removed before installing the new Xcode.

  John

Andrew

unread,
Nov 1, 2019, 2:45:08 PM11/1/19
to sage-devel
Thanks John. I'll give this a try on Monday.
Andrew

David Joyner

unread,
Nov 2, 2019, 7:46:13 PM11/2/19
to sage-devel
On Fri, Nov 1, 2019 at 1:15 PM John H Palmieri <jhpalm...@gmail.com> wrote:
If you have the time, could you try uninstalling Xcode and then reinstalling it? You might also try uninstalling and reinstalling homebrew's gcc and any other homebrew components that are relevant to Sage. There may be some remnants of previously installed software that is somehow interfering.

  John


I uninstalled xcode (including the CL tools) then reinstalled the latest version
(including the CL tools, which now go in a new directory). I also uninstalled and reinstalled
homebrew.

This time homebrew installed gcc fine. The compilation of sage-9.0b3 went fine until
it hit brial-1.2.5. Then I got:

[brial-1.2.5] Package gdlib was not found in the pkg-config search path.
[brial-1.2.5] Perhaps you should add the directory containing `gdlib.pc'
[brial-1.2.5] to the PKG_CONFIG_PATH environment variable
[brial-1.2.5] Package 'gdlib', required by 'world', not found

FWIW, I did find gdlib.pc in a directory of a non-working older sage:

/Users/wdj/sagefiles/SageMath/local/lib/pkgconfig/gdlib.pc


 Any suggestions?


On Wednesday, October 30, 2019 at 8:58:38 PM UTC-7, Andrew wrote:


On Wednesday, 30 October 2019 23:27:45 UTC+11, Dima Pasechnik wrote:
I meant cmath files without extensions. These are C++ header files.
It appears there are two such files on the list. Are they different?

In the interim have have installed homebrew's gcc to see if this helps, but it doesn't. The cmath files that I now have on my system are:

-rw-r--r--  1 root    wheel  14515 23 Jul 03:08 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath
-rw-r--r--  1 root    wheel  14515 23 Jul 03:08 /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath

As you suspected, these two files are identical.

from homebrew's gcc:
-rw-r--r--  1 andrew  staff    619 14 Aug 22:29 /usr/local/Cellar/boost/1.71.0/include/boost/compatibility/cpp_c_headers/cmath
-rw-r--r--  1 andrew  staff  49094 12 Aug 17:58 /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/cmath
-rw-r--r--  1 andrew  staff   6570 12 Aug 17:58 /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/ext/cmath
-rw-r--r--  1 andrew  staff  43806 12 Aug 17:58 /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/tr1/cmath
-rw-r--r--  1 andrew  wheel    619 31 Oct 13:51 /usr/local/src/sage/local/include/boost/compatibility/cpp_c_headers/cmath

Andrew

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

Dima Pasechnik

unread,
Nov 3, 2019, 3:00:57 AM11/3/19
to sage-devel
looks like gd package didn't install right.

you can install gd via Homebrew:


also, by the way, install pkg-config


(it would be great if someone with well-working osx system updated Installation guide to list names of Homebrew packages to match Sage ones, listed on


I also have formulas for flint and arb, they would be built from source and installed in Homebrew structure.








David Joyner

unread,
Nov 3, 2019, 6:50:10 AM11/3/19
to sage-devel
On Sun, Nov 3, 2019 at 3:00 AM Dima Pasechnik <dim...@gmail.com> wrote:
looks like gd package didn't install right.

you can install gd via Homebrew:


also, by the way, install pkg-config


(it would be great if someone with well-working osx system updated Installation guide to list names of Homebrew packages to match Sage ones, listed on


I'll do that and try again. 

BTW, I added gdlib.pc to PKG_CONFIG_PATH and reran make. 
This time it got all the way to sagelib before stalling:

[sagelib-9.0.beta3] /Volumes/Transcend/wooster/computer-algebra/sage-9.0.beta3/local/include/omalloc/omalloc.h:20:20: note: expanded from macro 'REGISTER'

[sagelib-9.0.beta3]   #define REGISTER register

[sagelib-9.0.beta3]                    ^

[sagelib-9.0.beta3] 96 warnings generated.

make[3]: *** [sagelib] Error 2

make[2]: *** [all-start] Error 2


 

David Joyner

unread,
Nov 3, 2019, 10:03:10 AM11/3/19
to sage-devel
On Sun, Nov 3, 2019 at 6:49 AM David Joyner <wdjo...@gmail.com> wrote:


On Sun, Nov 3, 2019 at 3:00 AM Dima Pasechnik <dim...@gmail.com> wrote:
looks like gd package didn't install right.

you can install gd via Homebrew:


also, by the way, install pkg-config


(it would be great if someone with well-working osx system updated Installation guide to list names of Homebrew packages to match Sage ones, listed on


I'll do that and try again. 

This time it failed while compiling m4ri.


m4ri-20140914.p0] ld: library not found for -lpng12
[m4ri-20140914.p0] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[m4ri-20140914.p0] make[5]: *** [libm4ri.la] Error 1
[m4ri-20140914.p0] make[4]: *** [all] Error 2
[m4ri-20140914.p0] 

Dima Pasechnik

unread,
Nov 3, 2019, 11:07:02 AM11/3/19
to sage-devel
could you post config.log ?

Dima Pasechnik

unread,
Nov 3, 2019, 12:21:49 PM11/3/19
to sage-devel


On Sun, Nov 3, 2019 at 3:03 PM David Joyner <wdjo...@gmail.com> wrote:
>
>
>
> On Sun, Nov 3, 2019 at 6:49 AM David Joyner <wdjo...@gmail.com> wrote:
>>
>>
>>
>> On Sun, Nov 3, 2019 at 3:00 AM Dima Pasechnik <dim...@gmail.com> wrote:
>>>
>>> looks like gd package didn't install right.
>>>
>>> you can install gd via Homebrew:
>>>
>>> https://formulae.brew.sh/formula/gd
>>>distance_regular.

>>> also, by the way, install pkg-config
>>>
>>> https://formulae.brew.sh/formula/pkg-config
>>>
>>> (it would be great if someone with well-working osx system updated Installation guide to list names of Homebrew packages to match Sage ones, listed on
>>> https://trac.sagemath.org/ticket/27330)
>>>
>>
>> I'll do that and try again.
>
>
> This time it failed while compiling m4ri.
>
have you uninstalled Sage packages that were to be replaced by Homebrew ones, that you installed?

make libpng-clean
make libgd-clean

(libpng is a dependency of libgd, so it should be available once you have libgd in Homebrew)


Andrew

unread,
Nov 3, 2019, 11:53:57 PM11/3/19
to sage-devel
I uninstalled xcode and brew's gcc and then reinstall them both but I still the the same failure with givaro.
I don't know if this is related, but even though I installed ntl using brew it is not used when I compile sage as the log file reports:

checking NTL/ZZ.h usability... no
checking NTL/ZZ.h presence... yes
configure: WARNING: NTL/ZZ.h: present but cannot be compiled
configure: WARNING: NTL/ZZ.h:     check for missing prerequisite headers?
configure: WARNING: NTL/ZZ.h: see the Autoconf documentation
configure: WARNING: NTL/ZZ.h:     section "Present But Cannot Be Compiled"
configure: WARNING: NTL/ZZ.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to sage-...@googlegroups.com ##
configure: WARNING:     ## ------------------------------------------ ##
checking for NTL/ZZ.h... no
checking whether we can link a program using NTL... no
checking NTL version >= 10.3... 11.4.1
using Sage's ntl SPKG
configure: === checking whether to install the flint SPKG ===
checking installing mpfr or ntl? ... yes; install flint as well
using Sage's flint SPKG
configure: === checking whether to install the arb SPKG ===
checking installing flint? ... yes; install arb as well
configure: === checking whether to install the bzip2 SPKG ===

That sage wants compile flint and arb is expected because I try to install them with brew I get errors like:

==> make
Last 15 lines from /Users/andrew/Library/Logs/Homebrew/flint/02.make:
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:324:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:325:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:326:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
13 errors generated.
make[2]: *** [build/interfaces/NTL-interface.lo] Error 1

These are similar to the errors that I get with givaro when compiling sage.

John: what version of xcode and the command line tools are using and if you first do

make distclean

are you still able to compile sage? As I reinstalled xcode from the appsrtore I am using the latest versions av I am using:

ProductName:    Mac OS X
ProductVersion:    10.15.1
BuildVersion:    19B88
Xcode 11.2
Build version 11B52

Andrew

John H Palmieri

unread,
Nov 4, 2019, 12:35:55 AM11/4/19
to sage-devel
I am using the same versions of OS and Xcode as you. I am now doing this with a third computer. This one had an old Xcode and some homebrew stuff already installed, and it gave me some problems. I ended up uninstalling and then reinstalling various parts of homebrew, and Sage now builds for me. (I had also first installed some things by hand, like gfortran many months ago. So I had to delete things like that when doing the homebrew installation.)

$ brew list
autoconf        libdvdcss       p7zip
automake        libevent        pari
boost           libffi          pcre
cabextract      libidn2         pkg
-config
cimg            libmpc          python
cmake           libomp          readline
emacs
-mac       libpng          shared-mime-info
gcc             libtasn1        sqlite
gdbm            libtool         texinfo
gettext         libunistring    unbound
glib            mpfi            unrar
gmp             mpfr            wine
gnutls          nettle          winetricks
gpatch          ntl             x265
icu4c           openexr         xz
ilmbase         openssl         yasm
isl             openssl@1
.1
libde265        p11
-kit


$ brew
--version
Homebrew 2.1.15
Homebrew/homebrew-core (git revision d191f; last commit 2019-11-03)
Homebrew/homebrew-cask (git revision cbd79; last commit 2019-11-03)

Andrew

unread,
Nov 4, 2019, 2:37:33 AM11/4/19
to sage-devel
Great, thanks John. I have essentially the same version of brew:
Homebrew 2.1.15
Homebrew/homebrew-core (git revision 89bf3; last commit 2019-11-04)
Homebrew/homebrew-cask (git revision e317e; last commit 2019-11-04)

but I have many more brew packages installed. I reinstalled all of the brew packages last week but I have just uninstalled all of the brew packages. I will now add everything back in one at a time, starting with things on your list, and see if I can compile sage. I'll report back what I find.

Andrew

Dima Pasechnik

unread,
Nov 4, 2019, 5:34:48 AM11/4/19
to sage-...@googlegroups.com
in view of problems with building gcc/gfortran on osx 10.15 and latest Xcode, one must wonder what Homebrew does to make it work.
Do they patch system headers, or something like that?


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

David Joyner

unread,
Nov 4, 2019, 12:37:49 PM11/4/19
to sage-devel
On Sun, Nov 3, 2019 at 11:07 AM Dima Pasechnik <dim...@gmail.com> wrote:
could you post config.log ?

It is attached.
 
config.log

Dima Pasechnik

unread,
Nov 4, 2019, 12:51:46 PM11/4/19
to sage-devel
configure:12690: g++ -E -std=gnu++11
-I/Volumes/Transcend/wooster/computer-algebra/anaconda3/include
conftest.cpp

anaconda conflict?
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAEQuuAUUzbUrJSZrU15yfWoOAR5zSVPOFgqwAHTLGWF4J6Zgkg%40mail.gmail.com.

Volker Braun

unread,
Nov 4, 2019, 3:50:07 PM11/4/19
to sage-devel

Andrew

unread,
Nov 4, 2019, 10:54:00 PM11/4/19
to sage-devel
Sadly this still is not working for me. When I found that using your brew formulae didn't work I uninstalled brew, xcode and the command line tools and then reinstalled everything. My current configuration is:

$ sw_vers
ProductName:    Mac OS X
ProductVersion:    10.15.1
BuildVersion:    19B88


$ xcode
-select --version
xcode
-select version 2370.

$ xcodebuild
-version
Xcode 11.2
Build version 11B52


$ brew list
autoconf        gnutls          libmpc          openexr            shared
-mime-info
automake        gpatch          libomp          openssl            sqlite
boost           icu4c           libpng          openssl@1
.1        texinfo
cimg            ilmbase         libtasn1        p11
-kit            unbound
cmake           isl             libtool         p7zip              unrar
gcc             libde265        libunistring    pari               xz
gdbm            libdvdcss       mpfi            pcre
gettext         libevent        mpfr            pkg
-config
glib            libffi          nettle          python
gmp             libidn2         ntl             readline

$ env
NVM_RC_VERSION
=
TERM_PROGRAM
=Apple_Terminal
NVM_CD_FLAGS
=
SHELL
=/usr/local/bin/bash
TERM
=xterm-256color
TMPDIR
=/var/folders/s0/zb5nzt557xj_hc2t_4j_c2zr0000gn/T/
TERM_PROGRAM_VERSION
=433
HTTP_SMS_USER
=mathas
OLDPWD
=/Users/andrew
TERM_SESSION_ID
=8B5621BC-E947-4260-A2DD-0ABB88C39133
NVM_DIR
=/Users/andrew/.nvm
USER
=andrew
TIMEFORMAT
=
real
%3R    user %3U    sys %3S    pcpu %P

SAGE_BROWSER
=chrome
SSH_AUTH_SOCK
=/private/tmp/com.apple.launchd.bB0vdzfNg7/Listeners
SAGE_INSTALL_CCACHE
=yes
PATH
=/Users/andrew/bin:/Users/andrew/.node/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/usr/local/sbin
INPUTRC
=/Users/andrew/.dotfiles/config/inputrc
PWD
=/usr/local/src/sage
LANG
=en_AU.UTF-8
SAGE_ROOT
=/usr/local/src/sage
XPC_FLAGS
=0x0
HISTIGNORE
=&:bg:fg:ll:h
XPC_SERVICE_NAME
=0
SHLVL
=1
HOME
=/Users/andrew
MAKE
=make -j3
XDG_CONFIG_HOME
=/Users/andrew/.dotfiles/
TEXEDIT
=gvim +%d %s
PYCURL_CURL_CONFIG
=/usr/local/opt/curl-openssl/bin/curl-config
FULLPATH
=/Users/andrew/bin:/Users/andrew/.node/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/usr/local/sbin
LOGNAME
=andrew
DISPLAY
=:0
SQLITE_EXEMPT_PATH_FROM_VNODE_GUARDS
=/Users/andrew/Library/WebKit/Databases
HISTTIMEFORMAT
=%H:%M >
_
=/usr/bin/env


Is there anything wrong in my attached config file?

Andrew

ps. I also tried compiling with https://trac.sagemath.org/ticket/28691 but the build failed in exactly the same way.
config.log

David Joyner

unread,
Nov 5, 2019, 8:31:24 AM11/5/19
to sage-devel
On Mon, Nov 4, 2019 at 12:51 PM Dima Pasechnik <dim...@gmail.com> wrote:
configure:12690: g++ -E -std=gnu++11
-I/Volumes/Transcend/wooster/computer-algebra/anaconda3/include
conftest.cpp

anaconda conflict?

I deleted it, used brew to install a few more packages, and
added some symlinks (which brew leaves out for some reason?)
and tried again. It compiled the source but not the docs (some sort
of java issue), but sage works!

bash-3.2$ ./sage

┌────────────────────────────────────────────────────────────────────┐

│ SageMath version 9.0.beta3, Release Date: 2019-10-26              

│ Using Python 3.7.3. Type "help()" for help.                       

└────────────────────────────────────────────────────────────────────┘

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓

┃ Warning: this is a prerelease version, and it may be unstable.    

┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

sage: 2+3

5

Thanks to everyone for the help! I now have a working version of sage
on  my 10.15.1 laptop running the latest version of Xcode:-)

Andrew

unread,
Nov 19, 2019, 9:44:14 PM11/19/19
to sage-devel
For the time being I have given up on trying to compile sage directly and have instead installed it using anaconda.

Andrew
Reply all
Reply to author
Forward
0 new messages