sage build fail

104 views
Skip to first unread message

Holley Friedlander

unread,
Aug 7, 2019, 9:52:23 AM8/7/19
to sage-devel
I had an error building sage. The problem was with the package sagenb-1.1.2. I am attaching my log file. Here is what I believe to be the relevant portion. I am on OS v 10.12.6. I found another thread that suggested this may have something to do with Python 3, but I am not sure if it is the same issue and I did not understand the fix. I installed Command Line Tools as prerequisite to starting the build. Suggestions on how to resolve?

Exception occurred:
  File "sage/misc/lazy_import.pyx", line 218, in sage.misc.lazy_import.LazyImport._get_object (build/cythonized/sage/misc/lazy_import.c:2502)
    raise RuntimeError(f"resolving lazy import {self._name} during startup")
RuntimeError: resolving lazy import dumps during startup
The full traceback has been saved in /var/folders/r7/bx5nmhtx23bgx6lhgxlbfj3w0000gn/T/sphinx-err-3aMcJb.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[4]: *** [html] Error 2
********************************************************************************
Error building the documentation
********************************************************************************

real 0m7.502s
user 0m5.810s
sys 0m2.151s
************************************************************************
Error installing package sagenb-1.1.2
************************************************************************

sagenb-1.1.2.log

E. Madison Bray

unread,
Aug 7, 2019, 10:13:38 AM8/7/19
to sage-devel
Hello,

This happens in general because the sagenb package uses sage itself as
a dependency, so once the build process gets to installing sagenb
(specifically building its documentation) if something is wrong with
the *sage* build your build will fail here.

There have been many cases of this. Just to pick one at random:
https://trac.sagemath.org/ticket/26686

The question is what is wrong with your sage build. Try running

$ ./sage

directly. Because by the time the build process is installing sagenb,
the core sage library should already be built and working. If not, it
will crash, and you'll get a crash log (and hopefully a more useful
one, at 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/db4dd9c1-b83f-49d9-b80e-cd9d8b60f4cb%40googlegroups.com.

Holley Friedlander

unread,
Aug 7, 2019, 10:27:14 AM8/7/19
to sage-devel
Thank you. I tried the ./sage and this is the crash report (attached).
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.
Sage_crash_report.txt

Dima Pasechnik

unread,
Aug 7, 2019, 11:06:45 AM8/7/19
to sage-devel
So the sqlite module of Python2 was not built correctly, it seems. Please post
logs/pkgs/python2-2.7.15.p1.log
> 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/debf8df5-5e74-4cf7-8603-c657d4831c66%40googlegroups.com.

Holley Friedlander

unread,
Aug 7, 2019, 11:15:02 AM8/7/19
to sage-devel
Okay here it is. I had to compress it as it was too large to attach otherwise. 
python2-2.7.15.p1.log.zip

Dima Pasechnik

unread,
Aug 7, 2019, 1:14:18 PM8/7/19
to sage-devel
indeed, you will see in the log

ld: file not found: /usr/lib/system/libsystem_darwin.dylib for
architecture x86_64

which indicates that your Xcode installation is somewhat broken.
Internet says you'd need to run

sudo xcode-select -s /Library/Developer/CommandLineTools

to fix this. (YMMV, naturally...)
> 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/66441a0a-8176-480d-8b41-69914219f116%40googlegroups.com.

Holley Friedlander

unread,
Aug 7, 2019, 2:15:37 PM8/7/19
to sage-devel
Thank you. So I ran the line you suggested below. Is there a way to check it or should I retype "make" now? This is the warning from my original error message. Should I change this environment variable? How do I do this? Is it something I type after make? I apologize, I am new to this.

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.

Dima Pasechnik

unread,
Aug 7, 2019, 2:21:41 PM8/7/19
to sage-devel
On Wed, Aug 7, 2019 at 9:15 PM Holley Friedlander <holl...@gmail.com> wrote:
>
> Thank you. So I ran the line you suggested below. Is there a way to check it or should I retype "make" now? This is the warning from my original error message. Should I change this environment variable? How do I do this? Is it something I type after make? I apologize, I am new to this.

