sagenb failed to build on 8.8.beta3

160 views
Skip to first unread message

Vincent Delecroix

unread,
Apr 21, 2019, 7:25:04 AM4/21/19
to sage-devel
Dear all,

Starting from scratch, I failed to build sagenb. More precisely,
it failed building its documentation with

Running Sphinx v1.8.5
making output directory...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 19 source files that are out of date
updating environment: 19 added, 0 changed, 0 removed
reading sources... [ 5%] index
reading sources... [ 10%] misc/introspect
reading sources... [ 15%] misc/misc

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:2495)
raise RuntimeError(f"resolving lazy import {self._name} during
startup")
RuntimeError: resolving lazy import dumps during startup

See also the more complete log in attachment.

Vincent
sagenb-1.1.2.log.gz

Vincent Delecroix

unread,
Apr 21, 2019, 8:26:48 AM4/21/19
to sage-devel
It appears to be a problem with my setup.

I had some Python libraries in my $HOME/.sage/local
that made interference with the sage installation.

Vincent

Vincent Delecroix

unread,
Apr 21, 2019, 10:13:04 AM4/21/19
to sage-devel
Ignore the second e-mail: the error occurred again compiling
from scratch.

Dima Pasechnik

unread,
Apr 21, 2019, 10:26:03 AM4/21/19
to sage-devel
this error is an indication of an earlier build error. Try starting sage.

--
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Vincent Delecroix

unread,
Apr 21, 2019, 10:30:49 AM4/21/19
to sage-...@googlegroups.com
Indeed, sage did not start... After fixing it, sagenb installs.

The error message is really confusing.

Colby Kelln

unread,
May 28, 2019, 8:12:40 PM5/28/19
to sage-devel
Hi, 

I'm receiving a similar error message. What exactly did you do to fix the problem? 

Thanks

Dima Pasechnik

unread,
May 29, 2019, 3:43:35 AM5/29/19
to sage-devel
On Wed, May 29, 2019 at 2:12 AM Colby Kelln <cke...@umich.edu> wrote:
>
> Hi,
>
> I'm receiving a similar error message. What exactly did you do to fix the problem?

it depends - try starting sage, and post the error message (and
probably the relevant logs, too) here.

I wonder whether changing the way sagenb dependencies are dealt with
might make this error handling more robust.
> 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 https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/85ea0bea-c855-47fa-b82e-f21d2594cd95%40googlegroups.com.

Colby Kelln

unread,
May 29, 2019, 11:39:05 PM5/29/19
to sage-devel
The error message reads: 

Error installing package sagenb-1.1.2


So I've attached the sagenb-1.1.2 log file. 
If it's relevant, the output also reads:

RuntimeError: resolving lazy import dumps during startup


These errors occur just when building sage. I also attempted to run sage to see if that gave more info and I attached the crash report. Thanks, again. 

Sage_crash_report.txt
sagenb-1.1.2.log

Dima Pasechnik

unread,
May 30, 2019, 4:44:18 AM5/30/19
to sage-devel
Thanks. sagenb is a package that depends on sage, and sage should better be in working order at the moment it is built. 

the error message in the log indicates that perhaps libgd, another package, has not been built correctly.
Could you post log of it, logs/pkgs/libgd*.log ?

thanks.

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 https://groups.google.com/group/sage-devel.

Colby Kelln

unread,
May 30, 2019, 1:51:27 PM5/30/19
to sage-devel
I'm nearly certain this is the file you asked for; if not, let me know. I appreciate your help. 
libgd-2.1.1.1.p1.log

Dima Pasechnik

unread,
May 30, 2019, 3:47:46 PM5/30/19
to sage-devel
Thanks, this looks in order. Could you please post the output of

otool -L local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so

I suspect it is linked to a "wrong" libgd.
> 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 https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/48d2af02-be02-409f-a640-28e85c3ffa1f%40googlegroups.com.

Colby Kelln

unread,
May 30, 2019, 5:15:04 PM5/30/19
to sage-devel

$ otool -L local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so

local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so:

/Users/Colby/Documents/Math/ICERM2019/sage_stuff/local/lib/libgmp.23.dylib (compatibility version 24.0.0, current version 24.3.0)

/Users/Colby/Documents/Math/ICERM2019/sage_stuff/local/lib/libm4ri-0.0.20140914.dylib (compatibility version 0.0.0, current version 0.0.0)

/Users/Colby/Documents/Math/ICERM2019/sage_stuff/local/lib/libgd.3.dylib (compatibility version 4.0.0, current version 4.0.0)

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

/Users/Colby/Documents/Math/ICERM2019/sage_stuff/local/lib/libpari-gmp.dylib (compatibility version 2.11.0, current version 2.11.1)

Dima Pasechnik

unread,
May 30, 2019, 5:34:46 PM5/30/19
to sage-devel
hmm, this looks OK too.
What is the output of

otool -L local/lib/libgd.3.dylib

Thanks.
> 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 https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/5ea2915e-dbda-4a22-aba5-5ff6eb15b953%40googlegroups.com.

Colby Kelln

unread,
May 30, 2019, 5:49:32 PM5/30/19
to sage-devel

$ otool -L local/lib/libgd.3.dylib 

local/lib/libgd.3.dylib:

/Users/Colby/Documents/Math/ICERM2019/sage_stuff/local/lib/libgd.3.dylib (compatibility version 4.0.0, current version 4.0.0)

/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)

/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)

/Users/Colby/Documents/Math/ICERM2019/sage_stuff/local/lib/libfreetype.6.dylib (compatibility version 23.0.0, current version 23.1.0)

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


Dima Pasechnik

unread,
May 30, 2019, 6:02:47 PM5/30/19
to sage-devel
OK, in your log of libgd I see

** Configuration summary for libgd ..:

....
Support for PNG library: no
...

whereas it must have been yes.

And the output of

$ otool -L local/lib/libgd.3.dylib

confirms that libpng was not linked to libgd. This is the cause of the error.
We should fix it. I've opened https://trac.sagemath.org/ticket/27901

Could you please post the log for libpng
logs/pkgs/libpng*.log ?

You have not mentioned the exact version of Sage you are trying to build.
What is it? 8.7? A recent beta?
(please post the config.log from the Sage's main directory)

Thanks.

Colby Kelln

unread,
May 30, 2019, 6:14:06 PM5/30/19
to sage-devel
I do not have a libpng*.log file. What does this indicate? 

I've attached my config.log which says 8.8.beta6. 

Thanks again for your help. 
config.log

Dima Pasechnik

unread,
May 31, 2019, 4:16:59 AM5/31/19
to sage-devel
On Thu, May 30, 2019 at 11:14 PM Colby Kelln <cke...@umich.edu> wrote:
>
> I do not have a libpng*.log file. What does this indicate?

this, as well as your config.log, says that a good libpng was found on
your system, but
for some reason libgd was not able to find it.

I presume that it was found in an installation of MacPorts, or
Homebrew, or Anaconda,
or some other similar pseudo-distribution like this.
Youl also appear to have gfortran installed there.

Please provide this information to us (while none of these are
officially supported, I was able to build Sage with
Homebrew packages). I guess you have Homebrew, just from the value of
PATH you have in config.log


What is the output of

$ pkg-config --libs libpng
$ pkg-config --cflags libpng

(in case you have pkg-config installed)
if you run Homebrew, I'd recommend you install pkg-config.

Thanks. I appreciate your patience.
We really should get Homebrew better supported, with official
instructions on what needs to be installed to build Sage...

----------------------------

PS. In case you just want to install Sage quickly, you could install
Sage's libpng:
./sage -i libpng libgd

followed up by

make

HTH
Dima
> 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 https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/0ebdee8b-b7a0-413b-ba2c-6c29e3bab0a5%40googlegroups.com.

E. Madison Bray

unread,
May 31, 2019, 7:54:13 AM5/31/19
to sage-devel
On Wed, May 29, 2019 at 2:12 AM Colby Kelln <cke...@umich.edu> wrote:
>
> Hi,
>
> I'm receiving a similar error message. What exactly did you do to fix the problem?
>
> Thanks

FWIW I also experienced this problem upon updating to 8.8.beta7 on
Cygwin. Possibly for unrelated reasons. Will investigate though.
> 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 https://groups.google.com/group/sage-devel.

Dima Pasechnik

unread,
May 31, 2019, 8:22:01 AM5/31/19
to sage-devel
On Fri, May 31, 2019 at 12:54 PM E. Madison Bray <erik....@gmail.com> wrote:
>
> On Wed, May 29, 2019 at 2:12 AM Colby Kelln <cke...@umich.edu> wrote:
> >
> > Hi,
> >
> > I'm receiving a similar error message. What exactly did you do to fix the problem?
> >
> > Thanks
>
> FWIW I also experienced this problem upon updating to 8.8.beta7 on
> Cygwin. Possibly for unrelated reasons. Will investigate though.

the underlying reason for this error is that $(SAGERUNTIME) (in all
the cases I saw it was broken sagelib), which is a dependency of
sagenb,
is broken at the time sagenb is building.

SAGERUNTIME should depend on sage-starts
(and this probably is not hard to fix in the main Makefile)
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAOTD34Zw48dMEZ3w%3DwiQgRZwkMaBhikU71H-ihOsh%3DC%3DJXWOxw%40mail.gmail.com.

E. Madison Bray

unread,
May 31, 2019, 8:47:27 AM5/31/19
to sage-devel
On Fri, May 31, 2019 at 2:22 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Fri, May 31, 2019 at 12:54 PM E. Madison Bray <erik....@gmail.com> wrote:
> >
> > On Wed, May 29, 2019 at 2:12 AM Colby Kelln <cke...@umich.edu> wrote:
> > >
> > > Hi,
> > >
> > > I'm receiving a similar error message. What exactly did you do to fix the problem?
> > >
> > > Thanks
> >
> > FWIW I also experienced this problem upon updating to 8.8.beta7 on
> > Cygwin. Possibly for unrelated reasons. Will investigate though.
>
> the underlying reason for this error is that $(SAGERUNTIME) (in all
> the cases I saw it was broken sagelib), which is a dependency of
> sagenb,
> is broken at the time sagenb is building.
>
> SAGERUNTIME should depend on sage-starts
> (and this probably is not hard to fix in the main Makefile)

Yes, I suppose. But that's less interesting: The problem is why is
Sage failing to start? In my case it's because the DLL for
sage.matrix.matrix_mod2_dense cannot be loaded, either due to a
missing dependency or some DLL incompatibility hell. It's hard to be
certain why I'm just getting this *now* though upon upgrading from
8.8.beta6 (which worked, I think) to 8.8.beta7. I don't see that much
changed. maxima was upgraded as was gmpy2. That shouldn't have
broken loading of this DLL.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq12YRTSgj057YQSTMf06zy2d9WnWpsQ6nb4iPjS8E8MTw%40mail.gmail.com.

E. Madison Bray

unread,
May 31, 2019, 8:50:46 AM5/31/19
to sage-devel
On Fri, May 31, 2019 at 2:47 PM E. Madison Bray <erik....@gmail.com> wrote:
>
> On Fri, May 31, 2019 at 2:22 PM Dima Pasechnik <dim...@gmail.com> wrote:
> >
> > On Fri, May 31, 2019 at 12:54 PM E. Madison Bray <erik....@gmail.com> wrote:
> > >
> > > On Wed, May 29, 2019 at 2:12 AM Colby Kelln <cke...@umich.edu> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I'm receiving a similar error message. What exactly did you do to fix the problem?
> > > >
> > > > Thanks
> > >
> > > FWIW I also experienced this problem upon updating to 8.8.beta7 on
> > > Cygwin. Possibly for unrelated reasons. Will investigate though.
> >
> > the underlying reason for this error is that $(SAGERUNTIME) (in all
> > the cases I saw it was broken sagelib), which is a dependency of
> > sagenb,
> > is broken at the time sagenb is building.
> >
> > SAGERUNTIME should depend on sage-starts
> > (and this probably is not hard to fix in the main Makefile)
>
> Yes, I suppose. But that's less interesting: The problem is why is
> Sage failing to start? In my case it's because the DLL for
> sage.matrix.matrix_mod2_dense cannot be loaded, either due to a
> missing dependency or some DLL incompatibility hell. It's hard to be
> certain why I'm just getting this *now* though upon upgrading from
> 8.8.beta6 (which worked, I think) to 8.8.beta7. I don't see that much
> changed. maxima was upgraded as was gmpy2. That shouldn't have
> broken loading of this DLL.

Now, looking at Colby's sage crash log, it was also a problem loading
the same module (except on MacOS, so it's maybe not purely a Cygwin
problem). In her case she got: _gdImageCreateFromPng

Unfortunately Cygwin won't tell me why the DLL load failed exactly but
it could also be the same missing symbol. I'll have to check. Why
would there be a missing _gdImageCreateFromPng? I thought we didn't
change anything about libgd (yet, unless I'm missing something), and I
have the Sage SPKG for it installed currently.

Dima Pasechnik

unread,
May 31, 2019, 8:51:37 AM5/31/19
to sage-devel
For Colby, it's broken matrix_mod2_dense.so, due to libgd, which got
built without libpng.
A result of a failed attempt to use libpng from the "system" - I guess
Homebrew or a similar thing.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAOTD34ZOZx7aJGBH79rkzz5iC%3DgOedSfZoGNNLV6XmeFqVNtKA%40mail.gmail.com.

Dima Pasechnik

unread,
May 31, 2019, 8:53:18 AM5/31/19
to sage-devel
libd happily builds without libpng.
and this beta does allow from libpng to come from the system.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAOTD34ZE%3DdssTtrgFpJ_SdM0%3D8AY383NspTdyfHDM6gwnx5Tqw%40mail.gmail.com.

E. Madison Bray

unread,
May 31, 2019, 8:55:11 AM5/31/19
to sage-devel
On Fri, May 31, 2019 at 2:51 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> For Colby, it's broken matrix_mod2_dense.so, due to libgd, which got
> built without libpng.
> A result of a failed attempt to use libpng from the "system" - I guess
> Homebrew or a similar thing.

In my case it was *not* trying to use the libpng from the system.
That, or maybe I have a libgd that was originally linked against a
system libpng (e.g. while testing spkg-configure) but is now linking
to my Sage libpng. I'll have to do some log archaeology to figure out
what happened: I've been preoccupied with other madness the last two
weeks and have barely had any time to work on Sage, so I'm not sure
exactly where I left things :(
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq3CD4smSs%3D_aFbnsLZ3_UfuJdvi0m%2B8h%3Du9EiVCuF4cOg%40mail.gmail.com.

Colby Kelln

unread,
May 31, 2019, 12:49:32 PM5/31/19
to sage-devel
Hi, 

$ pkg-config --libs libpng

-L/usr/local/Cellar/libpng/1.6.34/lib -lpng16 -lz


and 


$ pkg-config --cflags libpng

-I/usr/local/Cellar/libpng/1.6.34/include/libpng16



On Friday, May 31, 2019 at 8:22:01 AM UTC-4, Dima Pasechnik wrote:
> > To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/85ea0bea-c855-47fa-b82e-f21d2594cd95%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.

Dima Pasechnik

unread,
May 31, 2019, 3:02:59 PM5/31/19
to sage-devel
On Fri, May 31, 2019 at 5:49 PM Colby Kelln <cke...@umich.edu> wrote:
>
> Hi,
>
> $ pkg-config --libs libpng
>
> -L/usr/local/Cellar/libpng/1.6.34/lib -lpng16 -lz
>
>
> and
>
>
> $ pkg-config --cflags libpng
>
> -I/usr/local/Cellar/libpng/1.6.34/include/libpng16

Thanks. Can you just uninstall it? Then building Sage should work one
way or another.
IIRC, MacOS 10.13/14 has its own libpng, which is good enoug: e.g.
Homebrew links its libraries against the system's one, (And if memory
fails me here then Sage will biuld its own libpng)

The problem with libpng in /usr/local/Cellar/libpng/1.6.34/ is that
it's a very non-standard location, and
the only way to use it is to either rely on pkg-config all the way, or
copy this location into (say) src/bin//sage-env-config and use it.

Hmm, the current way of using pkg-configure's macros in
spkg-configure.m4 files is flaky:
if the location of the package known to pkg-configure is non-standard,
chances are it won't get picked,
as this libpng example shows...

Dima
> 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 https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/7cd3f664-59dd-48dc-89da-ee8fb007e3b6%40googlegroups.com.

Justin C. Walker

unread,
May 31, 2019, 4:35:16 PM5/31/19
to SAGE Development


> On May 31, 2019, at 12:02 , Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Fri, May 31, 2019 at 5:49 PM Colby Kelln <cke...@umich.edu> wrote:
>>
>> Hi,
>>
>> $ pkg-config --libs libpng
>>
>> -L/usr/local/Cellar/libpng/1.6.34/lib -lpng16 -lz
>>
>>
>> and
>>
>>
>> $ pkg-config --cflags libpng
>>
>> -I/usr/local/Cellar/libpng/1.6.34/include/libpng16
>
> Thanks. Can you just uninstall it? Then building Sage should work one
> way or another.
> IIRC, MacOS 10.13/14 has its own libpng, which is good enoug: e.g.
> Homebrew links its libraries against the system's one, (And if memory
> fails me here then Sage will biuld its own libpng)

FWIW, I checked my 10.13/14 systems. Neither has libpng (at least, in /usr/lib). Not sure what the implications are…

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
I'm beginning to like the cut of his jibberish.
-----------



Dima Pasechnik

unread,
May 31, 2019, 5:10:45 PM5/31/19
to sage-devel
On Fri, May 31, 2019 at 9:35 PM 'Justin C. Walker' via sage-devel
<sage-...@googlegroups.com> wrote:
>
>
>
> > On May 31, 2019, at 12:02 , Dima Pasechnik <dim...@gmail.com> wrote:
> >
> > On Fri, May 31, 2019 at 5:49 PM Colby Kelln <cke...@umich.edu> wrote:
> >>
> >> Hi,
> >>
> >> $ pkg-config --libs libpng
> >>
> >> -L/usr/local/Cellar/libpng/1.6.34/lib -lpng16 -lz
> >>
> >>
> >> and
> >>
> >>
> >> $ pkg-config --cflags libpng
> >>
> >> -I/usr/local/Cellar/libpng/1.6.34/include/libpng16
> >
> > Thanks. Can you just uninstall it? Then building Sage should work one
> > way or another.
> > IIRC, MacOS 10.13/14 has its own libpng, which is good enoug: e.g.
> > Homebrew links its libraries against the system's one, (And if memory
> > fails me here then Sage will biuld its own libpng)
>
> FWIW, I checked my 10.13/14 systems. Neither has libpng (at least, in /usr/lib). Not sure what the implications are…
>
I probably confused it with ncurses. (Homebrew installs ncurses in
Cellar in order to avoid a conflict with the system - they call such
installs "keg-only"). If so, I don't see a reason libpng is not
installed in /usr/local/, where it would work just fine for Sage.

Colby, could you perhaps install libpng into the usual /usr/local, and
try again? Thanks.



> Justin
>
> --
> Justin C. Walker, Curmudgeon at Large
> Institute for the Absorption of Federal Funds
> -----------
> I'm beginning to like the cut of his jibberish.
> -----------
>
>
>
> --
> 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 https://groups.google.com/group/sage-devel.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/89524CF4-7CD7-4652-9C21-701C88190A6E%40mac.com.

Colby Kelln

unread,
May 31, 2019, 7:54:46 PM5/31/19
to sage-devel
I've installed (or rather updated) libpng and am attempting to build sage again. I'll post again if there is still a complication. Thanks so much for your efforts!
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages