Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X 10.7 Lion: Maxima fails to build #11966

Closed
williamstein opened this issue Oct 31, 2011 · 35 comments
Closed

OS X 10.7 Lion: Maxima fails to build #11966

williamstein opened this issue Oct 31, 2011 · 35 comments

Comments

@williamstein
Copy link
Contributor

(The home base for this ticket is the Lion ticket #11881.)

See the discussion at #11884. To fix this we may need to slightly modify the Maxima spkg, at least for now.


New spkg: http://sage.math.washington.edu/home/leif/Sage/spkgs/maxima-5.23.2.p2.spkg

md5sum: f87e697e9497ccf69a91ae77c9b5a591

maxima-5.23.2.p2 (Leif Leonhardy, November 3rd 2011)

maxima-5.23.2.p1 (William Stein, 31 October 2011)

CC: @nexttime

Component: porting

Author: William Stein

Reviewer: Leif Leonhardy, John Palmieri

Merged: sage-4.8.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/11966

@williamstein
Copy link
Contributor Author

comment:1

My first guess about a way to solve this problem was to add the two lines

(require :cmp)
(setf c::*compile-in-constants* t)

to the top of the file maxima-5.23.2.p0/src/src/maxima.system. This was inspired by reading the error message and this post: http://www.mail-archive.com/ecls-list@lists.sourceforge.net/msg01243.html

@williamstein
Copy link
Contributor Author

Dependencies: 11884

@williamstein
Copy link
Contributor Author

comment:2

Here's an spkg with the patch. This built fine for me on OS X 10.7.2 (taking 23 minutes).

http://sage.math.washington.edu/home/wstein/patches/maxima-5.23.2.p1.spkg

@williamstein

This comment has been minimized.

@kcrisman
Copy link
Member

comment:3

I realize that Sage doesn't start yet (#11967). But can you try

./sage -maxima

and see if the Maxima standalone binary works fine? If not, we have problems, but presumably it will.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Oct 31, 2011

Author: William Stein

@nexttime nexttime mannequin changed the title lion os x 10.7: Maxima fails to build OS X 10.7 Lion: Maxima fails to build Oct 31, 2011
@nexttime
Copy link
Mannequin

nexttime mannequin commented Oct 31, 2011

Changed dependencies from 11884 to #11884

@nexttime
Copy link
Mannequin

nexttime mannequin commented Oct 31, 2011

comment:5

Should we apply the patch on all platforms? (Which the spkg currently does.)

@williamstein
Copy link
Contributor Author

comment:6

Replying to @nexttime:

Should we apply the patch on all platforms? (Which the spkg currently does.)

Good question, which I wondered about. It seems to work on other platforms, and logically it makes sense to me that it should be the right thing to do. However, I'm not very knowledgable about the subtleties of lisp compilation.

@jdemeyer
Copy link

jdemeyer commented Nov 3, 2011

Milestone sage-4.7.3 deleted

@jdemeyer jdemeyer removed this from the sage-4.8 milestone Nov 3, 2011
@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

comment:8

Replying to @williamstein:

Replying to @nexttime:

Should we apply the patch on all platforms? (Which the spkg currently does.)

Good question, which I wondered about. It seems to work on other platforms, and logically it makes sense to me that it should be the right thing to do. However, I'm not very knowledgable about the subtleties of lisp compilation.

The patch seems to be necessary (when building with the new ECL from git / #11884) on other platforms as well.

@nexttime nexttime mannequin added this to the sage-4.8 milestone Nov 4, 2011
@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

comment:9

FWIW, I made a "reviewer" p2 spkg with some fixes to / clean-up of spkg-install and some additions to SPKG.txt, but doctesting sage/interfaces/maxima* immediately segfaults (with both Williams p1 and my p2, with the ECL spkg from #11884):

$ ./sage -t -long devel/sage/sage/interfaces/maxima*
sage -t -long "devel/sage/sage/interfaces/maxima.py"
...
sage -t -long "devel/sage/sage/interfaces/maxima_lib.py"    
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libcsage.so(print_backtrace+0x31)[0x7f000546c817]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libcsage.so(sigdie+0x14)[0x7f000546c849]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libcsage.so(sage_signal_handler+0x20e)[0x7f000546c474]
/lib/libpthread.so.0(+0xf8f0)[0x7f00070ab8f0]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libgc.so.1(GC_free+0x40)[0x7effd69d1a50]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libecl.so.11.1(ecl_dealloc+0x16)[0x7effd6e3c786]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/python/site-packages/sage/misc/randstate.so(+0x38a8)[0x7f00036268a8]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/python/site-packages/sage/misc/randstate.so(+0x6fd2)[0x7f0003629fd2]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/python/site-packages/sage/misc/randstate.so(+0x7439)[0x7f000362a439]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalFrameEx+0x4dca)[0x7f00073a0e1a]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalCodeEx+0x888)[0x7f00073a2948]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalFrameEx+0x4ba4)[0x7f00073a0bf4]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalCodeEx+0x888)[0x7f00073a2948]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(+0x71c2b)[0x7f000732ac2b]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyObject_Call+0x52)[0x7f00073011a2]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(+0x5a8bd)[0x7f00073138bd]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyObject_Call+0x52)[0x7f00073011a2]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalFrameEx+0x464c)[0x7f00073a069c]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalCodeEx+0x888)[0x7f00073a2948]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalFrameEx+0x4ba4)[0x7f00073a0bf4]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalCodeEx+0x888)[0x7f00073a2948]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalFrameEx+0x4ba4)[0x7f00073a0bf4]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalCodeEx+0x888)[0x7f00073a2948]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalFrameEx+0x4ba4)[0x7f00073a0bf4]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalCodeEx+0x888)[0x7f00073a2948]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyEval_EvalCode+0x32)[0x7f00073a2a22]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyRun_FileExFlags+0xb0)[0x7f00073c45a0]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(PyRun_SimpleFileExFlags+0x1ff)[0x7f00073c504f]
/home/leif/Sage/sage-4.7.2.rc0-gcc-4.5.1/local/lib/libpython2.6.so.1.0(Py_Main+0xb2c)[0x7f00073d3d3c]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f00066adc4d]
python[0x400619]

------------------------------------------------------------------------
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(). You might
want to run Sage under gdb with 'sage -gdb' to debug this.
Sage will now terminate.
------------------------------------------------------------------------
Segmentation fault

	 [3.4 s]
 
----------------------------------------------------------------------
The following tests failed:


	sage -t -long "devel/sage/sage/interfaces/maxima.py"
	sage -t -long "devel/sage/sage/interfaces/maxima_abstract.py"
	sage -t -long "devel/sage/sage/interfaces/maxima_lib.py"

I think that's most probably "just" due to ECL (or Boehm GC?), i.e. #11884, so I could otherwise give this ticket a positive review... ;-)

Anyway, someone would have to look at my reviewer changes.

Btw., there's an spkg-dist script apparently nobody used recently (I added a comment on that to SPKG.txt), which deletes the following (and creates dummy Makefile.ins):

$ du -sch /home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/{es,pt}*
9.9M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/es
7.3M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/es.utf8
8.2M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/pt
8.8M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/pt_BR
6.5M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/pt_BR.utf8
6.0M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/pt.utf8
47M	total

@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

Reviewer: Leif Leonhardy

@nexttime nexttime mannequin added s: needs info and removed s: needs review labels Nov 4, 2011
@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

Attachment: maxima-5.23.2.p1-p2.diff.gz

Diff between William's p1 and my p2. For reference / review.

@nexttime

This comment has been minimized.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

comment:11

Replying to @nexttime:

FWIW, I made a "reviewer" p2 spkg with some fixes to / clean-up of spkg-install and some additions to SPKG.txt, but doctesting sage/interfaces/maxima* immediately segfaults (with both Williams p1 and my p2, with the ECL spkg from #11884) [...]

I think that's most probably "just" due to ECL (or Boehm GC?), i.e. #11884, so I could otherwise give this ticket a positive review... ;-)

Oooops, one should perhaps run ./sage -b after installing a new ECL spkg... B)

$ ./sage -t -long devel/sage/sage/interfaces/maxima*
sage -t -long "devel/sage/sage/interfaces/maxima.py"        
	 [25.7 s]
sage -t -long "devel/sage/sage/interfaces/maxima_abstract.py"
	 [38.4 s]
sage -t -long "devel/sage/sage/interfaces/maxima_lib.py"    
	 [5.2 s]
 
----------------------------------------------------------------------
All tests passed!

By the way, the new ECL + patched Maxima spkgs work with both the boehm_gc-7.2.alpha6.p0 (from #11883) and the boehm_gc-7.1.p7 spkg.

Anyway, someone would have to look at my reviewer changes.

That still applies.

Btw., there's an spkg-dist script apparently nobody used recently (I added a comment on that to SPKG.txt), which deletes the following (and creates dummy Makefile.ins):

$ du -sch /home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/{es,pt}*
9.9M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/es
7.3M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/es.utf8
8.2M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/pt
8.8M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/pt_BR
6.5M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/pt_BR.utf8
6.0M	/home/leif/Sage/spkgs/maxima-5.23.2.p2/src/doc/info/pt.utf8
47M	total

If nobody objects, I can make a stripped spkg with these files removed (and SPKG.txt updated accordingly).

The relevant languages are Portuguese (Portugal and Brazil) and Spanish:

#!/usr/bin/env python

import os, sys, time

def cmd(x):
    print x
    if os.system(x):
        print "(Failed.)"

for X in ['es', 'es.utf8', 'pt', 'pt.utf8', 'pt_BR', 'pt_BR.utf8']:
    cmd('rm -rf "src/doc/info/%s/"*'%X)
    open('src/doc/info/%s/Makefile.in'%X,'w').write('all:\n\tls\n\n')

@nexttime nexttime mannequin added s: needs review and removed s: needs info labels Nov 4, 2011
@nexttime

This comment has been minimized.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

comment:13

Both spkgs (new ECL and Maxima 5.23.2.p2) also build on Solaris SPARC (32-bit mode), and all long tests pass in sage/interfaces/maxima*.

ptestlong (also on Ubuntu 10.04.3 x86_64) in progress...

@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

comment:14

Replying to @nexttime:

ptestlong (also on Ubuntu 10.04.3 x86_64) in progress...

On Ubuntu 10.04.3 I get:

The following tests failed:

	sage -t  -long -force_lib devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/number_field/number_field.py # 5 doctests failed
	sage -t  -long -force_lib devel/sage/sage/rings/polynomial/multi_polynomial_element.py # 4 doctests failed
	sage -t  -long -force_lib devel/sage/doc/en/bordeaux_2008/l_series.rst # 3 doctests failed
	sage -t  -long -force_lib devel/sage/doc/en/bordeaux_2008/elliptic_curves.rst # 2 doctests failed
	sage -t  -long -force_lib devel/sage/doc/en/reference/coercion.rst # 2 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/plane_curves/projective_curve.py # 3 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/heegner.py # 7 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/sha_tate.py # 15 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/lseries_ell.py # 2 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/elliptic_curves/BSD.py # 1 doctests failed
	sage -t  -long -force_lib devel/sage/sage/schemes/generic/divisor_group.py # 3 doctests failed
	sage -t  -long -force_lib devel/sage/sage/lfunctions/dokchitser.py # 16 doctests failed
	sage -t  -long -force_lib devel/sage/sage/modular/modform/eis_series.py # 4 doctests failed
	sage -t  -long -force_lib devel/sage/sage/modular/modform/element.py # 10 doctests failed
	sage -t  -long -force_lib devel/sage/sage/interfaces/r.py # 1 doctests failed
----------------------------------------------------------------------

(Although I'm not that sure how clean the installation is, but IIRC the last ptestlong passed all tests.)

@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

comment:15

Replying to @nexttime:

Replying to @nexttime:

ptestlong (also on Ubuntu 10.04.3 x86_64) in progress...

On Ubuntu 10.04.3 I get:

The following tests failed:
...

(Although I'm not that sure how clean the installation is, but IIRC the last ptestlong passed all tests.)

Weird. After building Sage 4.7.2 (final) from scratch with the two spkgs, all tests (ptestlong) passed.

ptestlong also passed on Solaris SPARC, with Sage 4.7.2.alpha3.

@jhpalmieri
Copy link
Member

comment:16

By the way, have you tried using this spkg without the ECL spkg from #11884? It worked for me (with a build from scratch) on sage.math, hawk (OpenSolaris) and various skynet machines (cleo, eno, silius, taurus; tests passed on all of these except for silius, which has other problems, and cleo, because it hasn't made it that far yet, but it's about 90% done and all tests have passed so far). I'm also building on mark2 (Solaris), but it is really slow; the maxima build just completed successfully. Maybe some time tomorrow we'll know about doctests there...

I wonder if we should remove the dependency on #11884.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

Changed dependencies from #11884 to none

@nexttime
Copy link
Mannequin

nexttime mannequin commented Nov 4, 2011

comment:17

Replying to @jhpalmieri:

By the way, have you tried using this spkg without the ECL spkg from #11884?

Nope, since it would be surprising if it did not work... :-)

I wonder if we should remove the dependency on #11884.

Breaking the cycle...

@jhpalmieri
Copy link
Member

comment:18

I've built this on a bunch of different systems, both with and without the new ecl spkg at #11884. I'm giving it (Leif's changes, in particular) a positive review.

@jhpalmieri
Copy link
Member

Changed reviewer from Leif Leonhardy to Leif Leonhardy, John Palmieri

@jdemeyer
Copy link

Merged: sage-4.8.alpha2

@kcrisman
Copy link
Member

comment:20

So, somewhat weirdly, since this was tested a lot on various platforms, with #11884 and this spkg, I get an error on PPC OS X 10.4. Error is


;;; Note:
;;;   Invoking external command:
;;;   ranlib lisp-cache/Users/student/Desktop/sage-4.8.alpha1/spkg/build/maxima-5.23.2.p2/src/src/libmaxima.a 
;;; Note:
;;;   Invoking external command:
;;;   gcc -I. -I/Users/student/Desktop/sage-4.8.alpha1/local/include/ -I/Users/student/Desktop/sage-4.8.alpha1/local/include -I/Users/student/Desktop/sage-4.8.alpha1/local/include -g -O2 -mno-altivec -mabi=no-altivec -fPIC -fno-common -Ddarwin -O2 -w -c eclinit4LFMq0.c -o eclinit4LFMq0.o 
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: truncated or malformed archive: lisp-cache/Users/student/Desktop/sage-4.8.alpha1/spkg/build/maxima-5.23.2.p2/src/src/libmaxima.a at offset 28816248 (archive header of next member extends past the end of the file, can't load from it)
collect2: ld returned 1 exit status
An error occurred during initialization:
Error code 1 when executing
(RUN-PROGRAM "gcc" ("-o"
                    "lisp-cache/Users/student/Desktop/sage-4.8.alpha1/spkg/build/maxima-5.23.2.p2/src/src/maxima.fasb"
                    "-L/Users/student/Desktop/sage-4.8.alpha1/local/lib/"
                    "/Users/student/Desktop/sage-4.8.alpha1/spkg/build/maxima-5.23.2.p2/src/src/eclinit4LFMq0.o"
                    "lisp-cache/Users/student/Desktop/sage-4.8.alpha1/spkg/build/maxima-5.23.2.p2/src/src/libmaxima.a"
                    "-bundle"
                    "-L/Users/student/Desktop/sage-4.8.alpha1/local/lib"
                    "-L/Users/student/Desktop/sage-4.8.alpha1/local/lib"
                    "-L/Users/student/Desktop/sage-4.8.alpha1/local/lib"
                    "-lecl" "-lgmp" "-lgc" "-lm")).
;;; Note:
;;;   Invoking external command:
;;;   gcc -o lisp-cache/Users/student/Desktop/sage-4.8.alpha1/spkg/build/maxima-5.23.2.p2/src/src/maxima.fasb -L/Users/student/Desktop/sage-4.8.alpha1/local/lib/ /Users/student/Desktop/sage-4.8.alpha1/spkg/build/maxima-5.23.2.p2/src/src/eclinit4LFMq0.o lisp-cache/Users/student/Desktop/sage-4.8.alpha1/spkg/build/maxima-5.23.2.p2/src/src/libmaxima.a -bundle -L/Users/student/Desktop/sage-4.8.alpha1/local/lib -L/Users/student/Desktop/sage-4.8.alpha1/local/lib -L/Users/student/Desktop/sage-4.8.alpha1/local/lib -lecl -lgmp -lgc -lm ***********************************************************
Error: Failed to build Maxima as an ECL library.
***********************************************************

real    151m29.005s
user    27m50.456s
sys     14m7.400s
************************************************************************
Error installing package maxima-5.23.2.p2
************************************************************************

This error looks a LOT like the error in #11884 on the same platform.

@kcrisman
Copy link
Member

comment:21

And yes, this is after using the correct spkg on #11884.

@kcrisman
Copy link
Member

comment:22

Incidentally, the binary works fine from the command line; it's just the library that failed to install.

@jdemeyer
Copy link

comment:23

Important question: does it make sense to merge this without merging the new ECL package (#11884) also?

@jdemeyer
Copy link

comment:24

Replying to @kcrisman:

This error looks a LOT like the error in #11884 on the same platform.

Indeed. And since the problem only occurs with new versions of ECL, it think ECL (not Maxima) is to blaim.

@kcrisman
Copy link
Member

comment:25

Replying to @jdemeyer:

Replying to @kcrisman:

This error looks a LOT like the error in #11884 on the same platform.

Indeed. And since the problem only occurs with new versions of ECL, it think ECL (not Maxima) is to blaim.

I concur. Which means it's probably okay to merge this? (Maybe?)

@jhpalmieri
Copy link
Member

comment:26

I tested this on a number of systems (not OS X 10.4 PPC, though) without the new ECL package, and it worked just fine. So except for testing on OS X 10.4 PPC, I think it makes sense to merge it independently of ECL.

@kcrisman
Copy link
Member

comment:27

And it builds fine with or without #11884 on that platform, and Maxima works, though I didn't run the testsuite - it takes so long to build, and maxima.py times out always :) And I think Jeroen has tested it on PPC OS X 10.4.

@jdemeyer
Copy link

comment:28

I am planning to start testing a tentative sage-4.8.alpha2 tomorrow, which includes this ticket. So if all goes well, the new Maxima will be merged in sage-4.8.alpha2 without the new ECL. For ECL, we have to see what upstream says...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants