scipy fails to build Sage 8.9 - MacOS 10.14.6

109 views
Skip to first unread message

Zachary Scherr

unread,
Oct 8, 2019, 4:17:44 PM10/8/19
to sage-devel
In an attempt to add openssl to sage I ran: sage -i openssl && sage -f python2 (which I've done successfully in every previous version of Sage 8.x).

The sage -f python2 failed while trying to build scipy-1.2.0.  This may be related to Ben's post https://groups.google.com/forum/#!topic/sage-devel/40E66JVHhW8 since it also failed with the message

ld: library not found for -lSystem

I too have gcc installed through homebrew, but I also tried removing it and installing gfortran separately and ended up with the same error.  I've attached the log file, anyone know what's going on?

   
scipy-1.2.0.log

Dima Pasechnik

unread,
Oct 8, 2019, 4:25:23 PM10/8/19
to sage-devel
did you try updating homebrew?

I think that what ultimately helped Ben to get a working gfortran, and correctly build whatever scipy's dependency is causing the problem.


--
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/5a356d10-a069-487a-a75c-ace33ba11f07%40googlegroups.com.

Zachary Scherr

unread,
Oct 8, 2019, 6:56:24 PM10/8/19
to sage-devel
Hi Dima,

   I have, but I noticed something interesting which is that gcc and g++ are no longer symlinked in my /usr/local/bin.  I have gcc-9 and g++-9 in there, but when I try "which gcc" and "which g++" I get /usr/bin/gcc and /usr/bin/g++ which are the versions installed by command line tools.  This is making me even more confused because sage didn't even attempt to build with the version of gcc installed by homebrew.

   I'm currently retesting with gcc and g++ symlinked to the new version.  I'll let you know if I have any success.

Thanks,
Zach  


On Tuesday, October 8, 2019 at 4:25:23 PM UTC-4, Dima Pasechnik wrote:
did you try updating homebrew?

I think that what ultimately helped Ben to get a working gfortran, and correctly build whatever scipy's dependency is causing the problem.


On Tue, Oct 8, 2019 at 3:17 PM Zachary Scherr <zsc...@gmail.com> wrote:
In an attempt to add openssl to sage I ran: sage -i openssl && sage -f python2 (which I've done successfully in every previous version of Sage 8.x).

The sage -f python2 failed while trying to build scipy-1.2.0.  This may be related to Ben's post https://groups.google.com/forum/#!topic/sage-devel/40E66JVHhW8 since it also failed with the message

ld: library not found for -lSystem

I too have gcc installed through homebrew, but I also tried removing it and installing gfortran separately and ended up with the same error.  I've attached the log file, anyone know what's going on?

   

--
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.

John H Palmieri

unread,
Oct 8, 2019, 7:13:22 PM10/8/19
to sage-devel
On OS X, Sage by default should use the system's "gcc" (which is actually clang), so it's okay to not have a symlink connecting gcc-9 to gcc in /usr/local/bin. What you really need is /usr/local/bin/gfortan, and homebrew should provide that.

  John

Dima Pasechnik

unread,
Oct 8, 2019, 7:14:49 PM10/8/19
to sage-devel
No, you do NOT need "proper" gcc to build Sage on OSX, you need OSX's clang/clang++
OSX in its infinite wisdom aliases clang to gcc.

One cannot build Sage on OSX with "real" gcc.
That is, your "gcc" should be /usr/bin/gcc, which is actually clang.



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/cd8fa4be-df55-42a4-aeb3-d747fc42fbda%40googlegroups.com.

Zachary Scherr

unread,
Oct 8, 2019, 11:22:43 PM10/8/19
to sage-devel
That makes sense. I also tried installing gcc@8 and symlinking gfortran to make it point to the older version, but everything I've tried fails at the same point.

Dima Pasechnik

unread,
Oct 8, 2019, 11:44:53 PM10/8/19
to sage-devel
Note that Ben was building Sage from source, whereas you're trying to modify a binary Sage installation, something that is more error-prone.
Would you mind trying to build from source instead?


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/8847eaa7-389c-49d8-b9d2-09d696e2a4b8%40googlegroups.com.

Zachary Scherr

unread,
Oct 8, 2019, 11:47:41 PM10/8/19
to sage-devel
Will do. It also occurs to me that maybe I should force Homebrew to build GCC from source first and see if that works.  I'll experiment some more and let you know how it goes. Thank you for the help.

Dima Pasechnik

unread,
Oct 9, 2019, 12:00:51 AM10/9/19
to sage-devel
I think there is no need to make Homebrew build gcc from source. (and again, you only need gfortran, so make sure there is no "real" gcc in your PATH)
It's much more likely just the problem of using a binary built of Sage. 

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/432f41bd-e140-445e-a4ac-856911505016%40googlegroups.com.

Zachary Scherr

unread,
Oct 13, 2019, 2:45:03 PM10/13/19
to sage-devel
Hi Dima,

   Just wanted to give you an update that Isuru's suggested fix also worked for me.  I have Xcode installed and have the directory

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

and a symlink /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk to this directory.

I downloaded Isuru's suggested file and moved it to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk, and now everything works.

I'm guessing I could have just symlinked MacOSX10.14.sdk to MacOSX.sdk and everything would have worked, but I have not tested this yet.

Best,
Zach


 
Reply all
Reply to author
Forward
0 new messages