9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] using plan 9 libraries on unix
@ 2003-12-02 16:11 Caerwyn B Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Caerwyn B Jones @ 2003-12-02 16:11 UTC (permalink / raw)
  To: 9fans


Change font using the font env variable, e.g.,
font=/usr/local/plan9/font/pelm/unicode.9.font

I'm also on sun4u. I get different behaviour from 9term depending on the
font. With pelm everything works.
But if I try lucida or lucm it freezes after the output from the first
command.

-Caerwyn





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] using plan 9 libraries on unix
  2003-12-02 15:15   ` Russ Cox
@ 2003-12-03  2:15     ` boyd, rounin
  0 siblings, 0 replies; 6+ messages in thread
From: boyd, rounin @ 2003-12-03  2:15 UTC (permalink / raw)
  To: 9fans

9term was awful.  what? one ioctl() per char?

now nobody cares, but when it was released those instructions counted.

the ultrix pty interface saved a lotta system calls.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] using plan 9 libraries on unix
  2003-12-02 13:42 ` mirtchov
@ 2003-12-02 15:15   ` Russ Cox
  2003-12-03  2:15     ` boyd, rounin
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2003-12-02 15:15 UTC (permalink / raw)
  To: 9fans

> I don't think 9term is supported as an official Plan 9 software on UNIX.
>
> See here for possible answers:
>
> 	http://www.cs.usyd.edu.au/~matty/9term/

There is a 9term in the "ported libraries and software" bundle that
I've been maintaining, mainly thanks to Caerwyn Jones and
Richard Bilson.  It seems not to cope well with some common
terminal things (I manage to wedge it on FreeBSD after only
a few minutes of use).  On SunOS things are even worse, because
something is amiss in the thread library but I don't know what.

So the answer to the original question is "I don't know why
9term is crashing".  There's still debugging to be done.

Russ


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [9fans] using plan 9 libraries on unix
@ 2003-12-02 13:47 arcadi
  2003-12-02 13:42 ` mirtchov
  0 siblings, 1 reply; 6+ messages in thread
From: arcadi @ 2003-12-02 13:47 UTC (permalink / raw)
  To: 9fans

Hello, 

how do I fix  suicide of 9term with the error message 
(I have SunOS - sun4u architecture ) 

alarm clock

after several tries it dies like that: 

moribund 239520
sched.c:48: failed assertion `t->moribund == 1'
abort--core dumped
 
also, how do I set up sam and 9term using fonts that are provided with port 

Thanks , 
arcadi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] using plan 9 libraries on unix
  2003-12-02 13:47 arcadi
@ 2003-12-02 13:42 ` mirtchov
  2003-12-02 15:15   ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: mirtchov @ 2003-12-02 13:42 UTC (permalink / raw)
  To: 9fans

I don't think 9term is supported as an official Plan 9 software on UNIX.

See here for possible answers:

	http://www.cs.usyd.edu.au/~matty/9term/

andrey



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] using plan 9 libraries on unix
  2003-11-30  1:48 [9fans] A question for Russ Ishwar Rattan
@ 2003-11-30 14:18 ` Russ Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Russ Cox @ 2003-11-30 14:18 UTC (permalink / raw)
  To: 9fans

> How does one the use Plan 9 libraries under Linux
> after installation in /usr/local/Plan9?

I'm assuming you built and installed them (see /usr/local/plan9/NOTES).

In your environment set

	PLAN9=/usr/local/plan9 export PLAN9
	PATH=$PATH:/usr/local/plan9/bin export PATH

Then you'll have 9c, 9a, 9l, and 9ar that are
shell scripts around the system tools to make
them behave mostly like the Plan 9 tools.

So

	cat >x.c <<EOF
	#include <u.h>
	#include <libc.h>

	void
	main(void)
	{
		print("hello, world\n");
	}
	EOF
	9c x.c
	9l x.o
	./a.out

You can use mkfiles too, with minimal changes.
Instead of </$objtype/mkfile use <$PLAN9/src/mkhdr
and instead of </sys/src/cmd/mkone use <$PLAN9/src/mkone.
Ditto for mkmany, mksyslib.

<u.h> is an empty file, but <libc.h> (really <lib9.h>)
does not play nicely with the other headers.  It #defines
a few things to make the compilation world look
like Plan 9.  If you want to include other system
headers, you're likely to have to

	#define NOPLAN9DEFINES
	#include <u.h>
	#include <libc.h>
	#include <other headers>

and then put p9 at the beginning of calls to the various
renamed functions (e.g., p9wait, p9dup, p9open).
I am not happy with this, but there's no easy
way around it.  At some point I might shift things
around so you can say

	#include <u.h>
	#include <other headers>
	#include <libc.h>

The problem with doing that now is that libc.h defines
things like _POSIX_SOURCE and _BSD_SOURCE, which cause
headers like <sys/types.h> to behave differently.
If the other headers have already included <sys/types.h>
then when libc.h includes it, it will be a no-op and
not set things up as expected.  If I move all the _POSIX_SOURCE
and such into <u.h> then the above example would work.
In general I don't mix these in the same file (except
in the implementation of lib9) so it's not an issue.

Russ


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-12-03  2:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-02 16:11 [9fans] using plan 9 libraries on unix Caerwyn B Jones
  -- strict thread matches above, loose matches on Subject: below --
2003-12-02 13:47 arcadi
2003-12-02 13:42 ` mirtchov
2003-12-02 15:15   ` Russ Cox
2003-12-03  2:15     ` boyd, rounin
2003-11-30  1:48 [9fans] A question for Russ Ishwar Rattan
2003-11-30 14:18 ` [9fans] using plan 9 libraries on unix Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).