Error installing scipy-1.2.0 when compiling sage math 9.0.beta1

119 views
Skip to first unread message

David Coudert

unread,
Oct 13, 2019, 6:36:08 AM10/13/19
to sage-devel
While compiling 9.0.beta1 with python3 on a macbook air with macOS mojave, I got an error building scipy 1.2.0.
The log file attached.

Any help is more than welcome.
Thanks,
David.

scipy-1.2.0.log

Dima Pasechnik

unread,
Oct 13, 2019, 6:53:02 AM10/13/19
to sage-devel
We have already seen that puzzling

ld: library not found for -lSystem

error message.

Is there a /usr/lib/libSystem.dylib present?

If yes, then I guess this means a broken dependency of scipy, more
specifically, a broken dylib, built
along the way.
or Xcode that needs to be reinstalled...

Can you do
./sage --python
>> import numpy

without an error?
> --
> 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/4b6234e9-7986-41bc-bf98-d98878c88415%40googlegroups.com.

David Coudert

unread,
Oct 13, 2019, 7:19:00 AM10/13/19
to sage-devel


Le dimanche 13 octobre 2019 12:53:02 UTC+2, Dima Pasechnik a écrit :
We have already seen that puzzling

ld: library not found for -lSystem

error message.

Is there a /usr/lib/libSystem.dylib present?

Yes:


confetti:sage dcoudert$ ll /usr/lib/libSystem.dylib

lrwxr-xr-x  1 root  wheel  17 19 jul 08:15 /usr/lib/libSystem.dylib -> libSystem.B.dylib


 
If yes, then I guess this means a broken dependency of scipy, more
specifically, a broken dylib, built
along the way.
or Xcode that needs to be reinstalled...

Can you do
./sage --python
>> import numpy

without an error?

yes too:

confetti:sage dcoudert$ ./sage --python

Python 3.7.3 (default, Oct 13 2019, 02:06:13) 

[Clang 11.0.0 (clang-1100.0.33.8)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import numpy

>>> 


 

Dima Pasechnik

unread,
Oct 13, 2019, 7:29:21 AM10/13/19
to sage-devel
Is this a build from scratch?
(after an OS upgrade, incremental builds may break)
> --
> 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/848357f8-1c79-481a-abb3-e87331775d8a%40googlegroups.com.

David Coudert

unread,
Oct 13, 2019, 7:43:15 AM10/13/19
to sage-devel
it's an incremental build from 9.0.beta0.
I upgraded my OS in July after a system crash. So I had to reinstall everything from scratch.

In case, I have Xcode Version 11.1 (11A1027).
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.

Dima Pasechnik

unread,
Oct 13, 2019, 7:48:55 AM10/13/19
to sage-devel
I gather that the error comes from one of -ldfftpack -lfftpack -lgfortran
being incorrectly linked/broken.

please locate the relevant lib*.dylib files (in SAGE_LOCAL?) and run
"otool -L" on each of them
to see if they are OK.
> 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/752fcf51-af9a-4315-b62d-f15dab05f4ea%40googlegroups.com.

David Coudert

unread,
Oct 13, 2019, 8:01:26 AM10/13/19
to sage-devel


confetti:lib dcoudert$ pwd

/Users/dcoudert/sage3/sage/local/lib

confetti:lib dcoudert$ otool -L libgfortran.dylib 

libgfortran.dylib:

/Users/dcoudert/sage3/sage/local/lib/libgfortran.4.dylib (compatibility version 5.0.0, current version 5.0.0)

/Users/dcoudert/sage3/sage/local/lib/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)

/Users/dcoudert/sage3/sage/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)



but I don't have the 2 others

confetti:sage dcoudert$ ls -lR | grep ftpack | grep dylib

confetti:sage dcoudert$ pwd

/Users/dcoudert/sage3/sage

Dima Pasechnik

unread,
Oct 13, 2019, 9:18:14 AM10/13/19
to sage-devel
are you building gfortran in Sage, or using a prebuilt one?

it might be that its libgfortran got broken

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/0e66a999-c1d3-47e4-9ff6-2a929c4d820a%40googlegroups.com.

Dima Pasechnik

unread,
Oct 13, 2019, 9:19:54 AM10/13/19
to sage-devel
oops sorry, your gfortran is ok.
how about fflas* package, it is probably broken...

David Coudert

unread,
Oct 13, 2019, 9:21:29 AM10/13/19
to sage-...@googlegroups.com
confetti:lib dcoudert$ otool -L libfflas.dylib
libfflas.dylib:
/Users/dcoudert/sage3/sage/local/lib/libfflas.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/Users/dcoudert/sage3/sage/local/lib/libgivaro.9.dylib (compatibility version 11.0.0, current version 11.1.0)
/Users/dcoudert/sage3/sage/local/lib/libgmp.23.dylib (compatibility version 24.0.0, current version 24.3.0)
/Users/dcoudert/sage3/sage/local/lib/libgmpxx.8.dylib (compatibility version 13.0.0, current version 13.3.0)
/Users/dcoudert/sage3/sage/local/lib/libopenblas_haswellp-r0.3.6.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)

You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/TsdmX1ozkq0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq3RJZ8%2Bp4gqHUbDH2bfYYrNUqrdssxANzg4Ltbefzt-DA%40mail.gmail.com.

----
David Coudert
Equipe-Projet COATI
Centre de Recherche INRIA Sophia Antipolis - Méditerranée
Université Côte d’Azur, Inria, CNRS, I3S, France
http://www-sop.inria.fr/members/David.Coudert

Isuru Fernando

unread,
Oct 13, 2019, 10:47:18 AM10/13/19
to sage-devel
Hi,

This is a problem with gfortran using an incorrect linker.

Can you post the output of,

 /Users/dcoudert/sage3/sage/local/bin/gfortran -print-prog-name=ld

/Users/dcoudert/sage3/sage/local/bin/gfortran -v

Isuru

David Coudert

unread,
Oct 13, 2019, 11:14:15 AM10/13/19
to sage-...@googlegroups.com
here it is.

confetti:lib dcoudert$  /Users/dcoudert/sage3/sage/local/bin/gfortran -print-prog-name=ld
ld
confetti:lib dcoudert$  /Users/dcoudert/sage3/sage/local/bin/gfortran -v
Using built-in specs.
COLLECT_GCC=/Users/dcoudert/sage3/sage/local/bin/gfortran
COLLECT_LTO_WRAPPER=/Users/dcoudert/sage3/sage/local/libexec/gcc/x86_64-apple-darwin18.6.0/7.4.0/lto-wrapper
Target: x86_64-apple-darwin18.6.0
Configured with: ../src/configure --prefix=/Users/dcoudert/sage3/sage/local --with-local-prefix=/Users/dcoudert/sage3/sage/local --with-gmp=/Users/dcoudert/sage3/sage/local --with-mpfr=/Users/dcoudert/sage3/sage/local --with-mpc=/Users/dcoudert/sage3/sage/local --with-system-zlib --without-isl --disable-multilib --disable-nls --disable-libitm --with-build-config=bootstrap-debug --without-isl --without-cloog --with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk --disable-bootstrap --enable-languages=fortran  
Thread model: posix
gcc version 7.4.0 (GCC) 


Isuru Fernando

unread,
Oct 13, 2019, 11:16:38 AM10/13/19
to sage-devel
Hi,

Do you have the folder /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk ?

Isuru

David Coudert

unread,
Oct 13, 2019, 11:27:27 AM10/13/19
to sage-...@googlegroups.com
No, but MacOSX10.15.sdk

confetti:lib dcoudert$ ll /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk 
ls: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk: No such file or directory
confetti:lib dcoudert$ ll /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
total 0
drwxr-xr-x  4 root  wheel  128 12 sep 05:13 DriverKit19.0.sdk
drwxr-xr-x  8 root  wheel  256 12 sep 05:13 MacOSX.sdk
lrwxr-xr-x  1 root  wheel   10  8 oct 15:28 MacOSX10.15.sdk -> MacOSX.sdk


Isuru Fernando

unread,
Oct 13, 2019, 11:32:50 AM10/13/19
to sage-devel

