Sage in Mac OSX 11.11 (El Capitan)

2,694 views
Skip to first unread message

Juan Luis Varona

unread,
Jul 13, 2015, 10:29:40 PM7/13/15
to sage-...@googlegroups.com
I have try to install sage (the current stable version 6.7) in Mac OSX 11.11 (El Capitan), public beta (the final version will be available after the summer).

I have tried with both
and
without success.

None of them can be used due to an error. I have not found any information about it in any sage page, so I report it.
This is the error message:

Last login: Tue Jul 14 02:29:58 on ttys001
AirTeXano:~ jvarona$ /Applications/sage/sage ; exit;
┌────────────────────────────────────────────────────────────────────┐
│ SageMath Version 6.7, Release Date: 2015-05-17                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
The Sage installation tree has moved
from /Users/buildslave-sage/slave/sage_git/build
  to /Applications/sage
Updating various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done updating paths.
Traceback (most recent call last):
  File "/Applications/sage/src/bin/sage-ipython", line 7, in <module>
    from sage.repl.interpreter import SageTerminalApp
  File "/Applications/sage/local/lib/python2.7/site-packages/sage/__init__.py", line 3, in <module>
    from sage.repl.ipython_extension import load_ipython_extension
  File "/Applications/sage/local/lib/python2.7/site-packages/sage/repl/ipython_extension.py", line 59, in <module>
    from IPython.core.magic import Magics, magics_class, line_magic
  File "/Applications/sage/local/lib/python2.7/site-packages/IPython/__init__.py", line 45, in <module>
    from .config.loader import Config
  File "/Applications/sage/local/lib/python2.7/site-packages/IPython/config/__init__.py", line 6, in <module>
    from .application import *
  File "/Applications/sage/local/lib/python2.7/site-packages/IPython/config/application.py", line 9, in <module>
    import json
  File "/Applications/sage/local/lib/python/json/__init__.py", line 108, in <module>
    from .decoder import JSONDecoder
  File "/Applications/sage/local/lib/python/json/decoder.py", line 5, in <module>
    import struct
  File "/Applications/sage/local/lib/python/struct.py", line 1, in <module>
    from _struct import *
ImportError: dlopen(/Applications/sage/local/lib/python2.7/lib-dynload/_struct.so, 2): Symbol not found: _PyUnicodeUCS4_AsEncodedString
  Referenced from: /Applications/sage/local/lib/python2.7/lib-dynload/_struct.so
  Expected in: flat namespace
 in /Applications/sage/local/lib/python2.7/lib-dynload/_struct.so
logout
Saving session...completed.

[Proceso completado]



Volker Braun

unread,
Jul 14, 2015, 3:42:13 AM7/14/15
to sage-...@googlegroups.com
Looks more like a bug in OSX's dynamic linker, but you could try to compile Sage from source if you are feeling adventurous.

Juan Luis Varona

unread,
Aug 5, 2015, 2:55:54 PM8/5/15
to sage-devel
Thanks for the answer. As suggested, I have tried to compile Sage 6.7 and 6.8 from source in Mac OS X 10.11 (El Capitan) public betas 1, 2 and 3, without success.

This is the final message of the process of compilation with sage 6.8 with Mac OS X 10.11 public beta 3:



------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Sage will now terminate.
------------------------------------------------------------------------
./sage: line 134: 97511 Segmentation fault: 11  "$SAGE_ROOT/src/bin/sage" "$@"
make[2]: *** [doc-html] Error 139
make[1]: *** [all] Error 2

real 1232m33.049s
user 542m41.316s
sys 61m2.591s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all'):

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

make: *** [all] Error 1

Volker Braun

unread,
Aug 5, 2015, 3:20:41 PM8/5/15
to sage-devel
Can you upload the entire log somewhere?

It seems that you made it to the documentation build, so ./sage should work (probably crashes but possibly with an informative error message)

Juan Luis Varona

unread,
Aug 5, 2015, 8:40:41 PM8/5/15
to sage-devel

Can you upload the entire log somewhere?


 

It seems that you made it to the documentation build, so ./sage should work (probably crashes but possibly with an informative error message)


Yes, ./sage crashes. I cannot copy and paste the error because I have deleted it and emptied the trash.

Now, I'm trying to compile sage-2.6 under osx 10.11 beta4, released yesterday. The process will finish tomorrow (I have already checked that 
sage-6.8-x86_64-Darwin-OSX_10.10_x86_64-app.dmg does not works with osx 10.11 beta4, so I suppose that again after compile form source)

Juan Luis Varona

unread,
Aug 7, 2015, 7:32:24 AM8/7/15
to sage-devel
I have tried to compile sage-6.8 (yesterday I wrote 2.6 instead of 6.8 by mistake) under osx 10.11 beta4, again without sucess.

This is the final error message:
----
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Sage will now terminate.
------------------------------------------------------------------------
./sage: line 134: 71464 Segmentation fault: 11  "$SAGE_ROOT/src/bin/sage" "$@"
make[2]: *** [doc-html] Error 139
make[1]: *** [all] Error 2

real 1584m1.633s
user 543m24.211s
sys 61m11.615s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all'):

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

make: *** [all] Error 1
----

The entire log file is here (a 22.9 MB file):

If I use ./sage, I get this message:
---
Last login: Thu Aug  6 01:32:40 on ttys000
AirTeXano:~ jvarona$ cd /Applications/sage-6.8 
AirTeXano:sage-6.8 jvarona$ ./sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath Version 6.8, Release Date: 2015-07-26                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
This looks like the first time you are running Sage.
Updating various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done updating paths.

**********************************************************************

Oops, Sage crashed. We do our best to make it stable, but...

A crash report was automatically generated with the following information:
  - A verbatim copy of the crash traceback.
  - A copy of your input history during this session.
  - Data on your current Sage configuration.

It was left in the file named:
'/Users/jvarona/.sage/ipython-3.2.0/Sage_crash_report.txt'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.

You can mail it to: sage-support at sage-s...@googlegroups.com
with the subject 'Sage Crash Report'.

If you want to do it now, the following command will work (under Unix):
mail -s 'Sage Crash Report' sage-s...@googlegroups.com < /Users/jvarona/.sage/ipython-3.2.0/Sage_crash_report.txt

To ensure accurate tracking of this issue, please file a report about it at:
---

And this is the Sage_crash_report.txt file (32 KB file):

Volker Braun

unread,
Aug 7, 2015, 7:36:48 AM8/7/15
to sage-devel
ImportError: dlopen(/Applications/sage-6.8/local/lib/python2.7/site-packages/sage/matrix/matrix_mpolynomial_dense.so, 2): Library not loaded: libsingular.dylib
  Referenced from: /Applications/sage-6.8/local/lib/python2.7/site-packages/sage/matrix/matrix_mpolynomial_dense.so
  Reason: image not found


do you have a libsingular.dylib?

Francois Bissey

unread,
Aug 7, 2015, 7:38:17 AM8/7/15
to sage-...@googlegroups.com
All right. Do you have a file named
/Applications/sage-6.8/local/lib/libsingular.dylib?

François
> --
> 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 post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

Juan Luis Varona

unread,
Aug 7, 2015, 7:43:18 AM8/7/15
to sage-...@googlegroups.com


