build error in schroot+debootstrap

19 views
Skip to first unread message

Jason B Hill

unread,
Aug 12, 2011, 5:54:53 PM8/12/11
to sage-...@googlegroups.com
I'm wondering if anyone has any pointers on an error I'm getting.

In a schroot+debootstrap environment using Ubuntu 10.04 x86_64, I can
extract and run the binary of Sage 4.7 as root. I can also extract,
build, and run sage from source as root. Both of these fail in the
same way when I chown a built sage to my sageserver user, or when I
extract, build and run as sageserver. At the end of a build, I get:

File "/opt/sage/local/lib/python2.6/site-packages/sage/interfaces/gap.py",
line 912, in _start
raise RuntimeError, msg
RuntimeError: Unable to start gap because the command 'gap -r -b -p -T
-o 9999G /opt/sage/data//extcode/gap/sage.g' failed.

Some info:
- All of the dependencies for building sage are installed within my
10.04 chroot.
- Both the binary and the source build do function normally under the
root user in the chroot.
- The sageserver user is a fresh account (.e.g, no gaprc that could be
messing things up) and the schroot mounts are functioning fine
(allowing sage to read/write to /home/sageserver/.sage outside of the
chroot).

What am I missing?

--
Jason B. Hill
http://math.jasonbhill.com  |  Jason....@Colorado.edu

Mike Hansen

unread,
Aug 12, 2011, 6:09:28 PM8/12/11
to sage-...@googlegroups.com
On Fri, Aug 12, 2011 at 2:54 PM, Jason B Hill <Jason....@colorado.edu> wrote:
> RuntimeError: Unable to start gap because the command 'gap -r -b -p -T
> -o 9999G /opt/sage/data//extcode/gap/sage.g' failed.

What if you do "sage -sh" and try to run "gap -r -b -p -T -o 9999G
/opt/sage/data//extcode/gap/sage.g" manually? What error does it
give?
--Mike

Jason B Hill

unread,
Aug 12, 2011, 6:24:34 PM8/12/11
to sage-...@googlegroups.com
It actually doesn't appear to give an error then. Under both root and
sageserver users in the chroot, I get the

... stuff + gap version + stuff ... 62+@&67542+@ngap>

prompt.

> What if you do "sage -sh" and try to run "gap -r -b -p -T -o 9999G
> /opt/sage/data//extcode/gap/sage.g" manually?  What error does it
> give?
> --Mike

leif

unread,
Aug 12, 2011, 9:34:39 PM8/12/11
to sage-devel
On 13 Aug., 00:24, Jason B Hill <Jason.B.H...@Colorado.edu> wrote:
> It actually doesn't appear to give an error then. Under both root and
> sageserver users in the chroot, I get the
>
> ... stuff + gap version + stuff ... 62+@&67542+@ngap>
>
> prompt.

How about /dev/pts ?

(/opt/sage/local/lib/python2.6/site-packages/sage/interfaces/gap.py --
in contrast to the 'gap' command which also works for 'sageserver' --
uses PExpect, which requires pseudo ttys to work.)


-leif

leif

unread,
Aug 12, 2011, 9:50:00 PM8/12/11
to sage-devel
On 13 Aug., 03:34, leif <not.rea...@online.de> wrote:
> On 13 Aug., 00:24, Jason B Hill <Jason.B.H...@Colorado.edu> wrote:
>
> > It actually doesn't appear to give an error then. Under both root and
> > sageserver users in the chroot, I get the
>
> > ... stuff + gap version + stuff ... 62+@&67542+@ngap>
>
> > prompt.
>
> How about /dev/pts ?
>
> (/opt/sage/local/lib/python2.6/site-packages/sage/interfaces/gap.py --
> in contrast to the 'gap' command which also works for 'sageserver' --
> uses PExpect, which requires pseudo ttys to work.)


P.S.: Try running

http://trac.sagemath.org/sage_trac/raw-attachment/ticket/5965/sage-check-ptys-semaphore.py

(with ./sage -python ...; or first chmod +x it and run it directly if
you have some python in your PATH)


-leif

Jason B Hill

unread,
Aug 14, 2011, 2:30:30 PM8/14/11
to sage-...@googlegroups.com
>> How about /dev/pts ?

/dev/pts was indeed mounted. But, the generic mount-defaults file in
schroot mounted it as:

/dev/pts (chroot_path)/dev/pts none defaults 0 0

and this (a bit curiously) mounts it with permissions 0600. So, the
script you posted (along with a bunch of other stuff) works perfectly
under root, but returns an error for my sageserver user.

Do you see any problem with using the mount defaults for /dev/pts
(rw,noexec,nosuid,gid=5,mode=0620) from the container system inside
the chroot system?

Thanks!
Jason

>
> http://trac.sagemath.org/sage_trac/raw-attachment/ticket/5965/sage-check-ptys-semaphore.py

leif

unread,
Aug 14, 2011, 7:45:30 PM8/14/11
to sage-devel
On 14 Aug., 20:30, Jason B Hill <Jason.B.H...@Colorado.edu> wrote:
> >> How about /dev/pts ?
>
> /dev/pts was indeed mounted. But, the generic mount-defaults file in
> schroot mounted it as:
>
> /dev/pts   (chroot_path)/dev/pts   none   defaults   0   0
>
> and this (a bit curiously) mounts it with permissions 0600. So, the
> script you posted (along with a bunch of other stuff) works perfectly
> under root, but returns an error for my sageserver user.
>
> Do you see any problem with using the mount defaults for /dev/pts
> (rw,noexec,nosuid,gid=5,mode=0620) from the container system inside
> the chroot system?

Should IMHO work.

Did you mean this didn't work either (for your 'sageserver' user)?
And if so, what failed?


-leif

Jason B Hill

unread,
Aug 14, 2011, 9:45:00 PM8/14/11
to sage-...@googlegroups.com
>> Do you see any problem with using the mount defaults for /dev/pts
>> (rw,noexec,nosuid,gid=5,mode=0620) from the container system inside
>> the chroot system?
>
> Should IMHO work.

Just tested it. It indeed works. My sageserver user can now run Sage
(plus other pts stuff... sshd and so on) within my chroot using the
schroot mount defaults.

Thanks for pointing me in the pts direction!
Jason

Reply all
Reply to author
Forward
0 new messages