On Tue, Jun 26, 2012 at 01:42:11PM +0200, Pascal Stumpf wrote:
> On Tue, 26 Jun 2012 12:55:37 +0200, Landry Breuil wrote:
> > On Sat, May 26, 2012 at 02:57:48PM +0200, Pascal Stumpf wrote:
> > > Plan 9 is a distributed computing environment built at Bell Labs
> > > starting in the late 1980s. The system can be obtained from Bell
> > > Labs at http://plan9.bell-labs.com/plan9 and runs on PCs and a
> > > variety of other platforms. Plan 9 became a convenient platform for
> > > experimenting with new ideas, applications, and services.
> > > 
> > > Plan 9 from User Space provides many of the ideas, applications,
> > > and services from Plan 9 on Unix-like systems. It runs on FreeBSD
> > > (x86), Linux (x86 and PowerPC), Mac OS X (PowerPC), OpenBSD (x86),
> > > and SunOS (Sparc).
> > > 
> > > 
> > > 
> > > This has been in openbsd-wip for a while.  With the exception of 9pfuse,
> > > it is mostly functional (needs rthreads), but it still needs testing on
> > > powerpc.  It installs into its own hierarchy in ${PREFIX}/plan9, with
> > > the '9' command symlinked to ${PREFIX}/bin.  If you want to use the
> > > Plan9 tools, you can either just use '9 [cmd]' or set PLAN9 in your
> > > environment to point to the root of the plan9port tree and put
> > > $PLAN9/bin into your PATH (in that case, be aware of the consequences
> > > though ...).
> > 
> > So after testing on ppc, it doesnt build there (see attached full log)
> > 
> > cd /usr/obj/ports/plan9port-20120508/plan9/src/libthread; mk all
> > 9c -O2 -pipe  -Wall -pthread OpenBSD-power-asm.S
> > OpenBSD-power-asm.S: Assembler messages:
> > OpenBSD-power-asm.S:103: Error: unsupported relocation against SYS_rfork
> > mk: 9c -O2 -pipe ...  : exit status=exit(1)
> > mk: for i in ...  : exit status=exit(1)
> > 
> > Not 100% uptodate but i have rthreads there:
> > OpenBSD 5.1-current (GENERIC) #201: Wed Jun  6 14:56:55 MDT 2012
> >     dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
> > 
> > interestingly, even if the build fails it proceeds to fake step, so
> > thebuild system doesnt properly report errors..
> 
> Strange.  I just put some errors into libthread/*, and it stopped there.
> Anyway, the actual error you saw was because rfork got removed; but
> since it's not used anyway, we can just remove the whole function.
> 
> > I also noted that during fake :
> > install -c -s -o root -g bin -m 555
> > /usr/ports/pobj/plan9port-20120508/plan9/bin/venti/*
> > /usr/ports/pobj/plan9port-20120508/fak
> > strip:
> > /usr/ports/pobj/plan9port-20120508/fake-amd64/usr/local/plan9/bin/venti/conf:
> > File format not recognized
> > 
> > 
> > It also needs no_regress=yes... or a proper do-regress target, if
> > there arectual tests.
> 
> Ok, fixed these.

Not there yet, but we're close :
Error: 
/usr/obj/ports/plan9port-20120508/fake-macppc/usr/local/plan9/src/libmach/elfcorefreebsdpowerpc.c
 does not exist
Error: 
/usr/obj/ports/plan9port-20120508/fake-macppc/usr/local/plan9/src/libmach/machpowerpc.c
 does not exist
Error: 
/usr/obj/ports/plan9port-20120508/fake-macppc/usr/local/plan9/src/libmach/uregpowerpc.h
 does not exist

--- pkg/PLIST   Fri May 11 15:34:55 2012
+++ /tmp/PLIST-ppc      Tue Jun 26 15:18:43 2012
@@ -7171,7 +7171,7 @@
 plan9/src/libmach/elf.h
 plan9/src/libmach/elfcore.h
 plan9/src/libmach/elfcorefreebsd386.c
-plan9/src/libmach/elfcorefreebsd${MACHINE_ARCH}.c
+plan9/src/libmach/elfcorefreebsdamd64.c
 plan9/src/libmach/elfcorelinux386.c
 plan9/src/libmach/elfdl386.c
 plan9/src/libmach/elfdump.c
@@ -7186,7 +7186,7 @@
 plan9/src/libmach/loc.c
 plan9/src/libmach/localaddr.c
 plan9/src/libmach/mach386.c
-plan9/src/libmach/mach${MACHINE_ARCH}.c
+plan9/src/libmach/machamd64.c
 plan9/src/libmach/macho.c
 plan9/src/libmach/macho.h
 plan9/src/libmach/machocorepower.c
@@ -7211,7 +7211,7 @@
 plan9/src/libmach/t.c
 plan9/src/libmach/ureg386.c
 plan9/src/libmach/ureg386.h
-plan9/src/libmach/ureg${MACHINE_ARCH}.h
+plan9/src/libmach/uregamd64.h
 plan9/src/libmach/uregpower.h
 plan9/src/libmemdraw/
 plan9/src/libmemdraw/alloc-stub.c
@@ -7502,6 +7502,7 @@
 plan9/src/libthread/OpenBSD-386-asm.S
 plan9/src/libthread/OpenBSD-386.c
 plan9/src/libthread/OpenBSD-power-asm.S
+plan9/src/libthread/OpenBSD-power-asm.S.orig
 plan9/src/libthread/OpenBSD-power.c

So those 3 amd64 files are actually installed on ppc, no need for
MACHINE_ARCH since uregpower.h and machpower.c are the ppc-dependent
files..

You can also remove the *.orig files as a bonus to avoid confusing make
update-plist.

54112353 /usr/ports/packages/powerpc/all/plan9port-20120508.tgz
Quite huge.. :)

Basic testing of some cli apps seems to work fine, but it seems any app doing
thread stuff (9term, acme, sam..) explodes.

$9 sam
already pinning a thread - 827ae000 827ae000
already pinning a thread - 827ae000 0
assertion "0" failed: file "thread.c", line 276, function "threadpin"  

$9 dns
dns: can't read my ip address

$sudo 9 stats
Segmentation fault

$sudo 9 Mail
warning: open plumb/send: mount plumb: dial
unix!/tmp/ns.root.localhost:10/plumb: connect
/tmp/ns.root.localhost:10/plumb: No such file or directory
warning: open plumb/seemail: mount plumb: dial
unix!/tmp/ns.root.localhost:10/plumb: connect
/tmp/ns.root.localhost:10/plumb: No such file or directory
warning: open plumb/showmail: mount plumb: dial
unix!/tmp/ns.root.localhost:10/plumb: connect
/tmp/ns.root.localhost:10/plumb: No such file or directory
Mail: cannot mount acme: dial unix!/tmp/ns.root.localhost:10/acme:
connect /tmp/ns.root.localhost:10/acme: No such file or
directory 

9 B does the same..
$sudo 9 B Makefile
plumb: can't open plumb file: dial unix!/tmp/ns.root.localhost:10/plumb:
connect /tmp/ns.root.localhost:10/plumb: No such file or directory

I guess the last one is normal since it needs 'plumbing'..

portswise, if the threading crash is fixed i'd say we're good to import
with the PLIST fix. The other issues can be fixed later.

Landry

Reply via email to