9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] plan 9 ports to unix (including libdraw)
@ 2003-10-13 18:31 Russ Cox
  2003-10-13 21:34 ` Caerwyn Jones
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Russ Cox @ 2003-10-13 18:31 UTC (permalink / raw)
  To: 9fans

I've been using Unix (FreeBSD) for day-to-day work for a few
weeks now, and have started to bring over some Plan 9 tools to make
life a bit more hospitable.

Mk was already done, and Scott Schwartz did sam over the summer.

As I mentioned before, I did a fairly complete libdraw port
that is enough to compile samterm almost unchanged from the
current sources (the only real change was to use a named
pipe instead of /srv for the B file).

It has been working pretty well for me on FreeBSD and for
Rob on Mac OS X.  I tested it on Linux but haven't exercised
it very much.

This morning I compiled my crossword puzzle player without
any changes -- just worked (well, except for a little bug in the
libdraw port which I fixed).  I am hopeful about other things
compiling easily.

I'd love to see the plumber and acme made to work, though that
will require some reengineering to eliminate dependence on Plan 9
features.  I'm not likely to have time in the near future, though.
If anyone is interested and has time to hack, I'd be happy to do
a brain dump.

On a similar note, I have a 9P2000 drawterm that is very very alpha.
If you have time to bang on it, I'd be happy to share.  It's not
quite ready for regular use though.  Email me off-list.

http://pdos.lcs.mit.edu/~rsc/software/plan9/

Russ


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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-13 18:31 [9fans] plan 9 ports to unix (including libdraw) Russ Cox
@ 2003-10-13 21:34 ` Caerwyn Jones
  2003-10-14  0:53 ` arisawa
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Caerwyn Jones @ 2003-10-13 21:34 UTC (permalink / raw)
  To: 9fans

>
> I'd love to see the plumber and acme made to work, though that
> will require some reengineering to eliminate dependence on Plan 9
> features.  I'm not likely to have time in the near future, though.
> If anyone is interested and has time to hack, I'd be happy to do
> a brain dump.

I have a plumber that reads from a named pipe and is single threaded.
I'll post it when I get it to compile with your latest plan9 lib ports.

-Caerwyn




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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-13 18:31 [9fans] plan 9 ports to unix (including libdraw) Russ Cox
  2003-10-13 21:34 ` Caerwyn Jones
@ 2003-10-14  0:53 ` arisawa
  2003-10-14 18:09 ` andrey mirtchovski
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: arisawa @ 2003-10-14  0:53 UTC (permalink / raw)
  To: 9fans

Thanks Russ for your porting Plan 9 tools.
I have downloaded and compiled.

It seems the absence of a directory plan9/lib causes
compile error.

Kenji Arisawa



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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-13 18:31 [9fans] plan 9 ports to unix (including libdraw) Russ Cox
  2003-10-13 21:34 ` Caerwyn Jones
  2003-10-14  0:53 ` arisawa
@ 2003-10-14 18:09 ` andrey mirtchovski
  2003-10-14 18:10 ` andrey mirtchovski
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: andrey mirtchovski @ 2003-10-14 18:09 UTC (permalink / raw)
  To: 9fans

Just for fun I tried compiling my xscr ports for linux/fbsd using your
plan9.tar.gz port...

Here's what I had to add in order to get them going, cvs diff against
the current repository (unchanged parts skipped):

cvs server: Diffing include
Index: include/lib9.h
===================================================================
RCS file: /cvs/plan9/include/lib9.h,v
retrieving revision 1.4
diff -r1.4 lib9.h
296a297,301
>
> #define       HUGE    3.4028234e38
> #define       PIO2    1.570796326794896619231e0
> #define       PI      (PIO2+PIO2)
>
cvs server: Diffing src/lib9
Index: src/lib9/Makefile
===================================================================
RCS file: /cvs/plan9/src/lib9/Makefile,v
retrieving revision 1.6
diff -r1.6 Makefile
21a22,23
>       lrand.$O\
>       frand.$O\



both lrand and frand are from /sys/src/libc/port, with the definition of
'srand' in lrand commented out -- it just uses the unix libc one by default.

andrey



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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-13 18:31 [9fans] plan 9 ports to unix (including libdraw) Russ Cox
                   ` (2 preceding siblings ...)
  2003-10-14 18:09 ` andrey mirtchovski
@ 2003-10-14 18:10 ` andrey mirtchovski
  2003-10-17  2:53 ` Richard C Bilson
  2003-11-26 16:03 ` [9fans] ppp modem connection John P. Cummings
  5 siblings, 0 replies; 16+ messages in thread
From: andrey mirtchovski @ 2003-10-14 18:10 UTC (permalink / raw)
  To: 9fans


that was supposed to go just to russ, sorry...

ps: USED() in Plan 9 accepts more than one argument, USED() in unix' plan9
libs does not..



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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-13 18:31 [9fans] plan 9 ports to unix (including libdraw) Russ Cox
                   ` (3 preceding siblings ...)
  2003-10-14 18:10 ` andrey mirtchovski
@ 2003-10-17  2:53 ` Richard C Bilson
  2003-10-17  3:02   ` William Josephson
                     ` (3 more replies)
  2003-11-26 16:03 ` [9fans] ppp modem connection John P. Cummings
  5 siblings, 4 replies; 16+ messages in thread
From: Richard C Bilson @ 2003-10-17  2:53 UTC (permalink / raw)
  To: 9fans

To avoid unnecessary duplication of effort, let me note that I'm very
close to having the unix ports running on sparc solaris.

It's been pretty straightforward -- most of what I have so far was
done in an afternoon.  Right now, however, my threads crap out on the
first call to a shared library.  I may have to spend some time
learning more about the dynamic linker than I ever wanted to know
(although, it's possible that I've simply misread the abi *again*).

If anyone feels like poking at it I can send files and diffs.

Kudos to Russ.  The ports are already making life better for me on
Linux/386.



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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17  2:53 ` Richard C Bilson
@ 2003-10-17  3:02   ` William Josephson
  2003-10-17  9:42   ` a
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: William Josephson @ 2003-10-17  3:02 UTC (permalink / raw)
  To: 9fans

On Thu, Oct 16, 2003 at 10:53:33PM -0400, Richard C Bilson wrote:
> Kudos to Russ.  The ports are already making life better for me on
> Linux/386.

I just hope we can settle on a definitive port.  I've done three
myself of the same bits (save for libdraw) and Russ has done a few
previously, too.  Every time I've thought it was much better than the
last, yet there's always another.


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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17  2:53 ` Richard C Bilson
  2003-10-17  3:02   ` William Josephson
@ 2003-10-17  9:42   ` a
  2003-10-17 14:30   ` Joel Salomon
  2003-10-17 17:25   ` Roman Shaposhnick
  3 siblings, 0 replies; 16+ messages in thread
From: a @ 2003-10-17  9:42 UTC (permalink / raw)
  To: 9fans

of late i've been assuming context of things i read a lot, and letting
that overwrite what the message actually says. it's caused problems. i
think my head's broke. so when i read:
   ...close to having the unix ports running on sparc solaris.
somewhere between my eyes and my brain "unix" turned into "plan 9". i
got *really* excited for a few seconds. :-(
ア


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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17  2:53 ` Richard C Bilson
  2003-10-17  3:02   ` William Josephson
  2003-10-17  9:42   ` a
@ 2003-10-17 14:30   ` Joel Salomon
  2003-10-17 14:38     ` Joel Salomon
  2003-10-17 17:25   ` Roman Shaposhnick
  3 siblings, 1 reply; 16+ messages in thread
From: Joel Salomon @ 2003-10-17 14:30 UTC (permalink / raw)
  To: 9fans

I've managed to compile most of the port under cygwin.

cp Make.FreeBSD-386 Make.CYGWIN_NT-5.0-386

in libthread/label.h, change:
 #if defined (__i386__) && (defined(__FreeBSD__) || defined(__linux__))
to:
 #if defined (__i386__) && (defined(__FreeBSD__) || defined(__linux__) || \
 defined(__CYGWIN__))

cp asm-Linux-386.s asm-CYGWIN_NT-5.0-386.s

in lib9:
cp ffork-Darwin.c ffork-CYGWIN_NT-5.0.c
cp rendez-Darwin.c rendez-CYGWIN_NT-5.0.c
(cygwin provides pthreads, so I'm using that interface)

Compiling sam fails, though, with:
disk.o(.text+0x27c): In function `diskwrite':
/yadda yadda/plan9/src/cmd/sam/disk.c:108: undefined reference to `_pwrite'
disk.o(.text+0x31e): In function `diskread':
/yadda yadda/plan9/src/cmd/sam/disk.c:120: undefined reference to `_pread'

Haven't been able to test anything yet.

When a windows port is started, I'll try libdraw under mingw. Some of the
rest compiles, but I can't remember which parts.

> Kudos to Russ.
Seconded.

--Joel


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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17 14:30   ` Joel Salomon
@ 2003-10-17 14:38     ` Joel Salomon
  2003-10-17 23:57       ` Bruce Ellis
  0 siblings, 1 reply; 16+ messages in thread
From: Joel Salomon @ 2003-10-17 14:38 UTC (permalink / raw)
  To: 9fans

> I've managed to compile most of the port under cygwin.
<snip>
> Haven't been able to test anything yet.

Well I have now...

cd src/libthread; make tprimes
gives a slew of errors. maybe cygwin really doesn't have pthreads (though
the headers are there) or it could be a linker problem. I'm getting *lots*
of "undefined reference to foo" messages.

Anyone have better luck?

--Joel


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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17  2:53 ` Richard C Bilson
                     ` (2 preceding siblings ...)
  2003-10-17 14:30   ` Joel Salomon
@ 2003-10-17 17:25   ` Roman Shaposhnick
  2003-10-17 18:00     ` matt
  3 siblings, 1 reply; 16+ messages in thread
From: Roman Shaposhnick @ 2003-10-17 17:25 UTC (permalink / raw)
  To: 9fans

Speaking of ports -- I have had this idea for a long time to hack
xterm (or rxvt) and make them understand plumbing the way rio does.
It shouldn't be too hard, and I'm just curious whether somebody
else has thought of it already.

Comments ?

Thanks,
Roman.

On Thu, Oct 16, 2003 at 10:53:33PM -0400, Richard C Bilson wrote:
> To avoid unnecessary duplication of effort, let me note that I'm very
> close to having the unix ports running on sparc solaris.
>
> It's been pretty straightforward -- most of what I have so far was
> done in an afternoon.  Right now, however, my threads crap out on the
> first call to a shared library.  I may have to spend some time
> learning more about the dynamic linker than I ever wanted to know
> (although, it's possible that I've simply misread the abi *again*).
>
> If anyone feels like poking at it I can send files and diffs.
>
> Kudos to Russ.  The ports are already making life better for me on
> Linux/386.
>


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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17 17:25   ` Roman Shaposhnick
@ 2003-10-17 18:00     ` matt
  2003-10-17 18:06       ` Roman Shaposhnick
  0 siblings, 1 reply; 16+ messages in thread
From: matt @ 2003-10-17 18:00 UTC (permalink / raw)
  To: 9fans

> make them understand plumbing the way rio does.

rio doesn't understand plumbing



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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17 18:00     ` matt
@ 2003-10-17 18:06       ` Roman Shaposhnick
  2003-10-17 21:16         ` matt
  0 siblings, 1 reply; 16+ messages in thread
From: Roman Shaposhnick @ 2003-10-17 18:06 UTC (permalink / raw)
  To: 9fans

On Fri, Oct 17, 2003 at 07:00:25PM +0100, matt@proweb.co.uk wrote:
> > make them understand plumbing the way rio does.
>
> rio doesn't understand plumbing

  sure it does -- otherwise you won't be able to select something
  and tell it "plumb this".

Roman.


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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17 18:06       ` Roman Shaposhnick
@ 2003-10-17 21:16         ` matt
  0 siblings, 0 replies; 16+ messages in thread
From: matt @ 2003-10-17 21:16 UTC (permalink / raw)
  To: 9fans

Maybe I should read the ported libs

Perhaps I interpret your 'understand' too deeply.

#include <plumb.h>
Plumbmsg *m;
m = emalloc(sizeof(Plumbmsg));
.. fill m
plumbsend(fd, m)


m


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

* Re: [9fans] plan 9 ports to unix (including libdraw)
  2003-10-17 14:38     ` Joel Salomon
@ 2003-10-17 23:57       ` Bruce Ellis
  0 siblings, 0 replies; 16+ messages in thread
From: Bruce Ellis @ 2003-10-17 23:57 UTC (permalink / raw)
  To: 9fans

you'll find somewhere in the cygwin pthread headers a comment along
the lines of "we don't really support pthreads because we can't swap
stacks".  i didn't look into it any further.

brucee
> cd src/libthread; make tprimes
> gives a slew of errors. maybe cygwin really doesn't have pthreads (though
> the headers are there) or it could be a linker problem. I'm getting *lots*
> of "undefined reference to foo" messages.
>
> Anyone have better luck?
>
> --Joel



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

* [9fans] ppp modem connection
  2003-10-13 18:31 [9fans] plan 9 ports to unix (including libdraw) Russ Cox
                   ` (4 preceding siblings ...)
  2003-10-17  2:53 ` Richard C Bilson
@ 2003-11-26 16:03 ` John P. Cummings
  5 siblings, 0 replies; 16+ messages in thread
From: John P. Cummings @ 2003-11-26 16:03 UTC (permalink / raw)
  To: 9fans



hi-

i'm having problems setting up a ppp connection.  i'm using a xircom
56k pc card modem on my thinkpad t22.  it didn't seem to be recognized
at first, so i went ahead as if i knew what i was doing and added
"XM5600" from it's idstr to the list of modem in pcmciamodem.c.  it
seems to work, the modem is recognized, and i can dial out.  i think
my problems are related to my ignorance of network configuration in
plan9.  here is some random output from my attempts, if i can send
anything else, please let me know.


term% ip/ppp -Pufb 115200 -p /dev/eia1
Connect to file system now, type ctrl-d when done.
...(Use the view or down arrow key to send a break)
...(Use ctrl-e to set even parity or ctrl-o for odd)
 at
OK
atdt2441500
CONNECT 41333

Enter username> cummij
\aEnter user password>
                     Rensselaer Term. Serv. (Jan2000) - RTS8



Searching for script file. Please wait...
####################################################################
You have connected to the New Xyplex Service (released Sept 98).
For more instructions, enter the following command (including quotes):
    script "fullmessage"
or enter a connection command now.

#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%
#%#%  NOTE: Connection duration is now limited to 6 hours.  #%#%
#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%

\a\a\a\a
Port:rts8-9-OK> set port ppp enable~€}#€!}!}!} }4}"}&} } } } }%} 
&})}"€€}'}"}(}"€5~~€}#€!}!}"} }4}"}&} } } } }%}&})}"€€}'}"}(}"B€~~€}#€!}!}#} } 
4}"}&} } } } }%}&})}"€€}'}"}(}"}+};~~€}#€!}!}$} }4}"}&} } } } }%}&})}"€€}'}"} 
(}"€€~
term%
term% cat /net/ndb
ip=128.113.29.158 ipmask=255.255.255.255 ipgw=128.113.29.217
	dns=128.113.26.77	dns=128.113.28.67term%
term%
term% ip/ping 128.113.29.217
sending 32 64 byte messages 1000 ms apart
# long wait here
term% ls /net/tcp
/net/tcp/0
/net/tcp/clone
/net/tcp/stats
term% cat /net/tcp/0/remote
128.113.28.67!32767
term% ip/traceroute 128.113.29.217
trying /net/tcp!128.113.29.217!32767

                       round trip times in µs
                        low      avg     high
                     --------------------------
*
*
term% cat /net/tcp/0/remote
128.113.29.217!32767
term%


any help would be greatly appreciated.

john

--

John P. Cummings
cummij@rpi.edu
office: 518 276 2542
fax:    518 276 6680


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

end of thread, other threads:[~2003-11-26 16:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-13 18:31 [9fans] plan 9 ports to unix (including libdraw) Russ Cox
2003-10-13 21:34 ` Caerwyn Jones
2003-10-14  0:53 ` arisawa
2003-10-14 18:09 ` andrey mirtchovski
2003-10-14 18:10 ` andrey mirtchovski
2003-10-17  2:53 ` Richard C Bilson
2003-10-17  3:02   ` William Josephson
2003-10-17  9:42   ` a
2003-10-17 14:30   ` Joel Salomon
2003-10-17 14:38     ` Joel Salomon
2003-10-17 23:57       ` Bruce Ellis
2003-10-17 17:25   ` Roman Shaposhnick
2003-10-17 18:00     ` matt
2003-10-17 18:06       ` Roman Shaposhnick
2003-10-17 21:16         ` matt
2003-11-26 16:03 ` [9fans] ppp modem connection John P. Cummings

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).