Can you try downloading 10.14 SDK from https://github.com/phracker/MacOSX-SDKs/releases/download/10.14-beta4/MacOSX10.14.sdk.tar.xz extracting it inside `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk`

Isuru

David Coudert

unread,
Oct 13, 2019, 11:57:10 AM10/13/19
to sage-...@googlegroups.com
It’s working ! I can now complete compilation.

Thanks both of you for the help.

Now I have to remember to remove MacOSX10.14.sdk when it will no longer be needed, but when

David.

Dima Pasechnik

unread,
Oct 13, 2019, 2:24:50 PM10/13/19
to sage-devel
On Sun, Oct 13, 2019 at 4:57 PM David Coudert <david....@inria.fr> wrote:
>
> It’s working ! I can now complete compilation.
>
> Thanks both of you for the help.
>
> Now I have to remember to remove MacOSX10.14.sdk when it will no longer be needed, but when…



hmm, so does this mean that you didn't do a full rebuild of Sage after
OS upgrade?
Cause you are on 10.15 now, no?
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/E6B4C375-6C40-4F17-B3BD-BED2EA6E3C0E%40inria.fr.

David Coudert

unread,
Oct 13, 2019, 3:57:27 PM10/13/19
to sage-...@googlegroups.com

Le 13 oct. 2019 à 20:24, Dima Pasechnik <dim...@gmail.com> a écrit :

On Sun, Oct 13, 2019 at 4:57 PM David Coudert <david....@inria.fr> wrote:

It’s working ! I can now complete compilation.

Thanks both of you for the help.

Now I have to remember to remove MacOSX10.14.sdk when it will no longer be needed, but when…



hmm, so does this mean that you didn't do a full rebuild of Sage after
OS upgrade?
Cause you are on 10.15 now, no?

I had to reformat my hard drive, so I reinstalled / rebuilt everything from scratch, including Sagemath.
I’m currently with Mojave 10.14.6. 
However, I did an update Xcode 2-3 days ago (app store said I should update Xcode…) but didn’t do full rebuild. Should I ?

D.



Dima Pasechnik

unread,
Oct 13, 2019, 4:51:20 PM10/13/19
to sage-devel
On Sun, 13 Oct 2019, 20:57 David Coudert, <david....@inria.fr> wrote:


Le 13 oct. 2019 à 20:24, Dima Pasechnik <dim...@gmail.com> a écrit :

On Sun, Oct 13, 2019 at 4:57 PM David Coudert <david....@inria.fr> wrote:

It’s working ! I can now complete compilation.

Thanks both of you for the help.

Now I have to remember to remove MacOSX10.14.sdk when it will no longer be needed, but when…



hmm, so does this mean that you didn't do a full rebuild of Sage after
OS upgrade?
Cause you are on 10.15 now, no?

I had to reformat my hard drive, so I reinstalled / rebuilt everything from scratch, including Sagemath.
I’m currently with Mojave 10.14.6. 
However, I did an update Xcode 2-3 days ago (app store said I should update Xcode…) but didn’t do full rebuild. Should I ?

well, this upgrade did break gfortran.
I presume building gfortran from scratch does not need that Xcode hack by Isuru...
 

Volker Braun

unread,
Oct 13, 2019, 7:29:53 PM10/13/19
to sage-devel
I just tried the latest Xcode and gfortran fails to build for me, too...

David Coudert

unread,
Oct 14, 2019, 2:42:55 AM10/14/19
to sage-...@googlegroups.com
Since it’s cleaner, I tried, and after a make distclean and the removal of MacOSX10.14.sdk, I was able to build Sage !

Thanks,
David.


Le 14 oct. 2019 à 01:29, Volker Braun <vbrau...@gmail.com> a écrit :

I just tried the latest Xcode and gfortran fails to build for me, too...


--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/TsdmX1ozkq0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.

Dima Pasechnik

unread,
Oct 14, 2019, 2:59:37 AM10/14/19
to sage-devel
Thanks. Now the only conclusion we have about 10.15 that it's hard to
predict the outcome of
building Sage on it...
> 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/B00BF61D-FE6F-446B-8492-FEA072796D56%40inria.fr.
Reply all
Reply to author
Forward
0 new messages