you can check if the fix did what it shoud do, i.e. installed
/usr/lib/system/libsystem_darwin.dylib

In the terminal, type

ls /usr/lib/system/libsystem_darwin.dylib

and check that it outputs the file name
Assuming it worked, to speed things up,
you need to rebuild python2 package, by e.g.

./sage -f python2

and then run

make
> 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/e80dc92f-35a7-4bf4-aa37-1ed01328d1ab%40googlegroups.com.

Holley Friedlander

unread,
Aug 7, 2019, 2:29:25 PM8/7/19
to sage-devel
I tried

ls /usr/lib/system/libsystem_darwin.dylib  

but I get the message "no such file or directory". Maybe I am looking in the wrong place? Thanks.

Dima Pasechnik

unread,
Aug 7, 2019, 2:54:47 PM8/7/19
to sage-devel
On Wed, Aug 7, 2019 at 9:29 PM Holley Friedlander <holl...@gmail.com> wrote:
>
> I tried
>
> ls /usr/lib/system/libsystem_darwin.dylib
>
> but I get the message "no such file or directory". Maybe I am looking in the wrong place? Thanks.

no, this means that this fix didn't work.

Perhaps you ought to reinstall/upgrade Command Line Tools for Xcode
or/and Xcode itself.
> 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/99b9970b-720b-406b-866f-91c321f99ecd%40googlegroups.com.

E. Madison Bray

unread,
Aug 9, 2019, 10:38:15 AM8/9/19
to sage-devel
On Wed, Aug 7, 2019 at 8:54 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Wed, Aug 7, 2019 at 9:29 PM Holley Friedlander <holl...@gmail.com> wrote:
> >
> > I tried
> >
> > ls /usr/lib/system/libsystem_darwin.dylib
> >
> > but I get the message "no such file or directory". Maybe I am looking in the wrong place? Thanks.
>
> no, this means that this fix didn't work.
>
> Perhaps you ought to reinstall/upgrade Command Line Tools for Xcode
> or/and Xcode itself.

Couldn't this be a reprise of https://trac.sagemath.org/ticket/27631 ?

That is, perhaps it should be assuming that /usr is the correct prefix
in which to search for libsystem_darwin.dylib, and it should be doing
some -isysroot stuff with sysconfig.get_config_var('Py_MACOS_SYSROOT')
like in your patch? It seems likely that sqlite would be affected by
this too, though for some reason we hadn't noticed?

Incidentally, Ned Deily's fix [1] for this has finally been merged as
of a few weeks ago, and has been backported [2] to Python 2.7.
Perhaps we should try swapping out your patch (not that I don't like
it!) for the now official fix...

[1] https://github.com/python/cpython/pull/13773
[2] https://github.com/python/cpython/pull/14256
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq0%2BPme4qQ3Dq5-HuPaHnNyZDcGmX1Cs3%3D9WuN81s%3DyngQ%40mail.gmail.com.

Holley Friedlander

unread,
Aug 12, 2019, 9:34:25 AM8/12/19
to sage-...@googlegroups.com
I did reinstall/update xcode and command line tools. I then ran ./sage -f python2 and make and I believe it's working correctly now. At least the ./sage appears to run normally and I was able to checkout a branch. Thanks for your help! 

E. Madison Bray

unread,
Aug 12, 2019, 10:01:17 AM8/12/19
to sage-devel
On Mon, Aug 12, 2019 at 3:34 PM Holley Friedlander <holl...@gmail.com> wrote:
>
> I did reinstall/update xcode and command line tools. I then ran ./sage -f python2 and make and I believe it's working correctly now. At least the ./sage appears to run normally and I was able to checkout a branch. Thanks for your help!

That's excellent news, thanks for the update.

That reminds me, there is still an open ticket to change the Python
build to fail early (and explicitly) if the sqlite3 module fails to
build for some reason:

https://trac.sagemath.org/ticket/27705
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAEH9wBJVjtP4kRsaO5eV5M%2BpjfBapcmq5ZtGU49%3DbFedQz%2BCmA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages