9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] native (mostly) go for plan9
@ 2011-10-31 15:11 ron minnich
  2011-10-31 16:41 ` Stanley Lieber
  2011-11-01 16:57 ` Skip Tavakkolian
  0 siblings, 2 replies; 28+ messages in thread
From: ron minnich @ 2011-10-31 15:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

A number of us have been working on a native Go port for plan 9.

The big goal is to do this in a way that makes tracking Go source a
non-problem, and to eventually just have these changes part of the
standard Go tree, so there is no work at all.

we're pretty close, thanks to previous work others have done on the Go port.

You can try it.

Right now, due to a few bison and bash dependencies, there are files
we can not generate. These are supplied as part of the repo.

cd
hg clone https://code.google.com/p/rminnich-9go go
bind -ac . /
cd /go
cd 9/prebuilt
rc install
cd /go/src
mk install

You've now got all commands and the toolchain. Now you can help us fix this:

goinstall bitbucket.org/rminnich/forth (or any package)

fails with an odd error. use ratrace -c on that command to see what
sequence produces this error.

Be sure to use the google code tools to mark bugs and submit fixes.

I am going to be doing an update from the main go tree into this repo
soon. This will likely break things. This working branch will be
tagged 'audrey'.

thanks

ron



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 15:11 [9fans] native (mostly) go for plan9 ron minnich
@ 2011-10-31 16:41 ` Stanley Lieber
  2011-10-31 16:51   ` andrey mirtchovski
  2011-10-31 17:08   ` ron minnich
  2011-11-01 16:57 ` Skip Tavakkolian
  1 sibling, 2 replies; 28+ messages in thread
From: Stanley Lieber @ 2011-10-31 16:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 10:11 AM, ron minnich <rminnich@gmail.com> wrote:

[snip]

> You can try it.

Thanks, Ron.

I ran into some problems:

piro% cd
piro% ls
acme.dump
bin
books
dump
go
gout
img
lib
mkfile
paint
tmp
piro% bind -ac . /
piro% cd /go
piro% cd 9/prebuilt
piro% rc install
piro% cd /go/src
piro% mk install
cmd
cc
warning: skipping missing include file: /src/9bootstrap.mk: '/src'
directory entry not found
ar vu cc.a8 y.tab.8 lex.8 mac.8 dcl.8 acid.8 godefs.8 bits.8 com.8
scon.8 funct.8 sub.8 com64.8 dpchk.8 omachcap.8
gc
warning: skipping missing include file: /src/9bootstrap.mk: '/src'
directory entry not found
$HOST_CC '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
'-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
../../lib9/goos.c
rc: null list in concatenation
mk: $HOST_CC '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"' ...  : exit
status=rc 4238: error
mk: for (i in ...  : exit status=rc 4227: rc 4235: mk 4237: error
mk: for (i in ...  : exit status=rc 4219: rc 4221: mk 4223: error
piro% grep -e '\/src' *
Make.cmd:include $(QUOTED_GOROOT)/src/Make.common
Make.pkg:include $(QUOTED_GOROOT)/src/Make.common
all.bash:	echo 'all.bash must be run from $GOROOT/src' 1>&2
clean.bash:	echo 'clean.bash must be run from $GOROOT/src' 1>&2
clean.bash:	$MAKE -C "$GOROOT/src/$i" clean
ditunix:(cd $GOROOT/src/libbio && make install)
ditunix:(cd $GOROOT/src/lib9 &&  make install)
ditunix:(cd $GOROOT/src/./cmd/6l && sh -x ./ditunix)
ditunix:(cd $GOROOT/src/./cmd/8a && sh -x ./ditunix)
ditunix:(cd $GOROOT/src/./cmd/8l && sh -x ./ditunix)
ditunix:(cd $GOROOT/src/./cmd/cc && sh -x ./ditunix)
ditunix:(cd $GOROOT/src/./cmd/gc && sh -x ./ditunix)
ditunix:(cd $GOROOT/src/./pkg/ && sh ./deps.bash && cp Make.deps mk.deps)
make.bash:	echo 'make.bash must be run from $GOROOT/src' 1>&2
make.bash:sed -e "s|@CC@|$CC|" < "$GOROOT"/src/quietgcc.bash > "$GOBIN"/quietgcc
make.bash:	cd "$GOROOT"/src/pkg;
make.bash:bash "$GOROOT"/src/clean.bash
mk.cmd:< $GOROOT/src/mk.common
mk.pkg:< $GOROOT/src/mk.common
quietgcc.bash:# The master for this file is $GOROOT/src/quietgcc.bash
run.bash:	builtin cd "$GOROOT"/src/$1
sudo.bash:	sudo cp "$GOROOT"/src/cmd/$i/6$i /usr/local/bin/6$i
piro% GOROOT=/go
piro% mk install
cmd
cc
ar vu cc.a8 y.tab.8 lex.8 mac.8 dcl.8 acid.8 godefs.8 bits.8 com.8
scon.8 funct.8 sub.8 com64.8 dpchk.8 omachcap.8
gc
8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
'-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
../../lib9/goos.c
rc: null list in concatenation
mk: 8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"' ...  : exit
status=rc 4288: error
mk: for (i in ...  : exit status=rc 4253: rc 4273: mk 4275: error
mk: for (i in ...  : exit status=rc 4245: rc 4247: mk 4249: error

-sl



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 16:41 ` Stanley Lieber
@ 2011-10-31 16:51   ` andrey mirtchovski
  2011-10-31 17:08   ` ron minnich
  1 sibling, 0 replies; 28+ messages in thread
From: andrey mirtchovski @ 2011-10-31 16:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

did edit and run '. 9setup'?



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 16:41 ` Stanley Lieber
  2011-10-31 16:51   ` andrey mirtchovski
@ 2011-10-31 17:08   ` ron minnich
  2011-10-31 17:30     ` Stanley Lieber
  2011-11-01 10:41     ` Yaroslav
  1 sibling, 2 replies; 28+ messages in thread
From: ron minnich @ 2011-10-31 17:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

you forgot to
cd /go/src
. 9setup


On Mon, Oct 31, 2011 at 9:41 AM, Stanley Lieber
<stanley.lieber@gmail.com> wrote:
> On Mon, Oct 31, 2011 at 10:11 AM, ron minnich <rminnich@gmail.com> wrote:
>
> [snip]
>
>> You can try it.
>
> Thanks, Ron.
>
> I ran into some problems:
>
> piro% cd
> piro% ls
> acme.dump
> bin
> books
> dump
> go
> gout
> img
> lib
> mkfile
> paint
> tmp
> piro% bind -ac . /
> piro% cd /go
> piro% cd 9/prebuilt
> piro% rc install
> piro% cd /go/src
> piro% mk install
> cmd
> cc
> warning: skipping missing include file: /src/9bootstrap.mk: '/src'
> directory entry not found
> ar vu cc.a8 y.tab.8 lex.8 mac.8 dcl.8 acid.8 godefs.8 bits.8 com.8
> scon.8 funct.8 sub.8 com64.8 dpchk.8 omachcap.8
> gc
> warning: skipping missing include file: /src/9bootstrap.mk: '/src'
> directory entry not found
> $HOST_CC '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
> '-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
> ../../lib9/goos.c
> rc: null list in concatenation
> mk: $HOST_CC '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"' ...  : exit
> status=rc 4238: error
> mk: for (i in ...  : exit status=rc 4227: rc 4235: mk 4237: error
> mk: for (i in ...  : exit status=rc 4219: rc 4221: mk 4223: error
> piro% grep -e '\/src' *
> Make.cmd:include $(QUOTED_GOROOT)/src/Make.common
> Make.pkg:include $(QUOTED_GOROOT)/src/Make.common
> all.bash:       echo 'all.bash must be run from $GOROOT/src' 1>&2
> clean.bash:     echo 'clean.bash must be run from $GOROOT/src' 1>&2
> clean.bash:     $MAKE -C "$GOROOT/src/$i" clean
> ditunix:(cd $GOROOT/src/libbio && make install)
> ditunix:(cd $GOROOT/src/lib9 &&  make install)
> ditunix:(cd $GOROOT/src/./cmd/6l && sh -x ./ditunix)
> ditunix:(cd $GOROOT/src/./cmd/8a && sh -x ./ditunix)
> ditunix:(cd $GOROOT/src/./cmd/8l && sh -x ./ditunix)
> ditunix:(cd $GOROOT/src/./cmd/cc && sh -x ./ditunix)
> ditunix:(cd $GOROOT/src/./cmd/gc && sh -x ./ditunix)
> ditunix:(cd $GOROOT/src/./pkg/ && sh ./deps.bash && cp Make.deps mk.deps)
> make.bash:      echo 'make.bash must be run from $GOROOT/src' 1>&2
> make.bash:sed -e "s|@CC@|$CC|" < "$GOROOT"/src/quietgcc.bash > "$GOBIN"/quietgcc
> make.bash:      cd "$GOROOT"/src/pkg;
> make.bash:bash "$GOROOT"/src/clean.bash
> mk.cmd:< $GOROOT/src/mk.common
> mk.pkg:< $GOROOT/src/mk.common
> quietgcc.bash:# The master for this file is $GOROOT/src/quietgcc.bash
> run.bash:       builtin cd "$GOROOT"/src/$1
> sudo.bash:      sudo cp "$GOROOT"/src/cmd/$i/6$i /usr/local/bin/6$i
> piro% GOROOT=/go
> piro% mk install
> cmd
> cc
> ar vu cc.a8 y.tab.8 lex.8 mac.8 dcl.8 acid.8 godefs.8 bits.8 com.8
> scon.8 funct.8 sub.8 com64.8 dpchk.8 omachcap.8
> gc
> 8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
> '-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
> ../../lib9/goos.c
> rc: null list in concatenation
> mk: 8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"' ...  : exit
> status=rc 4288: error
> mk: for (i in ...  : exit status=rc 4253: rc 4273: mk 4275: error
> mk: for (i in ...  : exit status=rc 4245: rc 4247: mk 4249: error
>
> -sl
>
>



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 17:08   ` ron minnich
@ 2011-10-31 17:30     ` Stanley Lieber
  2011-10-31 17:41       ` andrey mirtchovski
  2011-11-01 10:41     ` Yaroslav
  1 sibling, 1 reply; 28+ messages in thread
From: Stanley Lieber @ 2011-10-31 17:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 12:08 PM, ron minnich <rminnich@gmail.com> wrote:
> you forgot to
> cd /go/src
> . 9setup

So did the instructions. :)

piro% cat 9setup
GOARCH=386
GOOS=plan9
GOVERSION=60.2
GOROOT=/go
piro% . 9setup
piro% mk install
cmd
cc
ar vu cc.a8 y.tab.8 lex.8 mac.8 dcl.8 acid.8 godefs.8 bits.8 com.8
scon.8 funct.8 sub.8 com64.8 dpchk.8 omachcap.8
gc
8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
'-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
../../lib9/goos.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include init.c
cpp: ./go.h:268 init.c:7 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DRunemax=0x10ffff' lex.c
cpp: ./go.h:268 lex.c:8 Unterminated string or char const
cpp: lex.c:105 Unterminated string or char const
cpp: lex.c:106 Unterminated string or char const
cpp: lex.c:257 Unterminated string or char const
cpp: lex.c:425 Unterminated string or char const
cpp: lex.c:467 Unterminated string or char const
cpp: lex.c:550 Unterminated string or char const
cpp: lex.c:1477 Unterminated string or char const
cpp: lex.c:1499 Unterminated string or char const
cpp: lex.c:1741 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include md5.c
cpp: ./go.h:268 md5.c:10 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include mparith1.c
cpp: ./go.h:268 mparith1.c:7 Unterminated string or char const
cpp: mparith1.c:477 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include mparith2.c
cpp: ./go.h:268 mparith2.c:7 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include mparith3.c
cpp: ./go.h:268 mparith3.c:7 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include obj.c
cpp: ./go.h:268 obj.c:7 Unterminated string or char const
cpp: obj.c:114 Unterminated string or char const
cpp: obj.c:136 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include print.c
cpp: ./go.h:268 print.c:7 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include range.c
cpp: ./go.h:268 range.c:11 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include reflect.c
cpp: ./go.h:268 reflect.c:7 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include select.c
cpp: ./go.h:268 select.c:11 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include sinit.c
cpp: ./go.h:268 sinit.c:11 Unterminated string or char const
cpp: sinit.c:300 Unterminated string or char const
cpp: sinit.c:301 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include subr.c
cpp: ./go.h:268 subr.c:7 Unterminated string or char const
cpp: subr.c:407 Unterminated string or char const
cpp: subr.c:1325 Unterminated string or char const
cpp: subr.c:1419 Unterminated string or char const
cpp: subr.c:1654 Unterminated string or char const
cpp: subr.c:1816 Unterminated string or char const
cpp: subr.c:1875 Unterminated string or char const
cpp: subr.c:1955 Unterminated string or char const
cpp: subr.c:1956 Unterminated string or char const
cpp: subr.c:2154 Unterminated string or char const
cpp: subr.c:3105 Unterminated string or char const
cpp: subr.c:3513 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include swt.c
cpp: ./go.h:268 swt.c:7 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include typecheck.c
cpp: ./go.h:268 typecheck.c:15 Unterminated string or char const
cpp: typecheck.c:417 Unterminated string or char const
cpp: typecheck.c:839 Unterminated string or char const
cpp: typecheck.c:842 Unterminated string or char const
cpp: typecheck.c:1774 Unterminated string or char const
cpp: typecheck.c:1793 Unterminated string or char const
cpp: typecheck.c:2566 Unterminated string or char const
cpp: typecheck.c:2585 Unterminated string or char const
cpp: typecheck.c:2719 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include unsafe.c
cpp: ./go.h:268 unsafe.c:7 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include walk.c
cpp: ./go.h:268 walk.c:7 Unterminated string or char const
cpp: walk.c:666 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include y1.tab.c
cpp: ./go.h:268 y1.tab.c:3 Unterminated string or char const
/go/src/cmd/gc/y.tab.c:1870[y1.tab.c:3895] function args not checked: yystrlen
/go/src/cmd/gc/y.tab.c:1872[y1.tab.c:3897] function args not checked: yystpcpy
/go/src/cmd/gc/y.tab.c:1931[y1.tab.c:3951] function args not checked: yystpcpy
/go/src/cmd/gc/y.tab.c:1947[y1.tab.c:3967] function args not checked: yystpcpy
/go/src/cmd/gc/y.tab.c:1952[y1.tab.c:3972] function args not checked: yystrlen
/go/src/cmd/gc/y.tab.c:5213[y1.tab.c:7199] function args not checked: yydestruct
/go/src/cmd/gc/y.tab.c:5269[y1.tab.c:7252] function args not checked: yydestruct
/go/src/cmd/gc/y.tab.c:5312[y1.tab.c:7292] function args not checked: yydestruct
/go/src/cmd/gc/y.tab.c:5320[y1.tab.c:7300] function args not checked: yydestruct
ar vu gc.a8 align.8 bits.8 builtin.8 closure.8 const.8 dcl.8 esc.8
export.8 gen.8 goos.8 init.8 lex.8 md5.8 mparith1.8 mparith2.8
mparith3.8 obj.8 print.8 range.8 reflect.8 select.8 sinit.8 subr.8
swt.8 typecheck.8 unsafe.8 walk.8 y1.tab.8
ar: creating gc.a8
a - align.8
a - bits.8
a - builtin.8
a - closure.8
a - const.8
a - dcl.8
a - esc.8
a - export.8
a - gen.8
a - goos.8
a - init.8
a - lex.8
a - md5.8
a - mparith1.8
a - mparith2.8
a - mparith3.8
a - obj.8
a - print.8
a - range.8
a - reflect.8
a - select.8
a - sinit.8
a - subr.8
a - swt.8
a - typecheck.8
a - unsafe.8
a - walk.8
a - y1.tab.8
8l
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include asm.c
cpp: ./../ld/pe.h:95 asm.c:38 Unterminated string or char const
cpp: asm.c:262 Unterminated string or char const
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/data.c
cpp: ../ld/../ld/pe.h:95 ../ld/data.c:36 Unterminated string or char const
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/dwarf.c
cpp: ../ld/../ld/dwarf_defs.h:5 ../ld/dwarf.c:18 Unterminated string
or char const
cpp: ../ld/../ld/pe.h:95 ../ld/dwarf.c:21 Unterminated string or char const
cpp: ../ld/dwarf.c:404 Unterminated string or char const
cpp: ../ld/dwarf.c:728 Unterminated string or char const
cpp: ../ld/dwarf.c:954 Unterminated string or char const
cpp: ../ld/dwarf.c:1194 Unterminated string or char const
cpp: ../ld/dwarf.c:1315 Unterminated string or char const
cpp: ../ld/dwarf.c:1506 Unterminated string or char const
cpp: ../ld/dwarf.c:1585 Unterminated string or char const
cpp: ../ld/dwarf.c:1613 Unterminated string or char const
cpp: ../ld/dwarf.c:1614 Unterminated string or char const
cpp: ../ld/dwarf.c:1702 Unterminated string or char const
cpp: ../ld/dwarf.c:1863 Unterminated string or char const
cpp: ../ld/dwarf.c:2235 Unterminated string or char const
cpp: ../ld/dwarf.c:2507 Unterminated string or char const
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/elf.c
cpp: ../ld/elf.c:85 Unterminated string or char const
ape/psh mkenam
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/go.c
cpp: ../ld/go.c:371 Unterminated string or char const
cpp: ../ld/go.c:409 Unterminated string or char const
8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
'-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
../../lib9/goos.c
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/ldelf.c
cpp: ../ld/ldelf.c:507 Unterminated string or char const
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/ldmacho.c
cpp: ../ld/ldmacho.c:540 Unterminated string or char const
cpp: ../ld/ldmacho.c:699 Unterminated string or char const
cpp: ../ld/ldmacho.c:703 Unterminated string or char const
cpp: ../ld/ldmacho.c:777 Unterminated string or char const
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/ldpe.c
cpp: ../ld/../ld/pe.h:95 ../ld/ldpe.c:7 Unterminated string or char const
cpp: ../ld/ldpe.c:386 Unterminated string or char const
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/lib.c
cpp: ../ld/../../pkg/runtime/stack.h:79 ../ld/lib.c:34 Unterminated
string or char const
cpp: ../ld/lib.c:275 Unterminated string or char const
cpp: ../ld/lib.c:277 Unterminated string or char const
cpp: ../ld/lib.c:1178 Unterminated string or char const
cpp: ../ld/lib.c:1203 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include list.c
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/macho.c
cpp: ../ld/macho.c:22 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include obj.c
cpp: ./../ld/pe.h:95 obj.c:39 Unterminated string or char const
cpp: obj.c:573 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include optab.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include pass.c
cpp: ./../../pkg/runtime/stack.h:79 pass.c:35 Unterminated string or char const
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/pe.c
cpp: ../ld/../ld/pe.h:95 ../ld/pe.c:10 Unterminated string or char const
cpp: ../ld/pe.c:646 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include prof.c
cpp: prof.c:39 Syntax error in #ifdef/#ifndef
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include span.c
cpp: span.c:1048 Unterminated string or char const
$(HOST_CC) $(HOST_CFLAGS) -I . -I../ld ../ld/symtab.c
cpp: ../ld/symtab.c:327 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include enam.c
8l  -o 8.out asm.8 data.8 dwarf.8 elf.8 enam.8 go.8 goos.8 ldelf.8
ldmacho.8 ldpe.8 lib.8 list.8 macho.8 obj.8 optab.8 pass.8 pe.8 prof.8
span.8 symtab.8 /386/lib/libbio.a
cp 8.out /386/bin/go/8l
cp: can't create /386/bin/go/8l: '/386/bin/go' does not exist
mk: cp 8.out /386/bin/go/8l  : exit status=rc 5019: cp 5021: errors
mk: for (i in ...  : exit status=rc 4801: rc 4914: mk 4916: error
mk: for (i in ...  : exit status=rc 4793: rc 4795: mk 4797: error
piro% mkdir /386/bin/go
piro% mk install
cmd
cc
ar vu cc.a8 y.tab.8 lex.8 mac.8 dcl.8 acid.8 godefs.8 bits.8 com.8
scon.8 funct.8 sub.8 com64.8 dpchk.8 omachcap.8
gc
ar vu gc.a8 align.8 bits.8 builtin.8 closure.8 const.8 dcl.8 esc.8
export.8 gen.8 goos.8 init.8 lex.8 md5.8 mparith1.8 mparith2.8
mparith3.8 obj.8 print.8 range.8 reflect.8 select.8 sinit.8 subr.8
swt.8 typecheck.8 unsafe.8 walk.8 y1.tab.8
8l
8l  -o 8.out asm.8 data.8 dwarf.8 elf.8 enam.8 go.8 goos.8 ldelf.8
ldmacho.8 ldpe.8 lib.8 list.8 macho.8 obj.8 optab.8 pass.8 pe.8 prof.8
span.8 symtab.8 /386/lib/libbio.a
cp 8.out /386/bin/go/8l
8g
8c ../8l/enam.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include cgen.c
cpp: ./../gc/go.h:268 ./gg.h:9 cgen.c:10 Unterminated string or char const
cpp: cgen.c:90 Unterminated string or char const
cpp: cgen.c:135 Unterminated string or char const
cpp: cgen.c:494 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include cgen64.c
cpp: ./../gc/go.h:268 ./gg.h:9 cgen64.c:7 Unterminated string or char const
cpp: cgen64.c:103 Unterminated string or char const
cpp: cgen64.c:440 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include -c -I.
-o cplx.8 ../gc/cplx.c
cpp: ../gc/../gc/go.h:268 ./gg.h:9 ../gc/cplx.c:7 Unterminated string
or char const
cpp: ../gc/cplx.c:21 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include galign.c
cpp: ./../gc/go.h:268 ./gg.h:9 galign.c:7 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include ggen.c
cpp: ./../gc/go.h:268 ./gg.h:9 ggen.c:9 Unterminated string or char const
cpp: ggen.c:495 Unterminated string or char const
cpp: ggen.c:783 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include gobj.c
cpp: ./../gc/go.h:268 ./gg.h:9 gobj.c:33 Unterminated string or char const
cpp: gobj.c:593 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include gsubr.c
cpp: ./../gc/go.h:268 ./gg.h:9 gsubr.c:33 Unterminated string or char const
cpp: gsubr.c:681 Unterminated string or char const
cpp: gsubr.c:1191 Unterminated string or char const
cpp: gsubr.c:1480 Unterminated string or char const
cpp: gsubr.c:1609 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include list.c
cpp: ./../gc/go.h:268 ./gg.h:9 list.c:33 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include peep.c
cpp: ./../gc/go.h:268 ./gg.h:9 peep.c:33 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include -c -I.
-o pgen.8 ../gc/pgen.c
cpp: ../gc/../gc/go.h:268 ./gg.h:9 ../gc/pgen.c:7 Unterminated string
or char const
cpp: ../gc/pgen.c:157 Unterminated string or char const
cpp: ../gc/pgen.c:166 Unterminated string or char const
/go/src/cmd/8g/../gc/pgen.c:117[../gc/pgen.c:3146] const if false
/go/src/cmd/8g/../gc/pgen.c:122[../gc/pgen.c:3151] const if false
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include reg.c
cpp: ./../gc/go.h:268 ./gg.h:9 reg.c:33 Unterminated string or char const
8l  -o 8.out enam.8 cgen.8 cgen64.8 cplx.8 galign.8 ggen.8 gobj.8
gsubr.8 list.8 peep.8 pgen.8 reg.8 ../gc/gc.a8 /386/lib/libbio.a
cp 8.out /386/bin/go/8g
8c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' cgen.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' cgen64.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' div.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' list.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' machcap.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' mul.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include -I. ../cc/pgen.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include -I. ../cc/pswt.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' peep.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' reg.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' sgen.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' swt.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include
'-DCPP="/bin/cpp"' txt.c
8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
'-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
../../lib9/goos.c
8l  -o 8.out cgen.8 cgen64.8 div.8 list.8 machcap.8 mul.8 pgen.8
pswt.8 peep.8 reg.8 sgen.8 swt.8 txt.8 ../8l/enam.8 goos.8 ../cc/cc.a8
/386/lib/libbio.a
cp 8.out /386/bin/go/8c
8a
echo '#include <u.h>' > y1.tab.c
echo '#include <libc.h>' >> y1.tab.c
echo 'typedef int size_t;' >> y1.tab.c
cpp '-D__C99__FUNC__=1' >>y1.tab.c   w.tab.c
8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
'-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
../../lib9/goos.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include lex.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include y1.tab.c
8l  -o 8.out y1.tab.8 goos.8 lex.8 ../8l/enam.8
cp 8.out /386/bin/go/8a
gopack
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include -FVw ar.c
cpp: ar.c:1449 Unterminated string or char const
cpp: ar.c:1663 Unterminated string or char const
cpp: ar.c:1687 Unterminated string or char const
cpp: ar.c:1697 Unterminated string or char const
warning: /go/src/cmd/gopack/ar.c:789[ar.c:2107] set and not used: pkg
warning: /go/src/cmd/gopack/ar.c:1053[ar.c:2364] format mismatch -12ld
INT, arg 3
warning: /go/src/cmd/gopack/ar.c:1187[ar.c:2495] format mismatch -12ld
INT, arg 3
warning: /go/src/cmd/gopack/ar.c:1224[ar.c:2532] format mismatch -12ld
INT, arg 3
{cd ../../libmach/ && mk}
libgomach.a doesn't exist: assuming it will be an archive
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include executable.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include fakeobj.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include map.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include obj.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include swap.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include sym.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include access.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include machdata.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include setmach.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include 5.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include 6.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include 8.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include 5db.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include 8db.c
cpp: 8db.c:207 Unterminated string or char const
cpp: 8db.c:220 Unterminated string or char const
cpp: 8db.c:222 Unterminated string or char const
cpp: 8db.c:225 Unterminated string or char const
cpp: 8db.c:265 Unterminated string or char const
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include 5obj.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include 6obj.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include 8obj.c
ar vu libgomach.a executable.8 fakeobj.8 map.8 obj.8 swap.8 sym.8
access.8 machdata.8 setmach.8 5.8 6.8 8.8 5db.8 8db.8 5obj.8 6obj.8
8obj.8
ar: creating libgomach.a
a - executable.8
a - fakeobj.8
a - map.8
a - obj.8
a - swap.8
a - sym.8
a - access.8
a - machdata.8
a - setmach.8
a - 5.8
a - 6.8
a - 8.8
a - 5db.8
a - 8db.8
a - 5obj.8
a - 6obj.8
a - 8obj.8
8l -o gopack ar.8 ../../libmach/libgomach.a ../../libmach/libgomach.a
/$objtype/lib/libbio.a
cp gopack /386/bin/go/gopack
pkg
install runtime
INSTALL FAIL runtime
/go/src/pkg
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include -o
mkversion.8 mkversion.c
8c '-DGOOS="'^$GOOS^'"' '-DGOARCH="'^$GOARCH^'"'
'-DGOROOT="'^$GOROOT^'"' '-DGOVERSION="'^$GOVERSION^'"'
../../lib9/goos.c
{echo package runtime; echo 'const theGoos = "'^$GOOS^'"'} >version_plan9.go
{echo package runtime; echo 'const theGoarch = "'^$GOARCH^'"'} >version_386.go
./mkgodefs.rc proc.c iface.c hashmap.c chan.c > runtime_defs.go.x
mv runtime_defs.go.x runtime_defs.go
/386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . -a proc.c >runtime.acid.386
/386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . 386/atomic.c
/386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . 386/closure.c
8c -p -I /go/9/386/include -I /go/9/sys/include -I /go/include -o
goc2c.8 goc2c.c
/386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . -o mem.8 plan9/mem.c
/386/bin/go/8a -o memmove.8 386/memmove.s
/386/bin/go/8a -o rt0.8 plan9/386/rt0.s
/386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . -o signal.8 plan9/386/signal.c
/386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . -o thread.8 plan9/thread.c
plan9/thread.c:57 function args not checked: runtime.open
/386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c
8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
mk: /386/bin/go/8c -Iplan9 -I386 ...  : exit status=rc 5779: 8c 5781:
sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
mk: echo install runtime ...  : exit status=rc 5687: 1
mk: for (i in ...  : exit status=rc 5027: rc 5387: mk 5389: error



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 17:30     ` Stanley Lieber
@ 2011-10-31 17:41       ` andrey mirtchovski
  2011-10-31 17:44         ` ron minnich
  2011-10-31 17:45         ` Stanley Lieber
  0 siblings, 2 replies; 28+ messages in thread
From: andrey mirtchovski @ 2011-10-31 17:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> /386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c
> 8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
> mk: /386/bin/go/8c -Iplan9 -I386 ...  : exit status=rc 5779: 8c 5781:
> sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a

i'm not seeing this in either 9vx or a plan9 vm... what are compiling on?



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 17:41       ` andrey mirtchovski
@ 2011-10-31 17:44         ` ron minnich
  2011-10-31 17:45         ` Stanley Lieber
  1 sibling, 0 replies; 28+ messages in thread
From: ron minnich @ 2011-10-31 17:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 10:41 AM, andrey mirtchovski
<mirtchovski@gmail.com> wrote:
>> /386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c
>> 8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
>> mk: /386/bin/go/8c -Iplan9 -I386 ...  : exit status=rc 5779: 8c 5781:
>> sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
>
> i'm not seeing this in either 9vx or a plan9 vm... what are compiling on?
>
>

I'm willing to bet it's 9vx ... there's something bad going on in there.

ron



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 17:41       ` andrey mirtchovski
  2011-10-31 17:44         ` ron minnich
@ 2011-10-31 17:45         ` Stanley Lieber
  2011-10-31 17:50           ` ron minnich
  1 sibling, 1 reply; 28+ messages in thread
From: Stanley Lieber @ 2011-10-31 17:45 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 12:41 PM, andrey mirtchovski
<mirtchovski@gmail.com> wrote:
>> /386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c
>> 8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
>> mk: /386/bin/go/8c -Iplan9 -I386 ...  : exit status=rc 5779: 8c 5781:
>> sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
>
> i'm not seeing this in either 9vx or a plan9 vm... what are compiling on?

9front in vmware.

-sl



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 17:45         ` Stanley Lieber
@ 2011-10-31 17:50           ` ron minnich
  2011-10-31 19:23             ` Stanley Lieber
  0 siblings, 1 reply; 28+ messages in thread
From: ron minnich @ 2011-10-31 17:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 10:45 AM, Stanley Lieber
<stanley.lieber@gmail.com> wrote:
> On Mon, Oct 31, 2011 at 12:41 PM, andrey mirtchovski
> <mirtchovski@gmail.com> wrote:
>>> /386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c
>>> 8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
>>> mk: /386/bin/go/8c -Iplan9 -I386 ...  : exit status=rc 5779: 8c 5781:
>>> sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a
>>
>> i'm not seeing this in either 9vx or a plan9 vm... what are compiling on?
>
> 9front in vmware.

ah, not something I can help with, certainly ...

ron



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 17:50           ` ron minnich
@ 2011-10-31 19:23             ` Stanley Lieber
  2011-10-31 19:32               ` ron minnich
       [not found]               ` <CAP6exYJ8MQdcRa1vofMVjgaFK0Xu-po4eZBOOb>
  0 siblings, 2 replies; 28+ messages in thread
From: Stanley Lieber @ 2011-10-31 19:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 12:50 PM, ron minnich <rminnich@gmail.com> wrote:
> On Mon, Oct 31, 2011 at 10:45 AM, Stanley Lieber
> <stanley.lieber@gmail.com> wrote:
>> On Mon, Oct 31, 2011 at 12:41 PM, andrey mirtchovski
>>> i'm not seeing this in either 9vx or a plan9 vm... what are compiling on?
>>
>> 9front in vmware.
>
> ah, not something I can help with, certainly ...
>
> ron

8c is also dying on real hardware. For what it's worth, here's the stack
trace from the vmware install:

piro% acid 5781
/proc/5781/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: lstk()
outcode()+0x473 /go/src/cmd/8c/swt.c:272
	p=0x1125a8
	b=0x0
	f=0x4
	i=0x4c
	h=0x0
	sym=0xa010000
	sf=0x0
	s=0x960b8
	t=0x3f
	st=0x0
gclean()+0xd8 /go/src/cmd/8c/txt.c:153
	i=0x3ff
	s=0x4fbe0
compile(file=0xdfffefb6,ndef=0x0,defs=0x0)+0x334 /go/src/cmd/cc/lex.c:287
	ofile=0x53130
	p=0x53136
	c=0x3
	fd=0x38717
	av=0x4fba0
	i=0xf
	opt=0x41988
main(argv=0xdfffef7c,argc=0x1)+0x151 /go/src/cmd/cc/lex.c:155
	ndef=0x0
	defs=0x0
	_argc=0x49
	_args=0x3fc19
	p=0x0
_main+0x31 /sys/src/libc/386/main9.s:16
acid:

And on real hardware:

tr99% acid 441088
/proc/441088/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: lstk()
outcode()+0x473 /go/src/cmd/8c/swt.c:272
	p=0x1125a8
	b=0x0
	f=0x4
	i=0x4c
	h=0x0
	sym=0xa010000
	sf=0x0
	s=0x960b8
	t=0x3f
	st=0x0
gclean()+0xd8 /go/src/cmd/8c/txt.c:153
	i=0x3ff
	s=0x4fbe0
compile(file=0xdfffefb6,ndef=0x0,defs=0x0)+0x334 /go/src/cmd/cc/lex.c:287
	ofile=0x53130
	p=0x53136
	c=0x3
	fd=0x38717
	av=0x4fba0
	i=0xf
	opt=0x41988
main(argv=0xdfffef7c,argc=0x1)+0x151 /go/src/cmd/cc/lex.c:155
	ndef=0x0
	defs=0x0
	_argc=0x49
	_args=0x3fc19
	p=0x0
_main+0x31 /sys/src/libc/386/main9.s:16
acid:



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 19:23             ` Stanley Lieber
@ 2011-10-31 19:32               ` ron minnich
  2011-10-31 19:44                 ` Stanley Lieber
  2011-11-01 10:20                 ` Charles Forsyth
       [not found]               ` <CAP6exYJ8MQdcRa1vofMVjgaFK0Xu-po4eZBOOb>
  1 sibling, 2 replies; 28+ messages in thread
From: ron minnich @ 2011-10-31 19:32 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Would be interesting if, from 9front, you could:
9fs sources
bind /n/sources/plan9/386/bin/8c /bin/8c

and see if it breaks.

ron



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 19:32               ` ron minnich
@ 2011-10-31 19:44                 ` Stanley Lieber
  2011-10-31 19:48                   ` ron minnich
  2011-11-01 10:20                 ` Charles Forsyth
  1 sibling, 1 reply; 28+ messages in thread
From: Stanley Lieber @ 2011-10-31 19:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 2:32 PM, ron minnich <rminnich@gmail.com> wrote:
> Would be interesting if, from 9front, you could:
> 9fs sources
> bind /n/sources/plan9/386/bin/8c /bin/8c
>
> and see if it breaks.
>
> ron

Exact same result.

-sl



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 19:44                 ` Stanley Lieber
@ 2011-10-31 19:48                   ` ron minnich
  2011-10-31 21:01                     ` ron minnich
  0 siblings, 1 reply; 28+ messages in thread
From: ron minnich @ 2011-10-31 19:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 12:44 PM, Stanley Lieber
<stanley.lieber@gmail.com> wrote:
> On Mon, Oct 31, 2011 at 2:32 PM, ron minnich <rminnich@gmail.com> wrote:
>> Would be interesting if, from 9front, you could:
>> 9fs sources
>> bind /n/sources/plan9/386/bin/8c /bin/8c
>>
>> and see if it breaks.
>>
>> ron
>
> Exact same result.

hmm, interesting. We'll have to see if anyone else hits it then,
you're the first lucky winner. Don't you hate it when that happens ...

sorry

ron



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 19:48                   ` ron minnich
@ 2011-10-31 21:01                     ` ron minnich
  2011-10-31 22:10                       ` Skip Tavakkolian
  0 siblings, 1 reply; 28+ messages in thread
From: ron minnich @ 2011-10-31 21:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

btw, I just moved us up to tip Lyndon found out how to kill the cpp errors.

Builds fine, go programs (some of them) run fine.

If anybody wants to work out why pkgt/syscall/exec_plan9.go is closing
fd 6 twice when goinstall tries to fire off the mk command, would be
good to know.

ron



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 21:01                     ` ron minnich
@ 2011-10-31 22:10                       ` Skip Tavakkolian
  2011-10-31 22:17                         ` ron minnich
  2011-10-31 22:21                         ` ron minnich
  0 siblings, 2 replies; 28+ messages in thread
From: Skip Tavakkolian @ 2011-10-31 22:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

awesome job!  compiled fine. i'm running godoc and now rewriting some
cgi's in go. many thanks to everyone  involved.

-Skip


On Mon, Oct 31, 2011 at 2:01 PM, ron minnich <rminnich@gmail.com> wrote:
> btw, I just moved us up to tip Lyndon found out how to kill the cpp errors.
>
> Builds fine, go programs (some of them) run fine.
>
> If anybody wants to work out why pkgt/syscall/exec_plan9.go is closing
> fd 6 twice when goinstall tries to fire off the mk command, would be
> good to know.
>
> ron
>
>



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 22:10                       ` Skip Tavakkolian
@ 2011-10-31 22:17                         ` ron minnich
  2011-10-31 22:34                           ` Bakul Shah
  2011-10-31 22:21                         ` ron minnich
  1 sibling, 1 reply; 28+ messages in thread
From: ron minnich @ 2011-10-31 22:17 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 3:10 PM, Skip Tavakkolian
<skip.tavakkolian@gmail.com> wrote:
> awesome job!  compiled fine. i'm running godoc and now rewriting some
> cgi's in go. many thanks to everyone  involved.

OK, now, the current problem with syscall/exec_plan9.go is that it is
a little too eager to close FDs. It's doing the close by hand because
it's not possible on Plan 9 to take an fd and set to to close-on-exec
-- that's only done on  open on Plan 9 (on unix the code does an
fcntl). But if an FD is used twice for a child -- as it is with
combined stdout/stderr -- then the close closes the fd before it can
be dup'ed a second time. Bad.

I did the lazy thing and commented out the erroneous close for now.
The easy fix is to track the fds to be closed in a map and then close
them all later. That's next. Another possibility is to allow '#d/*ctl'
to be writeable and implement a
closeonexec
control message for fds. But maybe that's  just too much. It is
certainly easy to do, but is that kind of feature something we want to
add?

ron



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 22:10                       ` Skip Tavakkolian
  2011-10-31 22:17                         ` ron minnich
@ 2011-10-31 22:21                         ` ron minnich
  1 sibling, 0 replies; 28+ messages in thread
From: ron minnich @ 2011-10-31 22:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Oct 31, 2011 at 3:10 PM, Skip Tavakkolian
<skip.tavakkolian@gmail.com> wrote:
> awesome job!  compiled fine. i'm running godoc and now rewriting some
> cgi's in go. many thanks to everyone  involved.

Keep us posted on any problems you hit. Also, if you want to track
tip, I just did a pull.I just committed more fixes from Andrey and
Lyndon.

Finally, anybody who wants to attack the need for prebuilt files,
well, we'd love it.

Finally: if you have a file system shared from unix to Plan 9, a
second way to build the prebuilt files:
cd go/src
sh ditunix

hmm, ditunix, what a name. Long ago I named everything 'doit'. Too
much typing. So it became dit. And ditunix should then be obvious.

Also, a very useful thing would be for someone to just diff the
standard go tree and this tree, looking for any issues, because at
some point we want to get this back into the main go tree.

ron



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

* Re: [9fans] native (mostly) go for plan9
       [not found]                 ` <CAP6exYJf1UKFdpeXyFXRt0Y7hPc=Hyq7oBdvi9uX3Z7+FQbxsA@mail.gmail.c>
@ 2011-10-31 22:24                   ` erik quanstrom
  2011-10-31 22:34                     ` cinap_lenrek
  2011-10-31 22:47                     ` cinap_lenrek
  0 siblings, 2 replies; 28+ messages in thread
From: erik quanstrom @ 2011-10-31 22:24 UTC (permalink / raw)
  To: rminnich, 9fans

> OK, now, the current problem with syscall/exec_plan9.go is that it is
> a little too eager to close FDs. It's doing the close by hand because
> it's not possible on Plan 9 to take an fd and set to to close-on-exec
> -- that's only done on  open on Plan 9 (on unix the code does an
> fcntl). But if an FD is used twice for a child -- as it is with
> combined stdout/stderr -- then the close closes the fd before it can
> be dup'ed a second time. Bad.
>
> I did the lazy thing and commented out the erroneous close for now.
> The easy fix is to track the fds to be closed in a map and then close
> them all later. That's next. Another possibility is to allow '#d/*ctl'
> to be writeable and implement a
> closeonexec
> control message for fds. But maybe that's  just too much. It is
> certainly easy to do, but is that kind of feature something we want to
> add?

just a silly idea, perhaps dup takes an additional argument

	int dup(int old, int new, int flags);

if old and new are the same, flags are applied as if they were given on open.
e.g.
	dupf(fd, fd, OCEXEC);
(by the way, i would put in a word for OCFORK.)

- erik



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 22:17                         ` ron minnich
@ 2011-10-31 22:34                           ` Bakul Shah
  2011-10-31 22:38                             ` ron minnich
  0 siblings, 1 reply; 28+ messages in thread
From: Bakul Shah @ 2011-10-31 22:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, 31 Oct 2011 15:17:39 PDT ron minnich <rminnich@gmail.com>  wrote:
>
> I did the lazy thing and commented out the erroneous close for now.
> The easy fix is to track the fds to be closed in a map and then close
> them all later. That's next. Another possibility is to allow '#d/*ctl'
> to be writeable and implement a
> closeonexec
> control message for fds. But maybe that's  just too much. It is
> certainly easy to do, but is that kind of feature something we want to
> add?

May be add `atexec(void(*fun)(void*))'?



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 22:24                   ` erik quanstrom
@ 2011-10-31 22:34                     ` cinap_lenrek
  2011-10-31 22:44                       ` erik quanstrom
  2011-10-31 22:47                     ` cinap_lenrek
  1 sibling, 1 reply; 28+ messages in thread
From: cinap_lenrek @ 2011-10-31 22:34 UTC (permalink / raw)
  To: 9fans

problem is that the flags are per channel, not per filedescriptor.

--
cinap



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 22:34                           ` Bakul Shah
@ 2011-10-31 22:38                             ` ron minnich
  0 siblings, 0 replies; 28+ messages in thread
From: ron minnich @ 2011-10-31 22:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

well, I could be really lazy. I think this would work.

given an fd, say 6
newfd = open('#d/6", OREXEC|permissions)
close(fd)
then dup the newfd. The newfd will close when you leave.

Problem: what are the permissions for the old fd ...

ron



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 22:34                     ` cinap_lenrek
@ 2011-10-31 22:44                       ` erik quanstrom
  0 siblings, 0 replies; 28+ messages in thread
From: erik quanstrom @ 2011-10-31 22:44 UTC (permalink / raw)
  To: 9fans

On Mon Oct 31 18:34:50 EDT 2011, cinap_lenrek@gmx.de wrote:
> problem is that the flags are per channel, not per filedescriptor.

that's not due to treaty or edict.

one would need to make a distinction between synthetic flags like
OCEXEC and flags that are negotiated through open(1) like OREAD

- erik



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

* Re: [9fans] native (mostly) go for plan9
       [not found]                 ` <CAP6exYKue2e7NWx07+RMNDs38aXex0y9urfT6eT1LKbjvvA_yw@mail.gmail.c>
@ 2011-10-31 22:46                   ` erik quanstrom
  0 siblings, 0 replies; 28+ messages in thread
From: erik quanstrom @ 2011-10-31 22:46 UTC (permalink / raw)
  To: 9fans

On Mon Oct 31 18:39:19 EDT 2011, rminnich@gmail.com wrote:
> well, I could be really lazy. I think this would work.
>
> given an fd, say 6
> newfd = open('#d/6", OREXEC|permissions)
> close(fd)
> then dup the newfd. The newfd will close when you leave.
>
> Problem: what are the permissions for the old fd ...

poke through /proc/$pid/fd and find out?

otoh, it seems that the go runtime, if it wants this information,
might have enough control to maintain it itself.

- erik



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 22:24                   ` erik quanstrom
  2011-10-31 22:34                     ` cinap_lenrek
@ 2011-10-31 22:47                     ` cinap_lenrek
  1 sibling, 0 replies; 28+ messages in thread
From: cinap_lenrek @ 2011-10-31 22:47 UTC (permalink / raw)
  To: 9fans

for 9front page, i wrote a function that implements inferno
style pctl filedescriptor passing. basicly, you fork and then give
it a list of filedescriptors you want in the process like:

dupfds(foofd, 1, 2, -1);	// redirect foofd to stdin of this process, keep stdout/stderr

all the other filedescriptors get closed so you wont leak
any fds.

i find this style mutch cleaner than flags on filedescriptors.
here i say exactly what i want at the time of the exec/fork
instead of having to worry about it in some random place where
i open it.

the implementation uses /fd to figure out what filedescriptors
are open.

a kernel based version of this would be nice :)

--
cinap



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 19:32               ` ron minnich
  2011-10-31 19:44                 ` Stanley Lieber
@ 2011-11-01 10:20                 ` Charles Forsyth
  1 sibling, 0 replies; 28+ messages in thread
From: Charles Forsyth @ 2011-11-01 10:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

you probably need to bind it on go's 8c

On 31 October 2011 19:32, ron minnich <rminnich@gmail.com> wrote:
> Would be interesting if, from 9front, you could:
> 9fs sources
> bind /n/sources/plan9/386/bin/8c /bin/8c
>



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 17:08   ` ron minnich
  2011-10-31 17:30     ` Stanley Lieber
@ 2011-11-01 10:41     ` Yaroslav
  1 sibling, 0 replies; 28+ messages in thread
From: Yaroslav @ 2011-11-01 10:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2011/10/31 ron minnich <rminnich@gmail.com>:
> you forgot to
> cd /go/src
> . 9setup

why not to have what's in 9setup directly in 9.mk?



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

* Re: [9fans] native (mostly) go for plan9
  2011-10-31 15:11 [9fans] native (mostly) go for plan9 ron minnich
  2011-10-31 16:41 ` Stanley Lieber
@ 2011-11-01 16:57 ` Skip Tavakkolian
  2011-11-01 17:26   ` ron minnich
  1 sibling, 1 reply; 28+ messages in thread
From: Skip Tavakkolian @ 2011-11-01 16:57 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

i pulled the sources about 8 hours ago for another environment and
tried to build. it stops in /go/src/cmd/gotest due to a missing
'mk.go'. inspecting Makefile and mkfile shows that GOFILES includes
'make.go' in Makefile and 'mk.go' in mkfile -- neither exists. i think
this might be an unfinished change. removing the dependency from
mkfile result in a couple of undefined names in gotest.go.

install ../cmd/gotest
INSTALL FAIL ../cmd/gotest
/go/src/pkg
mk: don't know how to make 'mk.go' in directory /go/src/cmd/gotest
mk: echo install ../cmd/gotest ...  : exit status=rc 8582: 1
mk: for (i in ...  : exit status=rc 272: rc 909: mk 911: error

On Mon, Oct 31, 2011 at 8:11 AM, ron minnich <rminnich@gmail.com> wrote:
> A number of us have been working on a native Go port for plan 9.
>
> The big goal is to do this in a way that makes tracking Go source a
> non-problem, and to eventually just have these changes part of the
> standard Go tree, so there is no work at all.
>
> we're pretty close, thanks to previous work others have done on the Go port.
>
> You can try it.
>
> Right now, due to a few bison and bash dependencies, there are files
> we can not generate. These are supplied as part of the repo.
>
> cd
> hg clone https://code.google.com/p/rminnich-9go go
> bind -ac . /
> cd /go
> cd 9/prebuilt
> rc install
> cd /go/src
> mk install
>
> You've now got all commands and the toolchain. Now you can help us fix this:
>
> goinstall bitbucket.org/rminnich/forth (or any package)
>
> fails with an odd error. use ratrace -c on that command to see what
> sequence produces this error.
>
> Be sure to use the google code tools to mark bugs and submit fixes.
>
> I am going to be doing an update from the main go tree into this repo
> soon. This will likely break things. This working branch will be
> tagged 'audrey'.
>
> thanks
>
> ron
>
>



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

* Re: [9fans] native (mostly) go for plan9
  2011-11-01 16:57 ` Skip Tavakkolian
@ 2011-11-01 17:26   ` ron minnich
  0 siblings, 0 replies; 28+ messages in thread
From: ron minnich @ 2011-11-01 17:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

This is due to something bad that happened in my fusion (which has at
this point totally gone away -- blown venti).

I just fixed it, go ahead and give it another try.

ron

On Tue, Nov 1, 2011 at 9:57 AM, Skip Tavakkolian
<skip.tavakkolian@gmail.com> wrote:
> i pulled the sources about 8 hours ago for another environment and
> tried to build. it stops in /go/src/cmd/gotest due to a missing
> 'mk.go'. inspecting Makefile and mkfile shows that GOFILES includes
> 'make.go' in Makefile and 'mk.go' in mkfile -- neither exists. i think
> this might be an unfinished change. removing the dependency from
> mkfile result in a couple of undefined names in gotest.go.
>
> install ../cmd/gotest
> INSTALL FAIL ../cmd/gotest
> /go/src/pkg
> mk: don't know how to make 'mk.go' in directory /go/src/cmd/gotest
> mk: echo install ../cmd/gotest ...  : exit status=rc 8582: 1
> mk: for (i in ...  : exit status=rc 272: rc 909: mk 911: error
>
> On Mon, Oct 31, 2011 at 8:11 AM, ron minnich <rminnich@gmail.com> wrote:
>> A number of us have been working on a native Go port for plan 9.
>>
>> The big goal is to do this in a way that makes tracking Go source a
>> non-problem, and to eventually just have these changes part of the
>> standard Go tree, so there is no work at all.
>>
>> we're pretty close, thanks to previous work others have done on the Go port.
>>
>> You can try it.
>>
>> Right now, due to a few bison and bash dependencies, there are files
>> we can not generate. These are supplied as part of the repo.
>>
>> cd
>> hg clone https://code.google.com/p/rminnich-9go go
>> bind -ac . /
>> cd /go
>> cd 9/prebuilt
>> rc install
>> cd /go/src
>> mk install
>>
>> You've now got all commands and the toolchain. Now you can help us fix this:
>>
>> goinstall bitbucket.org/rminnich/forth (or any package)
>>
>> fails with an odd error. use ratrace -c on that command to see what
>> sequence produces this error.
>>
>> Be sure to use the google code tools to mark bugs and submit fixes.
>>
>> I am going to be doing an update from the main go tree into this repo
>> soon. This will likely break things. This working branch will be
>> tagged 'audrey'.
>>
>> thanks
>>
>> ron
>>
>>
>
>



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

end of thread, other threads:[~2011-11-01 17:26 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-31 15:11 [9fans] native (mostly) go for plan9 ron minnich
2011-10-31 16:41 ` Stanley Lieber
2011-10-31 16:51   ` andrey mirtchovski
2011-10-31 17:08   ` ron minnich
2011-10-31 17:30     ` Stanley Lieber
2011-10-31 17:41       ` andrey mirtchovski
2011-10-31 17:44         ` ron minnich
2011-10-31 17:45         ` Stanley Lieber
2011-10-31 17:50           ` ron minnich
2011-10-31 19:23             ` Stanley Lieber
2011-10-31 19:32               ` ron minnich
2011-10-31 19:44                 ` Stanley Lieber
2011-10-31 19:48                   ` ron minnich
2011-10-31 21:01                     ` ron minnich
2011-10-31 22:10                       ` Skip Tavakkolian
2011-10-31 22:17                         ` ron minnich
2011-10-31 22:34                           ` Bakul Shah
2011-10-31 22:38                             ` ron minnich
2011-10-31 22:21                         ` ron minnich
2011-11-01 10:20                 ` Charles Forsyth
     [not found]               ` <CAP6exYJ8MQdcRa1vofMVjgaFK0Xu-po4eZBOOb>
     [not found]                 ` <CAP6exYJf1UKFdpeXyFXRt0Y7hPc=Hyq7oBdvi9uX3Z7+FQbxsA@mail.gmail.c>
2011-10-31 22:24                   ` erik quanstrom
2011-10-31 22:34                     ` cinap_lenrek
2011-10-31 22:44                       ` erik quanstrom
2011-10-31 22:47                     ` cinap_lenrek
     [not found]                 ` <CAP6exYKue2e7NWx07+RMNDs38aXex0y9urfT6eT1LKbjvvA_yw@mail.gmail.c>
2011-10-31 22:46                   ` erik quanstrom
2011-11-01 10:41     ` Yaroslav
2011-11-01 16:57 ` Skip Tavakkolian
2011-11-01 17:26   ` ron minnich

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