> All right. Do you have a file named
> /Applications/sage-6.8/local/lib/libsingular.dylib?
>

Yes, it is a 8.7 MB file.

Yours,

Juan Luis

Francois Bissey

unread,
Aug 7, 2015, 7:49:41 AM8/7/15
to sage-...@googlegroups.com
And what does
“file /Applications/sage-6.8/local/lib/libsingular.dylib”
says?

François

Juan Luis Varona

unread,
Aug 7, 2015, 7:56:39 AM8/7/15
to sage-...@googlegroups.com
>
>
> And what does
> “file /Applications/sage-6.8/local/lib/libsingular.dylib”
> says?
>

Yes, sure:

cd /Applications/sage-6.8/local/lib

ls -l

. . .

-rwxr-xr-x 1 jvarona staff 8706256 6 ago 21:56 libsingular.dylib

. . .


Francois Bissey

unread,
Aug 7, 2015, 8:00:06 AM8/7/15
to sage-...@googlegroups.com
I asked for the output of the “file” command. But I am not expecting anything spectacular
because what I thought about initially should have broken at compilation time.

François

Juan Luis Varona

unread,
Aug 7, 2015, 8:04:24 AM8/7/15
to sage-...@googlegroups.com
>
>
> I asked for the output of the “file” command. But I am not expecting anything spectacular
> because what I thought about initially should have broken at compilation time.
>


Sorry, I was answering your previous message,

If I use

file /Applications/sage-6.8/local/lib/libsingular.dylib

I get

/Applications/sage-6.8/local/lib/libsingular.dylib: Mach-O 64-bit dynamically linked shared library x86_64

Juan Luis

> François
>
>> On 7/08/2015, at 23:56, Juan Luis Varona <juanlui...@gmail.com> wrote:
>>
>>>
>>>
>>> And what does
>>> “file /Applications/sage-6.8/local/lib/libsingular.dylib”
>>> says?
>>>
>>
>> Yes, sure:
>>
>> cd /Applications/sage-6.8/local/lib
>>
>> ls -l
>>
>> . . .
>>
>> -rwxr-xr-x 1 jvarona staff 8706256 6 ago 21:56 libsingular.dylib
>>
>> . . .
>>
>>
>> --
>> 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 post to this group, send email to sage-...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/sage-devel.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/OBv5x1v3_6M/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.

Volker Braun

unread,
Aug 7, 2015, 8:11:34 AM8/7/15
to sage-devel
Also, whats the output of 

sage -sh -c 'otool -L $SAGE_ROOT/local/lib/libsingular.dylib'
sage -sh -c 'otool -L $SAGE_ROOT/local/lib/python2.7/site-packages/sage/matrix/matrix_mpolynomial_dense.so'

Juan Luis Varona

unread,
Aug 7, 2015, 8:27:19 AM8/7/15
to sage-...@googlegroups.com
Also, whats the output of 

sage -sh -c 'otool -L $SAGE_ROOT/local/lib/libsingular.dylib’


Nothing (only >).



sage -sh -c 'otool -L $SAGE_ROOT/local/lib/python2.7/site-packages/sage/matrix/matrix_mpolynomial_dense.so'


./sage -sh -c 'otool -L $SAGE_ROOT/local/lib/python2.7/site-packages/sage/matrix/matrix_mpolynomial_dense.so’

/Applications/sage-6.8/local/lib/python2.7/site-packages/sage/matrix/matrix_mpolynomial_dense.so:
libsingular.dylib (compatibility version 0.0.0, current version 0.0.0)
/Applications/sage-6.8/local/lib/libntl.16.dylib (compatibility version 17.0.0, current version 17.0.0)
/Applications/sage-6.8/local/lib/libflint.dylib (compatibility version 0.0.0, current version 0.0.0)
/Applications/sage-6.8/local/lib/libgmp.16.dylib (compatibility version 17.0.0, current version 17.0.0)
/Applications/sage-6.8/local/lib/libgmpxx.8.dylib (compatibility version 9.0.0, current version 9.0.0)
/Applications/sage-6.8/local/lib/libreadline.6.dylib (compatibility version 6.0.0, current version 6.3.0)
/Applications/sage-6.8/local/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.20.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.0.0)
/Applications/sage-6.8/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)




Volker Braun

unread,
Aug 7, 2015, 6:22:30 PM8/7/15
to sage-devel
On Friday, August 7, 2015 at 2:27:19 PM UTC+2, Juan Luis Varona wrote:
sage -sh -c 'otool -L $SAGE_ROOT/local/lib/libsingular.dylib’

Your email client messed up the final backtick, it shoud be the same as all the other ones but you have a U+2019 there.

sage -sh -c 'otool -L $SAGE_ROOT/local/lib/libsingular.dylib'

Juan Luis Varona

unread,
Aug 7, 2015, 7:36:49 PM8/7/15
to sage-...@googlegroups.com

> El 8 ago 2015, a las 0:22, Volker Braun <vbrau...@gmail.com> escribió:
>
> sage -sh -c 'otool -L $SAGE_ROOT/local/lib/libsingular.dylib'

I’m not sure if this is what you want to check:

./sage -sh -c 'otool -L $SAGE_ROOT/local/lib/libsingular.dylib’

/Applications/sage-6.8/local/lib/libsingular.dylib:
libsingular.dylib (compatibility version 0.0.0, current version 0.0.0)
/Applications/sage-6.8/local/lib/libflint.dylib (compatibility version 0.0.0, current version 0.0.0)
/Applications/sage-6.8/local/lib/libmpfr.4.dylib (compatibility version 6.0.0, current version 6.2.0)
/Applications/sage-6.8/local/lib/libmpir.16.dylib (compatibility version 17.0.0, current version 17.0.0)
/Applications/sage-6.8/local/lib/libntl.16.dylib (compatibility version 17.0.0, current version 17.0.0)
/Applications/sage-6.8/local/lib/libreadline.6.dylib (compatibility version 6.0.0, current version 6.3.0)
/Applications/sage-6.8/local/lib/libgmp.16.dylib (compatibility version 17.0.0, current version 17.0.0)

Volker Braun

unread,
Aug 8, 2015, 5:58:30 AM8/8/15
to sage-devel
Looks like everything is linked correctly. The following suggests that there is a bug in DYLD_LIBRARY_PATH handling in the OSX 10.11 betas:


Possibly thats an intentional change of the spec to fix the (still unpatched on all released OSX versions) DYLD_PRINT_TO_FILE root exploit.

In any case, please file a bug with Apple to bring this to their attention (even if you wont' get any useful information from them)

Juan Luis Varona

unread,
Aug 8, 2015, 8:06:18 AM8/8/15
to sage-...@googlegroups.com
>
>
> Looks like everything is linked correctly. The following suggests that there is a bug in DYLD_LIBRARY_PATH handling in the OSX 10.11 betas:
>
> https://forums.developer.apple.com/message/31148
>
> Possibly thats an intentional change of the spec to fix the (still unpatched on all released OSX versions) DYLD_PRINT_TO_FILE root exploit.
>
> In any case, please file a bug with Apple to bring this to their attention (even if you wont' get any useful information from them)
>

Thanks. I have reported it to Apple using the Feedback Assistant for beta versions of macosx.

I will inform in this list if there are improvements in next betas of mac osx 10.11 (El Capitan).

Yours,

Juan Luis Varona

Juan Luis Varona

unread,
Aug 23, 2015, 5:56:38 AM8/23/15
to sage-devel
A few days ago, Apple released mac osx 10.11 (El Capitan) public beta5.

As in previous public betas, I can confirm that sage 6.8 does not work.

I have tried again to compile it and it gives similar errors.
The entire log file is here (a 22.9 MB file):

And this is what happens if you use ./sage:
------
Last login: Sat Aug 22 12:02:14 on ttys000
AirTeXano:~ jvarona$ /Applications/sage-6.8/sage ; exit;
┌────────────────────────────────────────────────────────────────────┐
│ SageMath Version 6.8, Release Date: 2015-07-26                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
This looks like the first time you are running Sage.
Updating various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done updating paths.

**********************************************************************

Oops, Sage crashed. We do our best to make it stable, but...

A crash report was automatically generated with the following information:
  - A verbatim copy of the crash traceback.
  - A copy of your input history during this session.
  - Data on your current Sage configuration.

It was left in the file named:
'/Users/jvarona/.sage/ipython-3.2.0/Sage_crash_report.txt'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.

You can mail it to: sage-support at sage-s...@googlegroups.com
with the subject 'Sage Crash Report'.

If you want to do it now, the following command will work (under Unix):
mail -s 'Sage Crash Report' sage-s...@googlegroups.com < /Users/jvarona/.sage/ipython-3.2.0/Sage_crash_report.txt

To ensure accurate tracking of this issue, please file a report about it at:

Hit <Enter> to quit (your terminal may close):
------

Yours,

Juan Luis Varona

Juan Luis Varona

unread,
Sep 10, 2015, 7:45:14 PM9/10/15
to sage-devel

Apple released macosx 10.11-"el capitan" (golden master) yesterday. It will be freely available for everybody in september 30.

I have tried with both
and
without success.

Also, compiling from sources generates errors, as with the betas of  macosx 10.11.

Then, it seems than sage cannot be used at all in macosx 10.11.

Perhaps somebody more expert than myself should worry about this. :-)

Yours,

Juan Luis Varona

John H Palmieri

unread,
Sep 10, 2015, 7:55:16 PM9/10/15
to sage-devel

In the past after new OS X releases, we have had to wait until a new version Xcode comes out, and sometimes for another version of Xcode that fixes the bugs in the first one. So I think we just wait for now.

--
John

Juan Luis Varona

unread,
Sep 10, 2015, 9:55:43 PM9/10/15
to sage-...@googlegroups.com
Dear sagefriends,

>
> In the past after new OS X releases, we have had to wait until a new version Xcode comes out, and sometimes for another version of Xcode that fixes the bugs in the first one. So I think we just wait for now.
>

This is true, usually it is necessary to wait for the new version of Xcode to be able to compile sage under the new versions of osx.
(Now, Command Line Tools OSX 10.11 is already available, but not the final version of the new XCode.)

But, usually, new versions of osx can execute already compiled versions of sage, and this does not happen this time. (I like to have always the last version of osx in one of my computers, and I do not remember this problem in the past.)

Yours,

Juan Luis





kcrisman

unread,
Sep 10, 2015, 10:24:59 PM9/10/15
to sage-devel
But, usually, new versions of osx can execute already compiled versions of sage, and this does not happen this time. (I like to have always the last version of osx in one of my computers, and I do not remember this problem in the past.)


Yes, good point.  Can you give us exactly what kind of problems you encounter with the 10.10 version on 10.11?  (If there are any message at all.) 

Juan Luis Varona

unread,
Sep 10, 2015, 10:40:11 PM9/10/15
to sage-...@googlegroups.com

> El 11 sept 2015, a las 4:24, kcrisman <kcri...@gmail.com> escribió:
>
> But, usually, new versions of osx can execute already compiled versions of sage, and this does not happen this time. (I like to have always the last version of osx in one of my computers, and I do not remember this problem in the past.)
>
>
> Yes, good point. Can you give us exactly what kind of problems you encounter with the 10.10 version on 10.11? (If there are any message at all.)
>

This is what appears in the Terminal using Sage-6.8.app (compiled for osx 10.10) under osx 10.11:

---------

Last login: Thu Sep 10 18:37:14 on ttys000
AirTeXano:~ jvarona$ '/Applications/Sage-6.8.app/Contents/Resources/sage'/sage --notebook
Traceback (most recent call last):
File "/Applications/Sage-6.8.app/Contents/Resources/sage/src/bin/sage-notebook", line 7, in <module>
import argparse
File "/Applications/Sage-6.8.app/Contents/Resources/sage/local/lib/python/argparse.py", line 85, in <module>
import collections as _collections
File "/Applications/Sage-6.8.app/Contents/Resources/sage/local/lib/python/collections.py", line 9, in <module>
from operator import itemgetter as _itemgetter, eq as _eq
ImportError: dlopen(/Applications/Sage-6.8.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so, 2): Symbol not found: __PyUnicodeUCS4_AsDefaultEncodedString
Referenced from: /Applications/Sage-6.8.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so
Expected in: flat namespace
in /Applications/Sage-6.8.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so
AirTeXano:~ jvarona$

————

Juan Luis


Francois Bissey

unread,
Sep 10, 2015, 10:48:25 PM9/10/15
to sage-...@googlegroups.com
Hum, that symbol is in libpython2.7.dylib, operator.so is not linked to that library.
I am guessing it is supposed to be dlopen-ed from python which would supply
the symbol. I suspect python will need patching.
Can you start python from a sage shell?

François

Juan Luis Varona

unread,
Sep 10, 2015, 10:55:32 PM9/10/15
to sage-...@googlegroups.com

>
> Hum, that symbol is in libpython2.7.dylib, operator.so is not linked to that library.
> I am guessing it is supposed to be dlopen-ed from python which would supply
> the symbol. I suspect python will need patching.
> Can you start python from a sage shell?
>

But sage shell closes, so I cannot use it.

If, in the menu of the .app, I use “Terminal Sesion >> Misc. >> python”, I obtain this in Terminal:

————

Last login: Fri Sep 11 04:51:46 on ttys001
/Applications/Sage-6.8.app/Contents/Resources/sage/sage --python; exit
AirTeXano:~ jvarona$ /Applications/Sage-6.8.app/Contents/Resources/sage/sage --python; exit
Python 2.7.9 (default, Jul 28 2015, 17:58:38)
[GCC 4.9.2] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

---------


Juan Luis

Volker Braun

unread,
Sep 11, 2015, 4:02:36 AM9/11/15
to sage-devel
Looks like Apple kept the new behavior of DYLD_* environment variables and they are not passed down to launched interpreters. Hence sooner or later we crash with symbol not found as libraries can't be located. Really we should have switched to rpaths years ago, this would have saved so much pain. Also would explain why homebrew and friends didn't trip over that. Don't know of any workaround on 10.11 besides sourcing sage-env whenever a subshell is launched.

Charles Bourloud

unread,
Sep 17, 2015, 11:32:29 AM9/17/15
to sage-devel
Same problem, nobody find a solution ? If yes, please can you tell me how !

Charles

Juan Luis Varona

unread,
Sep 18, 2015, 5:01:24 AM9/18/15
to sage-...@googlegroups.com
Actually, xcode 7 were released yesterday.

I can confirm that again sage 6.8 cannot be compiled in mac os x 10.11 with xcode 7.

Juan Luis
> 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/OBv5x1v3_6M/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.

John H Palmieri

unread,
Sep 18, 2015, 11:14:44 AM9/18/15
to sage-devel


On Friday, September 18, 2015 at 2:01:24 AM UTC-7, Juan Luis Varona wrote:
Actually, xcode 7 were released yesterday.

I can confirm that again sage 6.8 cannot be compiled in mac os x 10.11 with xcode 7.

Juan Luis

We are tracking build issues with Xcode 7 here: http://trac.sagemath.org/ticket/19232. I hope fixing those will fix the problems on OS X 10.11.

  John

John H Palmieri

unread,
Sep 25, 2015, 11:12:18 AM9/25/15
to sage-devel
Please try the latest Sage prerelease (6.9.rc0, available here: http://files.sagemath.org/devel/index.html) should build with Xcode 7, so I hope it builds with OS X 10.11.

  John

Juan Luis Varona

unread,
Sep 25, 2015, 2:46:48 PM9/25/15
to sage-...@googlegroups.com
I have downlodaded 6.9.rc0 and I my computer is now compiling with xcode 7 on osx 11.10.

I will inform at the end of the process,

Juan Luis

nirmal

unread,
Sep 25, 2015, 8:46:17 PM9/25/15
to sage-devel
I am looking forward to your update on how the process went. Thanks for your effort...

Juan Luis Varona

unread,
Sep 26, 2015, 5:50:15 AM9/26/15
to sage-...@googlegroups.com
Unfortunately, the compiling process of sage 6.9rc0 with xcode 7 under macosx 10.11 has finished with errors:

—————————————

------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Sage will now terminate.
------------------------------------------------------------------------
/Applications/sage-6.9.rc0/build/bin/sage-logger: line 32: 97809 Segmentation fault: 11 ./sage --docbuild --no-pdf-links all html
make[2]: *** [doc-html] Error 139
make[1]: *** [all] Error 2

real 673m6.573s
user 583m48.760s
sys 71m8.235s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all'):

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

make: *** [all] Error 1

—————————————

This is the complete log file (23 megas file):
https://dl.dropboxusercontent.com/u/8293746/log-compiling-sage69rc0-xcode7-macosx10.11.txt

And this is what I obtain executing sage:


┌────────────────────────────────────────────────────────────────────┐
│ SageMath Version 6.9.rc0, Release Date: 2015-09-25 │
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
This looks like the first time you are running Sage.
Updating various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done updating paths.

**********************************************************************

Oops, Sage crashed. We do our best to make it stable, but...

A crash report was automatically generated with the following information:
- A verbatim copy of the crash traceback.
- A copy of your input history during this session.
- Data on your current Sage configuration.

It was left in the file named:
'/Users/jvarona/.sage/ipython_genutils-0.1.0/Sage_crash_report.txt'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.

You can mail it to: sage-support at sage-s...@googlegroups.com
with the subject 'Sage Crash Report'.

If you want to do it now, the following command will work (under Unix):
mail -s 'Sage Crash Report' sage-s...@googlegroups.com < /Users/jvarona/.sage/ipython_genutils-0.1.0/Sage_crash_report.txt

Volker Braun

unread,
Sep 26, 2015, 6:18:21 AM9/26/15
to sage-devel
Post the Sage_crash_report.txt

Juan Luis Varona

unread,
Sep 26, 2015, 7:36:55 AM9/26/15
to sage-...@googlegroups.com

>
> Post the Sage_crash_report.txt
> (Sage 6.9rc0 with xcode 7 under macosx 10.11)
>

Here it is:

***************************************************************************

IPython post-mortem report

{'commit_hash': u'2f7c727',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/IPython',
'ipython_version': '4.0.0',
'os_name': 'posix',
'platform': 'Darwin-15.0.0-x86_64-i386-64bit',
'sys_executable': '/Applications/sage-6.9.rc0/local/bin/python',
'sys_platform': 'darwin',
'sys_version': '2.7.9 (default, Sep 26 2015, 01:38:56) \n[GCC 4.9.2]'}

***************************************************************************



***************************************************************************

Crash traceback:

---------------------------------------------------------------------------
---------------------------------------------------------------------------
ImportError Python 2.7.9: /Applications/sage-6.9.rc0/local/bin/python
Sat Sep 26 13:33:08 2015
A problem occurred executing Python code. Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/Applications/sage-6.9.rc0/src/bin/sage-ipython in <module>()
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 """
4 Sage IPython startup script.
5 """
6
7 # Install extra readline commands before IPython initialization
8 from sage.repl.readline_extra_commands import *
9
10 from sage.repl.interpreter import SageTerminalApp
11
12 app = SageTerminalApp.instance()
---> 13 app.initialize()
global app.initialize = <bound method SageTerminalApp.initialize of <sage.repl.interpreter.SageTerminalApp object at 0x103d9b510>>
14 app.start()

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, argv=None)

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/traitlets/config/application.pyc in catch_config_error(method=<function initialize>, app=<sage.repl.interpreter.SageTerminalApp object>, *args=(None,), **kwargs={})
60
61 #-----------------------------------------------------------------------------
62 # Application class
63 #-----------------------------------------------------------------------------
64
65 @decorator
66 def catch_config_error(method, app, *args, **kwargs):
67 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init.
68
69 On a TraitError (generally caused by bad config), this will print the trait's
70 message, and exit the app.
71
72 For use on init methods, to prevent invoking excepthook on invalid input.
73 """
74 try:
---> 75 return method(app, *args, **kwargs)
method = <function initialize at 0x104789de8>
app = <sage.repl.interpreter.SageTerminalApp object at 0x103d9b510>
args = (None,)
kwargs = {}
76 except (TraitError, ArgumentError) as e:
77 app.print_help()
78 app.log.fatal("Bad config encountered during initialization:")
79 app.log.fatal(str(e))
80 app.log.debug("Config at the time: %s", app.config)
81 app.exit(1)
82
83
84 class ApplicationError(Exception):
85 pass
86
87 class LevelFormatter(logging.Formatter):
88 """Formatter with additional `highlevel` record
89
90 This field is empty if log level is less than highlevel_limit,

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, argv=None)
299
300 return super(TerminalIPythonApp, self).parse_command_line(argv)
301
302 @catch_config_error
303 def initialize(self, argv=None):
304 """Do actions after construct, but before starting the app."""
305 super(TerminalIPythonApp, self).initialize(argv)
306 if self.subapp is not None:
307 # don't bother initializing further, starting subapp
308 return
309 # print self.extra_args
310 if self.extra_args and not self.something_to_run:
311 self.file_to_run = self.extra_args[0]
312 self.init_path()
313 # create the shell
--> 314 self.init_shell()
self.init_shell = <bound method SageTerminalApp.init_shell of <sage.repl.interpreter.SageTerminalApp object at 0x103d9b510>>
315 # and draw the banner
316 self.init_banner()
317 # Now a variety of things that happen after the banner is printed.
318 self.init_gui_pylab()
319 self.init_extensions()
320 self.init_code()
321
322 def init_shell(self):
323 """initialize the InteractiveShell instance"""
324 # Create an InteractiveShell instance.
325 # shell.display_banner should always be False for the terminal
326 # based app, because we call shell.show_banner() by hand below
327 # so the banner shows *before* all extension loading stuff.
328 self.shell = TerminalInteractiveShell.instance(parent=self,
329 display_banner=False, profile_dir=self.profile_dir,

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/repl/interpreter.pyc in init_shell(self=<sage.repl.interpreter.SageTerminalApp object>)
797 self.shell.has_sage_extensions = SAGE_EXTENSION in self.extensions
798
799 # Load the %lprun extension if available
800 try:
801 import line_profiler
802 except ImportError:
803 pass
804 else:
805 self.extensions.append('line_profiler')
806
807 if self.shell.has_sage_extensions:
808 self.extensions.remove(SAGE_EXTENSION)
809
810 # load sage extension here to get a crash if
811 # something is wrong with the sage library
--> 812 self.shell.extension_manager.load_extension(SAGE_EXTENSION)
self.shell.extension_manager.load_extension = <bound method ExtensionManager.load_extension of <IPython.core.extensions.ExtensionManager object at 0x104e22d90>>
global SAGE_EXTENSION = 'sage'
813
814

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self=<IPython.core.extensions.ExtensionManager object>, module_str='sage')
76
77 Returns the string "already loaded" if the extension is already loaded,
78 "no load function" if the module doesn't have a load_ipython_extension
79 function, or None if it succeeded.
80 """
81 if module_str in self.loaded:
82 return "already loaded"
83
84 from IPython.utils.syspathcontext import prepended_to_syspath
85
86 with self.shell.builtin_trap:
87 if module_str not in sys.modules:
88 with prepended_to_syspath(self.ipython_extension_dir):
89 __import__(module_str)
90 mod = sys.modules[module_str]
---> 91 if self._call_load_ipython_extension(mod):
self._call_load_ipython_extension = <bound method ExtensionManager._call_load_ipython_extension of <IPython.core.extensions.ExtensionManager object at 0x104e22d90>>
mod = <module 'sage' from '/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/__init__.pyc'>
92 self.loaded.add(module_str)
93 else:
94 return "no load function"
95
96 def unload_extension(self, module_str):
97 """Unload an IPython extension by its module name.
98
99 This function looks up the extension's name in ``sys.modules`` and
100 simply calls ``mod.unload_ipython_extension(self)``.
101
102 Returns the string "no unload function" if the extension doesn't define
103 a function to unload itself, "not loaded" if the extension isn't loaded,
104 otherwise None.
105 """
106 if module_str not in self.loaded:

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/IPython/core/extensions.pyc in _call_load_ipython_extension(self=<IPython.core.extensions.ExtensionManager object>, mod=<module 'sage' from '/Applications/sage-6.9.rc0/...l/lib/python2.7/site-packages/sage/__init__.pyc'>)
123 """
124 from IPython.utils.syspathcontext import prepended_to_syspath
125
126 if (module_str in self.loaded) and (module_str in sys.modules):
127 self.unload_extension(module_str)
128 mod = sys.modules[module_str]
129 with prepended_to_syspath(self.ipython_extension_dir):
130 reload(mod)
131 if self._call_load_ipython_extension(mod):
132 self.loaded.add(module_str)
133 else:
134 self.load_extension(module_str)
135
136 def _call_load_ipython_extension(self, mod):
137 if hasattr(mod, 'load_ipython_extension'):
--> 138 mod.load_ipython_extension(self.shell)
mod.load_ipython_extension = <function load_ipython_extension at 0x103d9f0c8>
self.shell = <sage.repl.interpreter.SageTerminalInteractiveShell object at 0x1047a79d0>
139 return True
140
141 def _call_unload_ipython_extension(self, mod):
142 if hasattr(mod, 'unload_ipython_extension'):
143 mod.unload_ipython_extension(self.shell)
144 return True
145
146 def install_extension(self, url, filename=None):
147 """Download and install an IPython extension.
148
149 If filename is given, the file will be so named (inside the extension
150 directory). Otherwise, the name from the URL will be used. The file must
151 have a .py or .zip extension; otherwise, a ValueError will be raised.
152
153 Returns the full path to the installed file.

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/__init__.pyc in load_ipython_extension(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell object>,))
1 __all__ = ['all']
2
3 # IPython calls this when starting up
4 def load_ipython_extension(*args):
5 import sage.repl.ipython_extension
----> 6 sage.repl.ipython_extension.load_ipython_extension(*args)
sage.repl.ipython_extension.load_ipython_extension = <function load_ipython_extension at 0x104e44488>
args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at 0x1047a79d0>,)

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in wrapper(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell object>,), **kwargs={})
452 ....: if work:
453 ....: return 'foo worked'
454 ....: raise RuntimeError("foo didn't work")
455 sage: foo(False)
456 Traceback (most recent call last):
457 ...
458 RuntimeError: foo didn't work
459 sage: foo(True)
460 'foo worked'
461 sage: foo(False)
462 sage: foo(True)
463 """
464 @wraps(func)
465 def wrapper(*args, **kwargs):
466 if not wrapper.has_run:
--> 467 result = func(*args, **kwargs)
result = undefined
global func = undefined
args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at 0x1047a79d0>,)
kwargs = {}
468 wrapper.has_run = True
469 return result
470 wrapper.has_run = False
471 return wrapper
472
473
474 @run_once
475 def load_ipython_extension(ip):
476 """
477 Load the extension in IPython.
478 """
479 # this modifies ip
480 SageCustomizations(shell=ip)

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in load_ipython_extension(ip=<sage.repl.interpreter.SageTerminalInteractiveShell object>)
465 def wrapper(*args, **kwargs):
466 if not wrapper.has_run:
467 result = func(*args, **kwargs)
468 wrapper.has_run = True
469 return result
470 wrapper.has_run = False
471 return wrapper
472
473
474 @run_once
475 def load_ipython_extension(ip):
476 """
477 Load the extension in IPython.
478 """
479 # this modifies ip
--> 480 SageCustomizations(shell=ip)
global SageCustomizations = <class 'sage.repl.ipython_extension.SageCustomizations'>
global shell = undefined
ip = <sage.repl.interpreter.SageTerminalInteractiveShell object at 0x1047a79d0>

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in __init__(self=<sage.repl.ipython_extension.SageCustomizations object>, shell=<sage.repl.interpreter.SageTerminalInteractiveShell object>)
334 self.shell.register_magics(self.auto_magics)
335
336 import sage.repl.display.formatter as formatter
337 self.shell.display_formatter.formatters['text/plain'] = (
338 formatter.SagePlainTextFormatter(config=shell.config))
339
340 import sage.misc.edit_module as edit_module
341 self.shell.set_hook('editor', edit_module.edit_devel)
342
343 self.init_inspector()
344 self.init_line_transforms()
345
346 import inputhook
347 inputhook.install()
348
--> 349 import sage.all # until sage's import hell is fixed
sage.all = undefined
350
351 self.shell.verbose_quit = True
352 self.set_quit_hook()
353
354 self.register_interface_magics()
355
356 if SAGE_IMPORTALL == 'yes':
357 self.init_environment()
358
359
360 def register_interface_magics(self):
361 """
362 Register magics for each of the Sage interfaces
363 """
364 from sage.misc.superseded import deprecation

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/all.py in <module>()
84 from sage.misc.all import * # takes a while
85 from sage.typeset.all import *
86 from sage.repl.all import *
87
88 from sage.misc.sh import sh
89
90 from sage.libs.all import *
91 from sage.data_structures.all import *
92 from sage.doctest.all import *
93 try:
94 from sage.dev.all import *
95 except ImportError:
96 pass # dev scripts are disabled
97
98 from sage.structure.all import *
---> 99 from sage.rings.all import *
global sage.rings.all = undefined
100 from sage.matrix.all import *
101
102 # This must come before Calculus -- it initializes the Pynac library.
103 import sage.symbolic.pynac
104
105 from sage.modules.all import *
106 from sage.monoids.all import *
107 from sage.algebras.all import *
108 from sage.modular.all import *
109 from sage.schemes.all import *
110 from sage.graphs.all import *
111 from sage.groups.all import *
112 from sage.databases.all import *
113 from sage.categories.all import *
114 from sage.sets.all import *

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/rings/all.pyc in <module>()
47
48 # Rational numbers
49 from rational_field import RationalField, QQ
50 from rational import Rational
51 Rationals = RationalField
52
53 # Integers modulo n.
54 from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod
55 from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod
56 Integers = IntegerModRing
57
58 # Finite fields
59 from finite_rings.all import *
60
61 # Number field
---> 62 from number_field.all import *
global number_field.all = undefined
63
64 # Function field
65 from function_field.all import *
66
67 # Finite residue fields
68 from finite_rings.residue_field import ResidueField
69
70 # p-adic field
71 from padics.all import *
72 from padics.padic_printing import _printer_defaults as padic_printing
73
74 # Semirings
75 from semirings.all import *
76
77 # Real numbers

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/rings/number_field/all.py in <module>()
1 from number_field import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField,
2 is_fundamental_discriminant)
3 from number_field_element import NumberFieldElement
4
5 from order import EquationOrder
6
----> 7 from totallyreal import enumerate_totallyreal_fields_prim
global totallyreal = undefined
global enumerate_totallyreal_fields_prim = undefined
8 from totallyreal_data import hermite_constant
9 from totallyreal_rel import enumerate_totallyreal_fields_all, enumerate_totallyreal_fields_rel
10
11 from unit_group import UnitGroup

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/rings/number_field/totallyreal_data.pxd in init sage.rings.number_field.totallyreal (/Applications/sage-6.9.rc0/src/build/cythonized/sage/rings/number_field/totallyreal.c:10979)()
1 cdef double eval_seq_as_poly(int *f, int n, double x)
2 cdef double newton(int *f, int *df, int n, double x0, double eps)
3 cdef void newton_in_intervals(int *f, int *df, int n, double *beta, double eps, double *rts)
4 cpdef lagrange_degree_3(int n, int an1, int an2, int an3)
5
6 cimport sage.rings.integer
7
8 cdef int eval_seq_as_poly_int(int *f, int n, int x)
9
10 cdef int easy_is_irreducible(int *a, int n)
11
---> 12 cdef class tr_data:
global cdef = undefined
global tr_data = undefined
13
14 cdef int n, k
15 cdef double B
16 cdef double b_lower, b_upper, gamma
17
18 cdef int *a
19 cdef int *amax
20 cdef double *beta
21 cdef int *gnk
22
23 cdef int *df
24
25 cdef void incr(self, int *f_out, int verbose, int haltk, int phc)
26

sage/rings/number_field/totallyreal_data.pyx in init sage.rings.number_field.totallyreal_data (/Applications/sage-6.9.rc0/src/build/cythonized/sage/rings/number_field/totallyreal_data.c:11695)()

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring_constructor.pyc in PolynomialRing(base_ring=Integer Ring, arg1='x', arg2=None, sparse=False, order='degrevlex', names=None, name='x', var_array=None, implementation=None)
450 arg2 = [str(x) for x in arg2]
451 if isinstance(arg2, (int, long, Integer)):
452 # 3. PolynomialRing(base_ring, names, n, order='degrevlex'):
453 if not isinstance(arg1, (list, tuple, str)):
454 raise TypeError("You *must* specify the names of the variables.")
455 n = int(arg2)
456 names = arg1
457 R = _multi_variate(base_ring, names, n, sparse, order, implementation)
458
459 elif isinstance(arg1, str) or (isinstance(arg1, (list,tuple)) and len(arg1) == 1):
460 if not ',' in arg1:
461 # 1. PolynomialRing(base_ring, name, sparse=False):
462 if not arg2 is None:
463 raise TypeError("if second arguments is a string with no commas, then there must be no other non-optional arguments")
464 name = arg1
--> 465 R = _single_variate(base_ring, name, sparse, implementation)
R = None
global _single_variate = <function _single_variate at 0x1092b38c0>
base_ring = Integer Ring
name = 'x'
sparse = False
implementation = None
466 else:
467 # 2-4. PolynomialRing(base_ring, names, order='degrevlex'):
468 if not arg2 is None:
469 raise TypeError("invalid input to PolynomialRing function; please see the docstring for that function")
470 names = arg1.split(',')
471 n = len(names)
472 R = _multi_variate(base_ring, names, n, sparse, order, implementation)
473 elif isinstance(arg1, (list, tuple)):
474 # PolynomialRing(base_ring, names (list or tuple), order='degrevlex'):
475 names = arg1
476 n = len(names)
477 R = _multi_variate(base_ring, names, n, sparse, order, implementation)
478
479 if arg1 is None and arg2 is None:
480 raise TypeError("you *must* specify the indeterminates (as not None).")

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring_constructor.pyc in _single_variate(base_ring=Integer Ring, name=('x',), sparse=False, implementation=None)
524 R = m.PolynomialRing_dense_padic_field_capped_relative(base_ring, name)
525
526 elif isinstance(base_ring, padic_base_leaves.pAdicRingCappedRelative):
527 R = m.PolynomialRing_dense_padic_ring_capped_relative(base_ring, name)
528
529 elif isinstance(base_ring, padic_base_leaves.pAdicRingCappedAbsolute):
530 R = m.PolynomialRing_dense_padic_ring_capped_absolute(base_ring, name)
531
532 elif isinstance(base_ring, padic_base_leaves.pAdicRingFixedMod):
533 R = m.PolynomialRing_dense_padic_ring_fixed_mod(base_ring, name)
534
535 elif base_ring.is_field(proof = False):
536 R = m.PolynomialRing_field(base_ring, name, sparse)
537
538 elif base_ring.is_integral_domain(proof = False):
--> 539 R = m.PolynomialRing_integral_domain(base_ring, name, sparse, implementation)
R = None
m.PolynomialRing_integral_domain = <class 'sage.rings.polynomial.polynomial_ring.PolynomialRing_integral_domain'>
base_ring = Integer Ring
name = ('x',)
sparse = False
implementation = None
540 else:
541 R = m.PolynomialRing_commutative(base_ring, name, sparse)
542 else:
543 R = m.PolynomialRing_general(base_ring, name, sparse)
544
545 if hasattr(R, '_implementation_names'):
546 for name in R._implementation_names:
547 real_key = key[0:3] + (name,)
548 _save_in_cache(real_key, R)
549 else:
550 _save_in_cache(key, R)
551 return R
552
553 def _multi_variate(base_ring, names, n, sparse, order, implementation):
554 # if not sparse:

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring.pyc in __init__(self=Univariate Polynomial Ring in x over Integer Ring, base_ring=Integer Ring, name=('x',), sparse=False, implementation=None, element_class=<type 'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint'>)
1530 if is_IntegerRing(base_ring) and not sparse:
1531 if implementation == 'NTL':
1532 from sage.rings.polynomial.polynomial_integer_dense_ntl \
1533 import Polynomial_integer_dense_ntl
1534 element_class = Polynomial_integer_dense_ntl
1535 self._implementation_names = ('NTL',)
1536 self._implementation_repr = ' (using NTL)'
1537 elif implementation == 'FLINT' or implementation is None:
1538 from sage.rings.polynomial.polynomial_integer_dense_flint \
1539 import Polynomial_integer_dense_flint
1540 element_class = Polynomial_integer_dense_flint
1541 self._implementation_names = (None, 'FLINT')
1542 else:
1543 raise ValueError("Unknown implementation %s for ZZ[x]"%implementation)
1544 PolynomialRing_commutative.__init__(self, base_ring, name=name,
-> 1545 sparse=sparse, element_class=element_class)
sparse = False
element_class = <type 'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint'>
1546
1547 def _repr_(self):
1548 """
1549 TESTS::
1550
1551 sage: from sage.rings.polynomial.polynomial_ring import PolynomialRing_integral_domain as PRing
1552 sage: R = PRing(ZZ, 'x', implementation='NTL'); R
1553 Univariate Polynomial Ring in x over Integer Ring (using NTL)
1554 """
1555 s = PolynomialRing_commutative._repr_(self)
1556 return s + self._implementation_repr
1557
1558
1559 class PolynomialRing_field(PolynomialRing_integral_domain,
1560 PolynomialRing_singular_repr,

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring.pyc in __init__(self=Univariate Polynomial Ring in x over Integer Ring, base_ring=Integer Ring, name=('x',), sparse=False, element_class=<type 'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint'>, category=Join of Category of unique factorization domains... (euclidean domains and infinite enumerated sets))
1437 if max_degree is not None and of_degree is None:
1438 return self._monics_max( max_degree )
1439 raise ValueError("you should pass exactly one of of_degree and max_degree")
1440
1441 class PolynomialRing_commutative(PolynomialRing_general, commutative_algebra.CommutativeAlgebra):
1442 """
1443 Univariate polynomial ring over a commutative ring.
1444 """
1445 def __init__(self, base_ring, name=None, sparse=False, element_class=None, category=None):
1446 if base_ring not in _CommutativeRings:
1447 raise TypeError("Base ring %s must be a commutative ring."%repr(base_ring))
1448 # We trust that, if a category is given, that it is useful.
1449 if category is None:
1450 category = polynomial_default_category(base_ring.category(),False)
1451 PolynomialRing_general.__init__(self, base_ring, name=name,
-> 1452 sparse=sparse, element_class=element_class, category=category)
sparse = False
element_class = <type 'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint'>
category = Join of Category of unique factorization domains and Category of commutative algebras over (euclidean domains and infinite enumerated sets)
1453
1454 def quotient_by_principal_ideal(self, f, names=None):
1455 """
1456 Return the quotient of this polynomial ring by the principal
1457 ideal (generated by) `f`.
1458
1459 INPUT:
1460
1461 - ``f`` - either a polynomial in ``self``, or a principal
1462 ideal of ``self``.
1463
1464 EXAMPLES::
1465
1466 sage: R.<x> = QQ[]
1467 sage: I = (x^2-1)*R

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring.pyc in __init__(self=Univariate Polynomial Ring in x over Integer Ring, base_ring=Integer Ring, name=('x',), sparse=False, element_class=<type 'sage.rings.polynomial.polynomial_integer_dense_flint.Polynomial_integer_dense_flint'>, category=Join of Category of unique factorization domains... (euclidean domains and infinite enumerated sets))
291 self._has_singular = False
292 # Algebra.__init__ also calls __init_extra__ of Algebras(...).parent_class, which
293 # tries to provide a conversion from the base ring, if it does not exist.
294 # This is for algebras that only do the generic stuff in their initialisation.
295 # But the attribute _no_generic_basering_coercion prevents that from happening,
296 # since we want to use PolynomialBaseringInjection.
297 sage.algebras.algebra.Algebra.__init__(self, base_ring, names=name, normalize=True, category=category)
298 self.__generator = self._polynomial_class(self, [0,1], is_gen=True)
299 self._populate_coercion_lists_(
300 #coerce_list = [base_inject],
301 #convert_list = [list, base_inject],
302 convert_method_name = '_polynomial_')
303 if is_PolynomialRing(base_ring):
304 self._Karatsuba_threshold = 0
305 else:
--> 306 from sage.matrix.matrix_space import is_MatrixSpace
global sage.matrix.matrix_space = undefined
is_MatrixSpace = undefined
307 if is_MatrixSpace(base_ring):
308 self._Karatsuba_threshold = 0
309 else:
310 self._Karatsuba_threshold = 8
311
312 def __reduce__(self):
313 import sage.rings.polynomial.polynomial_ring_constructor
314 return (sage.rings.polynomial.polynomial_ring_constructor.PolynomialRing,
315 (self.base_ring(), self.variable_name(), None, self.is_sparse()))
316
317
318 def _element_constructor_(self, x=None, check=True, is_gen = False, construct=False, **kwds):
319 r"""
320 Convert ``x`` into this univariate polynomial ring,
321 possibly non-canonically.

/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/matrix/matrix_space.pyc in <module>()
42 import matrix
43 import matrix_generic_dense
44 import matrix_generic_sparse
45
46 import matrix_modn_sparse
47
48 import matrix_mod2_dense
49 import matrix_gf2e_dense
50
51 import matrix_integer_dense
52 import matrix_integer_sparse
53
54 import matrix_rational_dense
55 import matrix_rational_sparse
56
---> 57 import matrix_mpolynomial_dense
global matrix_mpolynomial_dense = undefined
58
59
60 # Sage imports
61 from sage.misc.superseded import deprecation
62 import sage.structure.coerce
63 import sage.structure.parent_gens as parent_gens
64 from sage.structure.unique_representation import UniqueRepresentation
65 import sage.rings.integer as integer
66 import sage.rings.number_field.all
67 import sage.rings.finite_rings.integer_mod_ring
68 import sage.rings.finite_rings.constructor
69 import sage.rings.polynomial.multi_polynomial_ring_generic
70 import sage.misc.latex as latex
71 import sage.modules.free_module
72 from sage.structure.sequence import Sequence

ImportError: dlopen(/Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/matrix/matrix_mpolynomial_dense.so, 2): Library not loaded: libsingular.dylib
Referenced from: /Applications/sage-6.9.rc0/local/lib/python2.7/site-packages/sage/matrix/matrix_mpolynomial_dense.so
Reason: image not found

***************************************************************************

History of session input:
*** Last line of input (may not be in above history):

Thomas Kahle

unread,
Oct 1, 2015, 10:25:00 AM10/1/15
to sage-devel
This is probably going to escalate with the public release of El Capitan. I upgraded, and I have no local sage anymore. What can we do?  I don't want to use sage math cloud, at least not always.

Hal Snyder

unread,
Oct 1, 2015, 10:39:51 AM10/1/15
to sage-devel


On Friday, September 11, 2015 at 3:02:36 AM UTC-5, Volker Braun wrote:
Looks like Apple kept the new behavior of DYLD_* environment variables and they are not passed down to launched interpreters. Hence sooner or later we crash with symbol not found as libraries can't be located. Really we should have switched to rpaths years ago, this would have saved so much pain. Also would explain why homebrew and friends didn't trip over that. Don't know of any workaround on 10.11 besides sourcing sage-env whenever a subshell is launched.


What's involved in switching to rpaths? What would be the main advantages?
 

...

Dima Pasechnik

unread,
Oct 1, 2015, 2:51:04 PM10/1/15
to sage-devel
in a nutshell, rpaths are relative paths, telling the linker to search for extra dependencies,
written into library/executives binaries, and allow you
to avoid  depending on the execution environment; apparently it's very easy to create on 
Linux, but not so on OSX, where you need to jump some hoops.
People wrote tools to fix the latter, such as

Thus, it would mean no more runtime linking to a wrong library due to wrong (DY)LD_LIBRARY_PATH
and the latter doesn't work (at all?) on OSX11, as far as I understand.

Dima
 
 

...

Fredrik Strömberg

unread,
Oct 2, 2015, 5:00:23 AM10/2/15
to sage-devel
After upgrading to El Capitan yesterday my sage ( v6.8 compiled from source) stopped working and I figured out that  DYLD_LIBRARY_PATH and LD_LIBRARY_PATH are no longer supported by default due to SIP (system integrity protection) and rootless which are no turned on by default.
After disabling rootless (boot into recovery mode with CMD+R and run 'csrutil disable' from command line) everything works for me. 
You can try and see if this also works for the downloaded binary distributions.
As a temporary measure this might be ok but in the long run something probably have to change with the install process, e.g. rpaths as suggested by others.

Fredrik

moep

unread,
Oct 2, 2015, 6:15:25 AM10/2/15
to sage-devel
Thanks for the post!

Do you know if "disabling rootless" changes anything else for the daily use?

David Roe

unread,
Oct 2, 2015, 6:22:02 AM10/2/15
to sage-devel
My impression is that it's a new security feature for 10.11, preventing any programs (even ones that have root privileges) from writing to certain system folders.  So as long as you don't run into any such malware, disabling rootless should have no effect on you.  :-)
David

Dima Pasechnik

unread,
Oct 2, 2015, 11:36:07 AM10/2/15
to sage-devel
this would also mean that the Cygwin port will have to stay with LD_LIBRARY_PATH, as rpath
is not supported on Cygwin.


 
Dima
 
 

...

Mike Zabrocki

unread,
Oct 2, 2015, 11:04:07 PM10/2/15
to sage-devel
Hi, Let me pile on and explain my experience and how you have already fixed my problem.

I upgraded to Mac OS 10.11 this afternoon.  I tried running sage -b and found the following error:

-bash:/Applications/sage/src/sage $ sage -b
python -u setup.py install
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    import os, sys, time, errno, platform, subprocess, glob
  File "/Applications/sage/local/lib/python/subprocess.py", line 430, in <module>
    import pickle
  File "/Applications/sage/local/lib/python/pickle.py", line 34, in <module>
    import struct
  File "/Applications/sage/local/lib/python/struct.py", line 1, in <module>
    from _struct import *
ImportError: dlopen(/Applications/sage/local/lib/python2.7/lib-dynload/_struct.so, 2): Symbol not found: _PyUnicodeUCS4_AsEncodedString
  Referenced from: /Applications/sage/local/lib/python2.7/lib-dynload/_struct.so
  Expected in: flat namespace
 in /Applications/sage/local/lib/python2.7/lib-dynload/_struct.so
make: *** [sage] Error 1

I followed the advice to reboot with command-R and ran the 'csrutil disable' command in the terminal window.  Next time I tried it worked.

Thanks!

kcrisman

unread,
Oct 3, 2015, 4:49:03 AM10/3/15
to sage-devel

I upgraded to Mac OS 10.11 this afternoon.  I tried running sage -b and found the following error:

-bash:/Applications/sage/src/sage $ sage -b
python -u setup.py install
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    import os, sys, time, errno, platform, subprocess, glob
  File "/Applications/sage/local/lib/python/subprocess.py", line 430, in <module>
    import pickle
  File "/Applications/sage/local/lib/python/pickle.py", line 34, in <module>
    import struct
  File "/Applications/sage/local/lib/python/struct.py", line 1, in <module>
    from _struct import *
ImportError: dlopen(/Applications/sage/local/lib/python2.7/lib-dynload/_struct.so, 2): Symbol not found: _PyUnicodeUCS4_AsEncodedString
  Referenced from: /Applications/sage/local/lib/python2.7/lib-dynload/_struct.so
  Expected in: flat namespace
 in /Applications/sage/local/lib/python2.7/lib-dynload/_struct.so
make: *** [sage] Error 1

I followed the advice to reboot with command-R and ran the 'csrutil disable' command in the terminal window.  Next time I tried it worked.

Thanks!


Is that a sustainable solution for everyone?  (I assume not, e.g. those who only use the notebook.)  Also, some people may not have access to that command if their computer is locked down by an employer (or would this escape the notice?).

Maybe at the very least there should be a big warning on the download page to not use El Capitan (yet). 

Volker Braun

unread,
Oct 3, 2015, 4:56:21 AM10/3/15
to sage-devel
On Saturday, October 3, 2015 at 10:49:03 AM UTC+2, kcrisman wrote:
Is that a sustainable solution for everyone?

No its not, we can't go around telling people to disable Apple's system integrity protection.

Dima Pasechnik

unread,
Oct 3, 2015, 12:47:05 PM10/3/15
to sage-devel
OK, so let's talk about switching to rpath then. Is it basically just tweaking of parameters passed to gcc (as a linker)? Do autotools know about them?
Do we need extra tools (or convoluted calls to linker etc) on OSX? 
Can we keep the LD_*_PATH* functionality, to use it on Cygwin?


William Stein

unread,
Oct 3, 2015, 1:28:00 PM10/3/15
to sage-devel
Hi,

In the meantime, I think ASAP on the OS X binary download page we should:

(1) move the "Usage:" message to the top (it's *hidden* at the bottom
where nobody will ever see it).

(2) add that there is no way to run Sage on 10.11 except to either
disable Apple's system integrity protection, or use a virtual machine
running Linux.

When I searched around for info about "system integrity protection" I
hit numerous other software websites with similar warnings and
notices.

William
> --
> 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 post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



--
William (http://wstein.org)

Hal Snyder

unread,
Oct 3, 2015, 1:33:24 PM10/3/15
to sage-...@googlegroups.com
If switching to rpath starts up, it could be a great learning opportunity for those of us who want to ramp up on the Sage build system. It would be great if project wizards leave a trail for others to catch up & help with testing.

I have done sage builds on Mac over the last couple years & several times ran into time-consuming challenges.


--
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/OBv5x1v3_6M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages