I have installed version 4.3.0.1 of Sage at

http://t2nb.math.washington.edu:8000/

This is functional. However, any attempt to import the _hashlib module fails miserably, as you can see from this published worksheet.

http://t2nb.math.washington.edu:8000/home/pub/0/

Python is not finding the libssl.so.0.9.7 library, which are in /usr/sfw/lib. If at the command prompt I run

$ export LD_LIBRARY_PATH=/usr/sfw/lib
$./sage
sage: import _hashlib

so it works, with no error message. But any attempt I have made to get Sage to start at boot time and load the library fails. In order to start the Sage server, I have a script run at boot time. I don't reproduce it all, but the important line is this one:



    su - sageserv /local-bins/start-sage

That allows this to be started at boot time by root, but run as a user 'sageserv', rather than root which would be very risky.

The script /local-bins/start-sage is:

#!/usr/bin/env bash
LD_LIBRARY_PATH=/usr/sfw/lib
export LD_LIBRARY_PATH
nohup /homes/sageserv/sage-4.3.0.1-Solaris-10-SPARC-sun4u-or-sun4v/sage /homes/sageserv/notebook.py >> /homes/sageserv/logfile.out&




notebook.py consists of:

-bash-3.00$ cat notebook.py
import sagenb.notebook.notebook_object as n

server_pool=['sa...@localhost']

n.notebook('sage_notebook', port=8000, accounts=True, address='',
         server_pool = server_pool, ulimit='-u 1000 -v 1000000 -t 3600',
    open_viewer=False, timeout=20*60, secure=False, port_tries=0)




I've tried adding the LD_LIBRARY_PATH to $HOME/.bashrc, $HOME/.profile, but still sage will not import the _hashlib module, as it can't find the OpenSSL libraries at runtime.

My next course of action would be to edit local/bin/sage-env, and add it there, but clearly that is not the ideal way.

It's clear that not only does the OpenSSL library need to be found at compile time, but also at run time (no surprise there). But what is annoying, is that I can find no way of getting LD_LIBRARY_PATH to propagate to Sage when started from a script. It works fine if I start Sage from the command line manually, but that is no good as a server.

Any ideas how I might solve this? Again, I do not want to mess with crle.

Manually editing sage-env might be one option, but that is not nice.

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