Sage 4.8 build failed: Error: Failed to build Maxima as an ECL library.

85 views
Skip to first unread message

syd.la...@gmail.com

unread,
Mar 2, 2012, 4:03:04 AM3/2/12
to sage-devel
Hi there,

I saw people talking about this error on Lion. But this machine is
linux, so it might be a new error.

uname - a
Linux msx0 2.6.18-274.12.1.el5 #1 SMP Tue Nov 8 21:37:35 EST 2011
x86_64 x86_64 x86_64 GNU/Linux

Error Log:
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; End of Pass 1.
;;; Note:
;;; Invoking external command:
;;; gcc -I. -I/files3/home/sahosse/sage/local/include/ -I/files3/
home/sahosse/sage/local/include -I/files3/home/sahosse/sage/local/
include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O2 -
w -c /tmp/ecl001ff18EH.c -o /tmp/ecl001ff18EH.o
An error occurred during initialization:
Component "maxima" not found.
;;; Note:
;;; Invoking external command:
;;; gcc -o /tmp/ecl001ff18EH.fas -L/files3/home/sahosse/sage/local/
lib/ /tmp/ecl001ff18EH.o -Wl,--rpath,/files3/home/sahosse/sage/local/
lib/ -shared -L/files3/home/sahosse/sage/local/lib -L/files3/home/
sahosse/sage/local/lib -Wl,--rpath,/files3/home/sahosse/sage/local/lib
-L/files3/home/sahosse/sage/local/lib -lecl -lgmp -lgc -ldl -lm
***********************************************************
Error: Failed to build Maxima as an ECL library.
***********************************************************

real 3m59.112s
user 3m22.988s
sys 0m28.888s
************************************************************************
Error installing package maxima-5.23.2.p3
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
/files3/home/sahosse/sage/spkg/logs/maxima-5.23.2.p3.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/files3/home/sahosse/sage/spkg/build/maxima-5.23.2.p3 and type 'make'
or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd '/files3/home/sahosse/sage/spkg/build/maxima-5.23.2.p3' && '/
files3/home/sahosse/sage/sage' -sh)
When you are done debugging, you can type "exit" to leave the
subshell.
************************************************************************
make[1]: *** [installed/maxima-5.23.2.p3] Error 1
make[1]: Leaving directory `/files3/home/sahosse/sage/spkg'

real 4m6.986s
user 3m30.353s
sys 0m31.555s
Error building Sage.
make: *** [build] Error 1


P.S. I don't have root access to this machine

syd.la...@gmail.com

unread,
Mar 2, 2012, 4:21:41 PM3/2/12
to sage-devel
The error is because asdf can not see maxima.asd although it's in the
current directory. So I added this line before the call to asdf to
make maxima:

-eval '(push "/files3/home/sahosse/sage/spkg/build/maxima-5.23.2.p3/
src/src/" asdf:*central-registry*)' \
-eval '(asdf:make-build :maxima :type :fasl :move-here ".")' \

and now I get this error:

;;; Loading "/files3/home/sahosse/sage/spkg/build/maxima-5.23.2.p3/src/
src/maxima.asd"
An error occurred during initialization:
In function PATHNAME, the value of the only argument is
NIL
which is not of the expected type (OR FILE-STREAM STRING PATHNAME).

I hope that helps in spotting the problem.

On Mar 2, 2:03 am, "syd.lavas...@gmail.com" <syd.lavas...@gmail.com>
wrote:
> Hi there,
>
> I saw people talking about thiserroron Lion. But this machine is
> linux, so it might be a newerror.
>
> uname - a
> Linux msx0 2.6.18-274.12.1.el5 #1 SMP Tue Nov 8 21:37:35 EST 2011
> x86_64 x86_64 x86_64 GNU/Linux
>
> ErrorLog:
> ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
> ;;;
> ;;; End of Pass 1.
> ;;; Note:
> ;;;   Invoking external command:
> ;;;   gcc -I. -I/files3/home/sahosse/sage/local/include/ -I/files3/
> home/sahosse/sage/local/include -I/files3/home/sahosse/sage/local/
> include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux -O2 -
> w -c /tmp/ecl001ff18EH.c -o /tmp/ecl001ff18EH.o
> Anerroroccurred during initialization:

Dima Pasechnik

unread,
Mar 2, 2012, 9:43:14 PM3/2/12
to sage-devel
Please make sure to follow this part of the instruction:

"and including the relevant part of the log file
  /files3/home/sahosse/sage/spkg/logs/maxima-5.23.2.p3.log
Describe your computer, operating system, etc. "

All one can see from your report so far that your Linux kernel is kind
of old. We do not see at all what e.g. your compiler is, or what
flavour of Linux you're running.

Could you perhaps upload the complete install.log somewhere and post a
link to it here?
Thanks,
Dmitrii

On Mar 2, 5:03 pm, "syd.lavas...@gmail.com" <syd.lavas...@gmail.com>
wrote:

syd.la...@gmail.com

unread,
Mar 5, 2012, 12:26:24 AM3/5/12
to sage-...@googlegroups.com
Hello Dmitrii,

Thank you very much for looking to my case.

I have uploaded it here, good luck with this 90Mb file:

http://payamban.com/install.log

Moreover, maybe this information is also useful:

~/sage $ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
~/sage $ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thank you very much.

Cheers,
Syd

בתאריך יום שישי, 2 במרס 2012 19:43:14 UTC-7, מאת Dima Pasechnik:

Dima Pasechnik

unread,
Mar 5, 2012, 10:31:20 PM3/5/12
to sage-devel, Dima Pasechnik
Well, I don't see what goes wrong there (except that the compiler you
use is so outdated that surely Sage is not tested with it --- version
alone does not say this, as the same version on MacOSX is a different
beast). You mention "people talking about this error on Lion".
Any links to any posts/forums on this?

I guess it is an ECL bug (or feature :)). I'll cc'in this to the ECL
list, just in case they are aware of these issues.



On Mar 5, 1:26 pm, "syd.lavas...@gmail.com" <syd.lavas...@gmail.com>
wrote:

syd.la...@gmail.com

unread,
Mar 15, 2012, 3:21:51 AM3/15/12
to sage-...@googlegroups.com, Dima Pasechnik
Wasn't a compiler problem. I built gcc 4.6.3 at my home directory and rebuilt sage. The problem persisted.

The problem is very similar to what Dmitrii described here:

https://groups.google.com/forum/?fromgroups#!msg/sage-devel/Gj3cbdcPqKo/ROV39CTFbI4J

The problem is that my home directory is:

/files3/home/sahosse/

but I only have execution permission to the directory "home":

[sahosse@msx0 ~]$ ls -ld /files3/home
drwx--x--x 192 root msstaff 4096 Feb 15 13:23 /files3/home
[sahosse@msx0 ~]$ ls -l /files3/home
ls: /files3/home: Permission denied

Off course I have access to my home directory but (directory) function of ecl always return NIL as long as "home" appears in the path of the requested directory, which means it fails on my entire home directory:

[sahosse@msx0 ~]$ ~/sage/local/bin/ecl
ECL (Embeddable Common-Lisp) 11.1.1 (git:UNKNOWN)
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help. 
Top level.
> (directory "/*")

(#P"/.autorelabel" #P"/.autofsck" #P"/.rnd")
> (directory "/files3/*")

NIL
> (directory "/files3/home/sahosse/*")

NIL
> (directory "/tmp/maxima-5.23.2.p3/*")

(#P"/tmp/maxima-5.23.2.p3/spkg-install~" #P"/tmp/maxima-5.23.2.p3/spkg-install"
 #P"/tmp/maxima-5.23.2.p3/.hgtags" #P"/tmp/maxima-5.23.2.p3/.hgignore"
 #P"/tmp/maxima-5.23.2.p3/spkg-dist")

So, for the ecl step of maxima to be successful, I copied the maxima package directory to /tmp , run the rest of the script there, then commented Maxima out from the install script in spkg:

Build finished.  The built documents can be found in /files3/home/sahosse/sage/devel/sage/doc/output/html/ru/tutorial
[sahosse@msx0 sage]$ sage
----------------------------------------------------------------------
| Sage Version 4.8, Release Date: 2012-01-20                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: maxima(1+1)
2

This is a bug of ecl and they need to fix it. It seems to me a poor implementation of directory function that can not handle such a common permission situation. I do not know how to report bug to ecl, but if sb knows please do. It is easily reproducible and I checked and it persists in the latest stable (12.2.1).

בתאריך יום שני, 5 במרס 2012 20:31:20 UTC-7, מאת Dima Pasechnik:

Nils Bruin

unread,
Mar 15, 2012, 12:25:13 PM3/15/12
to sage-devel
On Mar 15, 12:21 am, "syd.lavas...@gmail.com" <syd.lavas...@gmail.com>
wrote:
> The problem is that my home directory is:
>
> /files3/home/sahosse/
>
> but I only have execution permission to the directory "home":

I confirm:

$ mkdir /tmp/test
$ chmod a-r /tmp/test
$ mkdir /tmp/test/a
$ touch /tmp/test/a/b
$ ls /tmp/test/a/*
/tmp/test/a/b

$ ecl
ECL (Embeddable Common-Lisp) 11.1.1
[...]
> (directory "/tmp/test/a/*")

NIL
> (quit)
$ chmod u+r /tmp/test
$ ecl
ECL (Embeddable Common-Lisp) 11.1.1
[...]
> (directory "/tmp/test/a/*")

(#P"/tmp/test/a/b")

so, changing read permissions on a directory higher up in the tree
makes everything below not reachable for "directory". The same problem
arises for multi-level wildcards in the shell, i.e., "ls /tmp/test/*/
*" can't find /tmp/test/a/b either if test is not readable. I guess
ECL uses the same code for wildcards as it uses for specified path
components.

I have checked the CLHS and no mention is made of how permissions
should be handled by lisp. I guess that is implementation-dependent.
From that perspective, ECL could just define that read permission is
required on all components of a path in order for it to be reachable,
but since that is so incompatible with UNIX, I think they will
consider this a bug as well.

Dima Pasechnik

unread,
Mar 15, 2012, 1:44:26 PM3/15/12
to sage-...@googlegroups.com

I've sent this to ecls...@lists.sourceforge.net
as a bug report.

Dima

leif

unread,
Mar 15, 2012, 8:04:35 PM3/15/12
to sage-devel
> I've sent this to ecls-l...@lists.sourceforge.net
> as a bug report.


Btw, you run into similar problems if you happen to have HOME set but
the directory doesn't exist (e.g. because /home isn't mounted); ECL
insists on being at least able to *read* your home directory.


-leif

Juanjo

unread,
Mar 18, 2012, 12:12:17 PM3/18/12
to sage-...@googlegroups.com
On Friday, March 16, 2012 1:04:35 AM UTC+1, leif wrote:
Btw, you run into similar problems if you happen to have HOME set but 
the directory doesn't exist (e.g. because /home isn't mounted); ECL
insists on being at least able to *read* your home directory.

Is it so surprising given that ECL is trying to read out your customization ~/.eclrc as described in the manual page? I do not follow the Sage build methods in detail but ecl should always be invoked with -norc when used as a compiler for third-party applications and not by a casual user.

Juanjo

Juanjo

unread,
Mar 18, 2012, 12:19:20 PM3/18/12
to sage-...@googlegroups.com
This is now fixed in CVS. It is a question of semantics not of good or "poor" implementations, as described above. I interpreted that the _whole_ of the argument to DIRECTORY is to be processed as a pattern matching pathname. Indeed, contrary to what Unix users would expect, we cannot optimize a directory to "/foo/faa/fee/*" jumping directly into the last component because we have to find out truenames -- in other words, if "faa" or "foo" are actually links, we have to traverse them and substitute the appropriate parts of the pathname by their content (See http://clhs.lisp.se/Body/f_dir.htm and http://clhs.lisp.se/Body/26_glo_t.htm#truename).

I have modified the implementation of DIRECTORY to read as follows (sketch, the actual implementation is more complicated)

* Loop D over directory components
** If D is not a wildcard component
*** Enter D
*** If D is a link, replace by value
** Else
*** List directory content
*** Collect components that match D
*** Recursively process each component
** End If
*

Formerly the first "If" was not present.

Dima Pasechnik

unread,
Mar 19, 2012, 5:46:02 AM3/19/12
to sage-...@googlegroups.com
On 2012-03-18, Juanjo <juanjose.g...@googlemail.com> wrote:
> ------=_Part_246_13364566.1332087137483
> Content-Type: text/plain; charset=ISO-8859-1

looks like we need to patch our ecl amd maxima spkgs in this respect

Dima
>
> Juanjo
>

leif

unread,
Mar 20, 2012, 1:09:36 PM3/20/12
to sage-devel
On 18 Mrz., 17:12, Juanjo <juanjose.garciarip...@googlemail.com>
wrote:
> On Friday, March 16, 2012 1:04:35 AM UTC+1, leif wrote:
>
> > Btw, you run into similar problems if you happen to have HOME set but
>
> the directory doesn't exist (e.g. because /home isn't mounted); ECL
>
> > insists on being at least able to *read* your home directory.
>
> Is it so surprising given that ECL is trying to read out your customization
> ~/.eclrc as described in the manual page?

Well, took me some time (using `strace`) to find out a while ago *why*
the build failed, because there was no appropriate error message.

(And that was on a machine on the Sage cluster where /home wasn't
mounted for some time after the trouble with electricity.)

I wouldn't consider or expect being unable to access / read $HOME a
(fatal) error anyway.


> I do not follow the Sage build
> methods in detail but ecl should always be invoked with -norc when used as
> a compiler for third-party applications and not by a casual user.

Thanks, didn't know that.

I'll take a look at our scripts, but I think it may also be Maxima
upstream that doesn't use that.


-leif
Reply all
Reply to author
Forward
0 new messages