I build Sage 4.2.0 on a machine with the first release of Solaris 10.
(A painfully slow process, as the machine is only 500 MHz).  I
upgraded that to 4.2.1, which went without a hitch.

As you will gather from a previous email or two, I've created a
Solaris binary using

./sage -bdist

on the slow SPARC (call it 'buildhost') with an old version of Solaris
10, and tried to move the SPARC binary distribution to another
machine, which I'll call 'target'

Another couple of problems I hit are.

1) There is a complaint on the target that 'ranlib' is not installed.
I've no idea why that might be needed on a binary distribution. (In
any case, it is, but just not in the path). I ingored this message.

2) There is a error message on the target that libgcc_s.so.1 could not
be opened. This is perfectly understandable. If Sage is built on the
buildhost against a GCC library, then that library needs to be on the
target system. So I think it will be necessary to copy libgcc_s.so.1
and probably the Fortran library too. The script for building the
binary distribution did not do that.

That probably means we need to save the location of the libraries
during the build process, so they can be copied over. Perhaps using
'ldd' and see what the binaries links against would be a sensible way
of doing this. Then copy the non-system libraries over. (If be just
build with 'gcc' rather than /path/to/gcc, then knowing the location
of the libraries will not be so easy.

(There might be an issue if gcc is GPL3, as it would require copying
the binaries created with GPL 3 code. But perhaps that is permitted,
but I am not so sure.)

3) Since I had gcc installed on the target system, I set
LD_LIBRARY_PATH to include the lib directory of the gcc install. This
could have been a problem, as the buildhost had gcc 4.4.2 but the
nearest version on the target was 4.4.1. But that seemed to work ok.
But more importantly, there was no reason to have gcc installed on the
target. Had I not had a recent gcc on the target machine, I do not
believe Sage would have worked.

4) Having logged in as 'drkirkby', and used 'su' to get to root, when
I run Sage, it rebuild all the necessary files, but stuck some data in
/export/home/drkirkby/.sage but owned by root.

I could then run Sage ok as root.

5) Having seen sage run ok as root, I tried it as user 'drkirkby'. But
this time I got an error that /export/home/drkirkby/.sage could not be
written to. The fact I had used su to switch user, meant that running
Sage as root created the files own by root in drkirkby's directory.
Then drkirkby could not write to them, so he could not run Sage.

6) I then switched user to root, and removed the root-owned files from
drkirkby's directory.

# rm -rf /export/home/drkirkby/.sage

7) Then run Sage as user drkirkby. It gave a couple of warning, but
does work. In fact the GUI worked too. The Sage server was running at
localhost on port 8000.

So it seems there a few issues with the sage-bdist script on Solaris.
The major ones being the GNUism with the -a option to 'cp', and the
fact the gcc libraries are not copied when the binary distribution is
created.


Here's Sage, running on a different system, installed as root, but run
as  a normal user.


drkir...@swan:[~] $ /usr/local/sage-4.2-Solaris-10-SPARC-sun4u-SunOS/sage
----------------------------------------------------------------------
| Sage Version 4.2, Release Date: 2009-10-24                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
Setting permissions of DOT_SAGE directory so only you can read and write it.
sage: notebook()
The notebook files are stored in: sage_notebook.sagenb



Please choose a new password for the Sage Notebook 'admin' user.
Do _not_ choose a stupid password, since anybody who could guess your password
and connect to your machine could access or delete your files.
NOTE: Only the md5 hash of the password you type is stored by Sage.
You can change your password by typing notebook(reset=True).



Enter new password: *****
Retype new password: *****

Please login to the notebook with the username 'admin' and the above password.
Password changed for user 'admin'.
**************************************************
*                                                *
* Open your web browser to http://localhost:8000 *
*                                                *
**************************************************
/usr/local/sage-4.2-Solaris-10-SPARC-sun4u-SunOS/local/lib/python2.6/site-packages/twisted/persisted/sob.py:12:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import os, md5, sys
2009-11-30 23:05:19+0000 [-] Log opened.
2009-11-30 23:05:19+0000 [-] twistd 8.2.0
(/usr/local/sage-4.2-Solaris-10-SPARC-sun4u-SunOS/local/bin/python
2.6.2) starting up.
2009-11-30 23:05:19+0000 [-] reactor class:
twisted.internet.selectreactor.SelectReactor.
2009-11-30 23:05:19+0000 [-] twisted.web2.channel.http.HTTPFactory
starting on 8000
/usr/local/sage-4.2-Solaris-10-SPARC-sun4u-SunOS/local/bin/sage-native-execute:
xdg-open: not found
2009-11-30 23:05:19+0000 [-] Starting factory
<twisted.web2.channel.http.HTTPFactory instance at 0x3c98b48>

But at that point Sage works - including the GUI.

So I have managed to build Sage 4.2.0, upgrade it to 4.2.1, and move
the distribution from an old version of Solaris to a very recent
version. Install it as root, and run as a normal user.  But it was far
from a trivial process.

Dave

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to