Re: [9fans] ghostscript not finding LucidaSans

2010-06-28 Thread ron minnich
well, once again, ratrace can be a good tool for understanding things
that don't make sense. I use it all the time for this type of problem
and the results are frequently illuminating.

ron



Re: [9fans] ghostscript not finding LucidaSans

2010-06-28 Thread Pietro Gagliardi

On Jun 28, 2010, at 9:09 AM, erik quanstrom wrote:


On Mon Jun 28 02:37:21 EDT 2010, pietr...@mac.com wrote:
Actually, on further investigation it turns out while dircp /n/ 
sources/
plan9/sys/lib/postscript dir works fine, diff -r dir /n/sources/ 
plan9/

sys/lib/postscript gives me the same diff log, and diff -r dir olddir
tells me they're identical. So what's going on here...


the difference that i can think of is #Z.  #Z doesn't do
locks, exclusive access, etc.  why don't you try binding a ramfs
/tmp on lp's temp directory, /sys/lib/lp/tmp.  if that's not
it, the bind/mount list you used to get things working from
sources should give you more directories to investigate.

- erik



That didn't work. I narrowed the directory discrepancies to /sys/lib/ 
postscript/font but not to any of its subdirectories. However again,  
copying from sources and overwriting what's already there did nothing,  
even if I had removed the directory from the host machine already. I  
also tried to overwrite with a copy of the directory tree from an ISO  
downloaded today, but that didn't work either (however both ISOs  
appear to come from June 26, so I dunno). Only binding did the trick.





Re: [9fans] ghostscript not finding LucidaSans

2010-06-28 Thread erik quanstrom
On Mon Jun 28 02:37:21 EDT 2010, pietr...@mac.com wrote:
> Actually, on further investigation it turns out while dircp /n/sources/ 
> plan9/sys/lib/postscript dir works fine, diff -r dir /n/sources/plan9/ 
> sys/lib/postscript gives me the same diff log, and diff -r dir olddir  
> tells me they're identical. So what's going on here...

the difference that i can think of is #Z.  #Z doesn't do
locks, exclusive access, etc.  why don't you try binding a ramfs
/tmp on lp's temp directory, /sys/lib/lp/tmp.  if that's not
it, the bind/mount list you used to get things working from
sources should give you more directories to investigate.

- erik



Re: [9fans] ghostscript not finding LucidaSans

2010-06-28 Thread Ethan Grammatikidis


On 28 Jun 2010, at 04:18, Pietro Gagliardi wrote:

I'm not sure if this has to do with 9vx... in fact I'm not sure  
exactly what's causing these things to behave as they are now.


I have the same problem with postscript, and wonder if something went  
wrong in getting the files from Plan 9 to make a 9vx tree. I ran a  
single Plan 9 instance in Qemu for a few years; no trouble with  
postscript then. I copied the tree out from the live running system  
using tar and dial[*] on the plan 9 side; tar and netcat on the unix,  
and used that tree with no further modification as a root for 9vx.  
Postscript now fails with the error Pietro gave.


[*] dial as in p9p / inferno's dial command. I renamed the binary to  
dialout to avoid conflict with /bin/dial/




Re: [9fans] ghostscript not finding LucidaSans

2010-06-27 Thread Pietro Gagliardi
Actually, on further investigation it turns out while dircp /n/sources/ 
plan9/sys/lib/postscript dir works fine, diff -r dir /n/sources/plan9/ 
sys/lib/postscript gives me the same diff log, and diff -r dir olddir  
tells me they're identical. So what's going on here...




Re: [9fans] ghostscript not finding LucidaSans

2010-06-27 Thread Pietro Gagliardi

On Jun 28, 2010, at 12:40 AM, erik quanstrom wrote:

guess i forgot the "bind /tmp /sys/lib/lp/tmp".  lp is
pretty complicated.

- erik



Thanks, now it worked. I decided to investigate the issue further with  
what you gave me and I found that all I needed to get it to work was the

bind /n/sources/plan9/sys /sys
and further constrained that to
bind /n/sources/plan9/sys/lib/postscript/ /sys/lib/postscript/
However, overwriting my /sys/lib/postscript with the one from sources  
did not fix the problem. Is there some fundamental difference between  
binding and copying that I'm overlooking or just some weird behavior  
in ghostscript that is causing this to happen?


The diff output from comparing the two directories:

diff /sys/lib/postscript//troff/HX /n/sources/plan9/sys/lib/ 
postscript//troff/HX

1c1
< 0x 0x00ff Helvetica-Narrow-BoldOblique
---
> 0x 0x00ff Helvetica-BoldOblique
Only in /n/sources/plan9/sys/lib/postscript//troff: Hx




Re: [9fans] ghostscript not finding LucidaSans

2010-06-27 Thread erik quanstrom
> On Jun 27, 2010, at 9:56 PM, erik quanstrom wrote:
> > i can't reproduce your results:
> Huh. Using your suggested command line I get the following:

guess i forgot the "bind /tmp /sys/lib/lp/tmp".  lp is
pretty complicated.

- erik



Re: [9fans] ghostscript not finding LucidaSans

2010-06-27 Thread Pietro Gagliardi

On Jun 27, 2010, at 9:56 PM, erik quanstrom wrote:

i can't reproduce your results:

Huh. Using your suggested command line I get the following:

converting from troff to postscript...
/tmp/lp174: rc (generic): can't open: '/tmp/lp174' permission denied
reading through postscript...
cannot find end of first line

I'm not sure if this has to do with 9vx... in fact I'm not sure  
exactly what's causing these things to behave as they are now. What I  
can say is that to set this environment up I just copied the contents  
of the Plan 9 CD to a folder, put the built-from-source 9vx into that  
folder, logged in as glenda, ran

mkdir /usr/pietro
(since fscons obviously isn't there), logged in as pietro, and ran
/sys/lib/newuser




Re: [9fans] ghostscript not finding LucidaSans

2010-06-27 Thread erik quanstrom
> Ghostscript Error:
> postnote 404: sys: write on closed pipe pc=0x0001f8fc
> Fontmap entry for LucidaSans ends prematurely!  Giving up.
> 
> I don't understand what's going on here but as far as I can tell /sys/ 
> lib/postscript/fonts/LucidaSans has never existed in the Plan 9  
> directory tree (checking sourcesdump) and my old VM works fine without  
> it. Anyone know what's going on here? Thanks.

no, it never did.  

 ; find /sys/lib|grep 'LucidaSans$'
/sys/lib/postscript/troff/LucidaSans
/sys/lib/troff/font/devutf/LucidaSans

i can't reproduce your results:

ladd; bind -b /n/sources/plan9/386/bin /bin
ladd; bind -b /n/sources/plan9/rc/bin /bin
ladd; bind /n/sources/plan9/lib /lib
ladd; bind /n/sources/plan9/sys /sys
ladd; ramfs
ladd; mkdir /tmp/x
ladd; bind /tmp/x /sys/lib/lp/log
ladd; touch /tmp/x/stdout; chmod +a /tmp/x/stdout
ladd; echo hello | troff | page

- erik