Discussion:
[9fans] Go Plan9 ARM Dreamplug
(too old to reply)
Christopher Nielsen
2013-04-15 07:00:10 UTC
Permalink
After a little work, I have a Plan 9 dev environment setup. My dreamplug
boots with no problems, and after installing python and mercurial, I was
able to clone the go repo. The build completes fine on 386, but on the
dreamplug I get the errors below. Yes, I know I should probably be running
as a user other than bootes; this was a quick and dirty install to get
things running. Also, opnames.h does exist.

dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
--rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h

Also, it doesn't look like the tests are being run on 386. Forgive my
ignorance, but is that currently intentional?* *I haven't had time to
search the list.

cmd/gc
/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
switch expression must be integer
go tool dist: FAILED: /bin/5c -FTVw -Bp+
-I/usr/bootes/src/go-plan9-arm/include/plan9
-I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
/usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
'/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
switch expression must be integer
/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
switch expression must be integer
warning:
/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
used and not set: fn
go tool dist: FAILED: /bin/5c -FTVw -Bp+
-I/usr/bootes/src/go-plan9-arm/include/plan9
-I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
/usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
'/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist

--
Christopher Nielsen
"They who can give up essential liberty for temporary safety, deserve
neither liberty nor safety." --Benjamin Franklin
"The tree of liberty must be refreshed from time to time with the blood of
patriots & tyrants." --Thomas Jefferson
andrey mirtchovski
2013-04-15 07:04:18 UTC
Permalink
congrats! which mercurial and python did you install?

On Mon, Apr 15, 2013 at 1:00 AM, Christopher Nielsen <***@pobox.com> wrote:
> After a little work, I have a Plan 9 dev environment setup. My dreamplug
> boots with no problems, and after installing python and mercurial, I was
> able to clone the go repo. The build completes fine on 386, but on the
> dreamplug I get the errors below. Yes, I know I should probably be running
> as a user other than bootes; this was a quick and dirty install to get
> things running. Also, opnames.h does exist.
>
> dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
> --rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>
> Also, it doesn't look like the tests are being run on 386. Forgive my
> ignorance, but is that currently intentional? I haven't had time to search
> the list.
>
> cmd/gc
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
> switch expression must be integer
> go tool dist: FAILED: /bin/5c -FTVw -Bp+
> -I/usr/bootes/src/go-plan9-arm/include/plan9
> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
> switch expression must be integer
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
> switch expression must be integer
> warning:
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
> used and not set: fn
> go tool dist: FAILED: /bin/5c -FTVw -Bp+
> -I/usr/bootes/src/go-plan9-arm/include/plan9
> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>
> --
> Christopher Nielsen
> "They who can give up essential liberty for temporary safety, deserve
> neither liberty nor safety." --Benjamin Franklin
> "The tree of liberty must be refreshed from time to time with the blood of
> patriots & tyrants." --Thomas Jefferson
Christopher Nielsen
2013-04-15 08:10:57 UTC
Permalink
Thanks! I'm quite pleased to have managed to get this far with a little
weekend hacking.

I followed the directions from
http://mercurial.selenic.com/wiki/Plan9FromBellLabs
Nice doc to whomever wrote it.

So using contrib, I installed the following:

fgb/z
fgb/bz2
fgb/openssl
bichued/python
stallion/mercurial

A small caveat, I had to use mercurial on x86 (my cpufsauth server is an
x86 vmware instance), since there wasn't an arm binary. Other than that, it
was all pretty painless.




On Mon, Apr 15, 2013 at 12:04 AM, andrey mirtchovski
<***@gmail.com>wrote:

> congrats! which mercurial and python did you install?
>
> On Mon, Apr 15, 2013 at 1:00 AM, Christopher Nielsen <***@pobox.com>
> wrote:
> > After a little work, I have a Plan 9 dev environment setup. My dreamplug
> > boots with no problems, and after installing python and mercurial, I was
> > able to clone the go repo. The build completes fine on 386, but on the
> > dreamplug I get the errors below. Yes, I know I should probably be
> running
> > as a user other than bootes; this was a quick and dirty install to get
> > things running. Also, opnames.h does exist.
> >
> > dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
> > --rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
> > /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
> >
> > Also, it doesn't look like the tests are being run on 386. Forgive my
> > ignorance, but is that currently intentional? I haven't had time to
> search
> > the list.
> >
> > cmd/gc
> >
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
> > switch expression must be integer
> > go tool dist: FAILED: /bin/5c -FTVw -Bp+
> > -I/usr/bootes/src/go-plan9-arm/include/plan9
> > -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
> > /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
> > /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
> > '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
> >
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
> > switch expression must be integer
> >
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
> > switch expression must be integer
> > warning:
> >
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
> > used and not set: fn
> > go tool dist: FAILED: /bin/5c -FTVw -Bp+
> > -I/usr/bootes/src/go-plan9-arm/include/plan9
> > -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
> > /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
> > /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
> > '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
> >
> > --
> > Christopher Nielsen
> > "They who can give up essential liberty for temporary safety, deserve
> > neither liberty nor safety." --Benjamin Franklin
> > "The tree of liberty must be refreshed from time to time with the blood
> of
> > patriots & tyrants." --Thomas Jefferson
>
>


--
Christopher Nielsen
"They who can give up essential liberty for temporary safety, deserve
neither liberty nor safety." --Benjamin Franklin
"The tree of liberty must be refreshed from time to time with the blood of
patriots & tyrants." --Thomas Jefferson
Yaroslav
2013-04-17 09:15:07 UTC
Permalink
2013/4/15 Christopher Nielsen <***@pobox.com>
>
> A small caveat, I had to use mercurial on x86 (my cpufsauth server is an x86 vmware instance), since there wasn't an arm binary. Other than that, it was all pretty painless.


One may '9fs sources && fcp /n/sources/contrib/yk/5.python
/arm/bin/python' to add the ARM binary (without VFP instructions).

--
- Yaroslav
Matthew Veety
2013-04-17 16:36:49 UTC
Permalink
On Apr 17, 2013, at 5:15, Yaroslav <***@gmail.com> wrote:

> 2013/4/15 Christopher Nielsen <***@pobox.com>
>>
>> A small caveat, I had to use mercurial on x86 (my cpufsauth server is an x86 vmware instance), since there wasn't an arm binary. Other than that, it was all pretty painless.
>
>
> One may '9fs sources && fcp /n/sources/contrib/yk/5.python
> /arm/bin/python' to add the ARM binary (without VFP instructions).
>
> --
> - Yaroslav

How do you get python to build without the VFP instructions?
>

--
Veety
erik quanstrom
2013-04-17 16:42:04 UTC
Permalink
> How do you get python to build without the VFP instructions?

don't pass 5l the -f flag.

- erik
Charles Forsyth
2013-04-17 16:40:37 UTC
Permalink
On 17 April 2013 17:36, Matthew Veety <***@gmail.com> wrote:

> How do you get python to build without the VFP instructions?


the existing arm kernel emulates the older ARM7500 fp instructions, which
5l generates by default.
Gorka Guardiola
2013-04-15 07:08:05 UTC
Permalink
This is a known problem with 5c. It cannot switch on vlong. As a stopgap,
you can
change the types of the things being switched on to integer (type, if I
remember right).

G.



On Mon, Apr 15, 2013 at 9:00 AM, Christopher Nielsen <***@pobox.com>wrote:

> After a little work, I have a Plan 9 dev environment setup. My dreamplug
> boots with no problems, and after installing python and mercurial, I was
> able to clone the go repo. The build completes fine on 386, but on the
> dreamplug I get the errors below. Yes, I know I should probably be running
> as a user other than bootes; this was a quick and dirty install to get
> things running. Also, opnames.h does exist.
>
> dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
> --rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>
> Also, it doesn't look like the tests are being run on 386. Forgive my
> ignorance, but is that currently intentional?* *I haven't had time to
> search the list.
>
> cmd/gc
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
> switch expression must be integer
> go tool dist: FAILED: /bin/5c -FTVw -Bp+
> -I/usr/bootes/src/go-plan9-arm/include/plan9
> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
> switch expression must be integer
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
> switch expression must be integer
> warning:
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
> used and not set: fn
> go tool dist: FAILED: /bin/5c -FTVw -Bp+
> -I/usr/bootes/src/go-plan9-arm/include/plan9
> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>
> --
> Christopher Nielsen
> "They who can give up essential liberty for temporary safety, deserve
> neither liberty nor safety." --Benjamin Franklin
> "The tree of liberty must be refreshed from time to time with the blood of
> patriots & tyrants." --Thomas Jefferson
>



--
- curiosity sKilled the cat
Christopher Nielsen
2013-04-15 08:12:25 UTC
Permalink
I'll give that a shot and see if I get different results. It'll have to be
some time tomorrow though. What concerns me is that the error says it can't
find opnames.h when it clearly exists.


On Mon, Apr 15, 2013 at 12:08 AM, Gorka Guardiola <***@gmail.com> wrote:

> This is a known problem with 5c. It cannot switch on vlong. As a stopgap,
> you can
> change the types of the things being switched on to integer (type, if I
> remember right).
>
> G.
>
>
>
> On Mon, Apr 15, 2013 at 9:00 AM, Christopher Nielsen <***@pobox.com>wrote:
>
>> After a little work, I have a Plan 9 dev environment setup. My dreamplug
>> boots with no problems, and after installing python and mercurial, I was
>> able to clone the go repo. The build completes fine on 386, but on the
>> dreamplug I get the errors below. Yes, I know I should probably be running
>> as a user other than bootes; this was a quick and dirty install to get
>> things running. Also, opnames.h does exist.
>>
>> dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>> --rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>
>> Also, it doesn't look like the tests are being run on 386. Forgive my
>> ignorance, but is that currently intentional?* *I haven't had time to
>> search the list.
>>
>> cmd/gc
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
>> switch expression must be integer
>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
>> switch expression must be integer
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
>> switch expression must be integer
>> warning:
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
>> used and not set: fn
>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>
>> --
>> Christopher Nielsen
>> "They who can give up essential liberty for temporary safety, deserve
>> neither liberty nor safety." --Benjamin Franklin
>> "The tree of liberty must be refreshed from time to time with the blood
>> of patriots & tyrants." --Thomas Jefferson
>>
>
>
>
> --
> - curiosity sKilled the cat
>



--
Christopher Nielsen
"They who can give up essential liberty for temporary safety, deserve
neither liberty nor safety." --Benjamin Franklin
"The tree of liberty must be refreshed from time to time with the blood of
patriots & tyrants." --Thomas Jefferson
Skip Tavakkolian
2013-04-15 08:22:42 UTC
Permalink
I'm getting something similar on Sheeva. It also looks like there are still
env issues:

sheeva% ./all.rc
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, plan9/arm.
lib9
libbio
libmach
misc/pprof
cmd/addr2line
cmd/cov
cmd/nm
cmd/objdump
cmd/pack
cmd/prof
cmd/cc
warning:
/usr/fst/Go1/src/cmd/cc/y.tab.c:1733[/usr/fst/Go1/src/cmd/cc/y.tab.c:3416]
result of operation not used
warning:
/usr/fst/Go1/src/cmd/cc/y.tab.c:1733[/usr/fst/Go1/src/cmd/cc/y.tab.c:3416]
result of operation not used
warning:
/usr/fst/Go1/src/cmd/cc/y.tab.c:1736[/usr/fst/Go1/src/cmd/cc/y.tab.c:3419]
set and not used: yymsg
warning:
/usr/fst/Go1/src/cmd/cc/y.tab.c:1924[/usr/fst/Go1/src/cmd/cc/y.tab.c:3595]
set and not used: yyptr
cmd/gc
/usr/fst/Go1/src/cmd/gc/reflect.c:1022[/usr/fst/Go1/src/cmd/gc/reflect.c:3400]
switch expression must be integer
go tool dist: FAILED: /bin/5c -FTVw -Bp+ -I/usr/fst/Go1/include/plan9
-I/usr/fst/Go1/include/plan9/arm -I /usr/fst/Go1/src/cmd/gc -o
$WORK/reflect.5 /usr/fst/Go1/src/cmd/gc/reflect.c: '/env/GOEXPERIMENT' file
does not exist
/usr/fst/Go1/src/cmd/gc/subr.c:665[/usr/fst/Go1/src/cmd/gc/subr.c:3240]
switch expression must be integer
/usr/fst/Go1/src/cmd/gc/subr.c:2863[/usr/fst/Go1/src/cmd/gc/subr.c:5373]
switch expression must be integer
warning:
/usr/fst/Go1/src/cmd/gc/subr.c:2846[/usr/fst/Go1/src/cmd/gc/subr.c:5356]
used and not set: fn
go tool dist: FAILED: /bin/5c -FTVw -Bp+ -I/usr/fst/Go1/include/plan9
-I/usr/fst/Go1/include/plan9/arm -I /usr/fst/Go1/src/cmd/gc -o $WORK/subr.5
/usr/fst/Go1/src/cmd/gc/subr.c: '/env/GOEXPERIMENT' file does not exist
sheeva%



On Mon, Apr 15, 2013 at 1:12 AM, Christopher Nielsen <***@pobox.com>wrote:

> I'll give that a shot and see if I get different results. It'll have to be
> some time tomorrow though. What concerns me is that the error says it can't
> find opnames.h when it clearly exists.
>
>
> On Mon, Apr 15, 2013 at 12:08 AM, Gorka Guardiola <***@gmail.com>wrote:
>
>> This is a known problem with 5c. It cannot switch on vlong. As a stopgap,
>> you can
>> change the types of the things being switched on to integer (type, if I
>> remember right).
>>
>> G.
>>
>>
>>
>> On Mon, Apr 15, 2013 at 9:00 AM, Christopher Nielsen <***@pobox.com>wrote:
>>
>>> After a little work, I have a Plan 9 dev environment setup. My dreamplug
>>> boots with no problems, and after installing python and mercurial, I was
>>> able to clone the go repo. The build completes fine on 386, but on the
>>> dreamplug I get the errors below. Yes, I know I should probably be running
>>> as a user other than bootes; this was a quick and dirty install to get
>>> things running. Also, opnames.h does exist.
>>>
>>> dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>> --rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>>
>>> Also, it doesn't look like the tests are being run on 386. Forgive my
>>> ignorance, but is that currently intentional?* *I haven't had time to
>>> search the list.
>>>
>>> cmd/gc
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
>>> switch expression must be integer
>>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
>>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
>>> switch expression must be integer
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
>>> switch expression must be integer
>>> warning:
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
>>> used and not set: fn
>>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
>>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>>
>>> --
>>> Christopher Nielsen
>>> "They who can give up essential liberty for temporary safety, deserve
>>> neither liberty nor safety." --Benjamin Franklin
>>> "The tree of liberty must be refreshed from time to time with the blood
>>> of patriots & tyrants." --Thomas Jefferson
>>>
>>
>>
>>
>> --
>> - curiosity sKilled the cat
>>
>
>
>
> --
> Christopher Nielsen
> "They who can give up essential liberty for temporary safety, deserve
> neither liberty nor safety." --Benjamin Franklin
> "The tree of liberty must be refreshed from time to time with the blood of
> patriots & tyrants." --Thomas Jefferson
>
Christopher Nielsen
2013-04-15 08:33:56 UTC
Permalink
I saw the same problem and solved it by setting GOEXPERIMENT="". Not sure
that's the correct solution, but it worked.

I will look at it in more detail tomorrow, if I have time.

--
Christopher Nielsen
"They who can give up essential liberty for temporary safety, deserve
neither liberty nor safety." --Benjamin Franklin
"The tree of liberty must be refreshed from time to time with the blood of
patriots & tyrants." --Thomas Jefferson
"The duty of a patriot is to protect his country from its government."
--Thomas Paine
On Apr 15, 2013 1:24 AM, "Skip Tavakkolian" <***@gmail.com>
wrote:

> I'm getting something similar on Sheeva. It also looks like there are
> still env issues:
>
> sheeva% ./all.rc
> # Building C bootstrap tool.
> cmd/dist
>
> # Building compilers and Go bootstrap tool for host, plan9/arm.
> lib9
> libbio
> libmach
> misc/pprof
> cmd/addr2line
> cmd/cov
> cmd/nm
> cmd/objdump
> cmd/pack
> cmd/prof
> cmd/cc
> warning:
> /usr/fst/Go1/src/cmd/cc/y.tab.c:1733[/usr/fst/Go1/src/cmd/cc/y.tab.c:3416]
> result of operation not used
> warning:
> /usr/fst/Go1/src/cmd/cc/y.tab.c:1733[/usr/fst/Go1/src/cmd/cc/y.tab.c:3416]
> result of operation not used
> warning:
> /usr/fst/Go1/src/cmd/cc/y.tab.c:1736[/usr/fst/Go1/src/cmd/cc/y.tab.c:3419]
> set and not used: yymsg
> warning:
> /usr/fst/Go1/src/cmd/cc/y.tab.c:1924[/usr/fst/Go1/src/cmd/cc/y.tab.c:3595]
> set and not used: yyptr
> cmd/gc
> /usr/fst/Go1/src/cmd/gc/reflect.c:1022[/usr/fst/Go1/src/cmd/gc/reflect.c:3400]
> switch expression must be integer
> go tool dist: FAILED: /bin/5c -FTVw -Bp+ -I/usr/fst/Go1/include/plan9
> -I/usr/fst/Go1/include/plan9/arm -I /usr/fst/Go1/src/cmd/gc -o
> $WORK/reflect.5 /usr/fst/Go1/src/cmd/gc/reflect.c: '/env/GOEXPERIMENT' file
> does not exist
> /usr/fst/Go1/src/cmd/gc/subr.c:665[/usr/fst/Go1/src/cmd/gc/subr.c:3240]
> switch expression must be integer
> /usr/fst/Go1/src/cmd/gc/subr.c:2863[/usr/fst/Go1/src/cmd/gc/subr.c:5373]
> switch expression must be integer
> warning:
> /usr/fst/Go1/src/cmd/gc/subr.c:2846[/usr/fst/Go1/src/cmd/gc/subr.c:5356]
> used and not set: fn
> go tool dist: FAILED: /bin/5c -FTVw -Bp+ -I/usr/fst/Go1/include/plan9
> -I/usr/fst/Go1/include/plan9/arm -I /usr/fst/Go1/src/cmd/gc -o $WORK/subr.5
> /usr/fst/Go1/src/cmd/gc/subr.c: '/env/GOEXPERIMENT' file does not exist
> sheeva%
>
>
>
> On Mon, Apr 15, 2013 at 1:12 AM, Christopher Nielsen <***@pobox.com>wrote:
>
>> I'll give that a shot and see if I get different results. It'll have to
>> be some time tomorrow though. What concerns me is that the error says it
>> can't find opnames.h when it clearly exists.
>>
>>
>> On Mon, Apr 15, 2013 at 12:08 AM, Gorka Guardiola <***@gmail.com>wrote:
>>
>>> This is a known problem with 5c. It cannot switch on vlong. As a
>>> stopgap, you can
>>> change the types of the things being switched on to integer (type, if I
>>> remember right).
>>>
>>> G.
>>>
>>>
>>>
>>> On Mon, Apr 15, 2013 at 9:00 AM, Christopher Nielsen <***@pobox.com
>>> > wrote:
>>>
>>>> After a little work, I have a Plan 9 dev environment setup. My
>>>> dreamplug boots with no problems, and after installing python and
>>>> mercurial, I was able to clone the go repo. The build completes fine on
>>>> 386, but on the dreamplug I get the errors below. Yes, I know I should
>>>> probably be running as a user other than bootes; this was a quick and dirty
>>>> install to get things running. Also, opnames.h does exist.
>>>>
>>>> dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>>> --rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>>>
>>>> Also, it doesn't look like the tests are being run on 386. Forgive my
>>>> ignorance, but is that currently intentional?* *I haven't had time to
>>>> search the list.
>>>>
>>>> cmd/gc
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
>>>> switch expression must be integer
>>>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
>>>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
>>>> switch expression must be integer
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
>>>> switch expression must be integer
>>>> warning:
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
>>>> used and not set: fn
>>>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
>>>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>>>
>>>> --
>>>> Christopher Nielsen
>>>> "They who can give up essential liberty for temporary safety, deserve
>>>> neither liberty nor safety." --Benjamin Franklin
>>>> "The tree of liberty must be refreshed from time to time with the blood
>>>> of patriots & tyrants." --Thomas Jefferson
>>>>
>>>
>>>
>>>
>>> --
>>> - curiosity sKilled the cat
>>>
>>
>>
>>
>> --
>> Christopher Nielsen
>> "They who can give up essential liberty for temporary safety, deserve
>> neither liberty nor safety." --Benjamin Franklin
>> "The tree of liberty must be refreshed from time to time with the blood
>> of patriots & tyrants." --Thomas Jefferson
>>
>
>
Gorka Guardiola
2013-04-15 08:43:24 UTC
Permalink
On Mon, Apr 15, 2013 at 10:31 AM, kernel panic <***@gmx.de> wrote:

> go is using switch on vlongs. support for this was backported to plan9 c
> compiler
> some time ago. just update the compilers from sources.
>
>
> Last time I checked (like a week ago) it did not work with 5c.

G.
kernel panic
2013-04-15 09:02:49 UTC
Permalink
yes. you are right, it doesnt work for 5c.

--
cinap

Gesendet: Montag, 15. April 2013 um 10:43 Uhr
Von: "Gorka Guardiola" <***@gmail.com>
An: "Fans of the OS Plan 9 from Bell Labs" <***@9fans.net>
Betreff: Re: [9fans] Go Plan9 ARM Dreamplug

 
 
On Mon, Apr 15, 2013 at 10:31 AM, kernel panic <***@gmx.de> wrote:

go is using switch on vlongs. support for this was backported to plan9 c compiler
some time ago. just update the compilers from sources.
 
 
Last time I checked (like a week ago) it did not work with 5c.
 
G.
 
l***@proxima.alt.za
2013-04-15 09:55:41 UTC
Permalink
> yes. you are right, it doesnt work for 5c.

Somewhere the 8c fixes for the switch selector were merged together
with other changes and no one has been able to extricate them so they
could be applied to 5c (et al.). I believe that forsyth is looking
into this, but it would be great to have this fixed soon and Charles
no doubt has his own priorities.

But only src/cmd/gc/subr.c and src/cmd/gc/reflect.c suffer from this.
I have an (int) cast in the relevant switch clauses and it's been fine
for a long time.

++L
Charles Forsyth
2013-04-15 11:02:57 UTC
Permalink
On 15 April 2013 10:55, <***@proxima.alt.za> wrote:

>
> Somewhere the 8c fixes for the switch selector were merged together
> with other changes and no one has been able to extricate them so they
> could be applied to 5c (et al.).


Um. No, that's not the problem. In fact, the changes were redone ages ago,
and most of the work is done by port, based on per-platform settings.
The platform must support OREGPAIR in some form, and 5c does not.

I have got a 5c that does vlongs, and thus OREGPAIR,
but it won't compile ghostscript yet, so it hasn't been released.
l***@proxima.alt.za
2013-04-15 11:21:32 UTC
Permalink
> I have got a 5c that does vlongs, and thus OREGPAIR,
> but it won't compile ghostscript yet, so it hasn't been released.

I'm not sure how to phrase this, but presumably the Go version of 5c
has been upgraded to deal with vlong switch selectors: is the Plan 9
version going to differ a lot from the Go one? No offence intended
here, just some concern.

Just as I am concerned that the Go C compilers are now rejecting
pointers inside unions (if I understood the discussion correctly).

++L
kernel panic
2013-04-15 08:31:23 UTC
Permalink
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>go is using switch on vlongs. support for this was backported to plan9 c compiler</div>

<div>some time ago. just update the compilers from sources.</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Von:</b> &quot;Skip Tavakkolian&quot; &lt;***@gmail.com&gt;</div>

<div name="quoted-content">
<div>/usr/fst/Go1/src/cmd/gc/reflect.c:1022[/usr/fst/Go1/src/cmd/gc/reflect.c:3400] switch expression must be integer</div>
</div>
</div>
</div>
</div></div></body></html>
Gorka Guardiola
2013-04-15 08:34:33 UTC
Permalink
1) if you don't change the type of type to be int, it will give you bogus
errors, but
the real problem is that some of the files do not compile.

2) opnames.h is autogenerated by dist. IIRC there is no problem with it
(see 1).

3) I have GOEXPERIM set to ''. You need to set a ton of variables, out of
the top of my head,
assuming you are not cross-compiling:


GOROOT=/sys/src/golang #where the go repository resides
GOOS=plan9
GOARCH=$objtype
GOHOSTARCH=$cputype
GOBIN=/$objtype/bin
GOPATH=/sys/src/go #wher your go stuff resides
GOARM=5 #or 6 or 7, depending on your machine's support of floating point.
GOEXPERIM=''






On Mon, Apr 15, 2013 at 10:22 AM, Skip Tavakkolian <
***@gmail.com> wrote:

> I'm getting something similar on Sheeva. It also looks like there are
> still env issues:
>
> sheeva% ./all.rc
> # Building C bootstrap tool.
> cmd/dist
>
> # Building compilers and Go bootstrap tool for host, plan9/arm.
> lib9
> libbio
> libmach
> misc/pprof
> cmd/addr2line
> cmd/cov
> cmd/nm
> cmd/objdump
> cmd/pack
> cmd/prof
> cmd/cc
> warning:
> /usr/fst/Go1/src/cmd/cc/y.tab.c:1733[/usr/fst/Go1/src/cmd/cc/y.tab.c:3416]
> result of operation not used
> warning:
> /usr/fst/Go1/src/cmd/cc/y.tab.c:1733[/usr/fst/Go1/src/cmd/cc/y.tab.c:3416]
> result of operation not used
> warning:
> /usr/fst/Go1/src/cmd/cc/y.tab.c:1736[/usr/fst/Go1/src/cmd/cc/y.tab.c:3419]
> set and not used: yymsg
> warning:
> /usr/fst/Go1/src/cmd/cc/y.tab.c:1924[/usr/fst/Go1/src/cmd/cc/y.tab.c:3595]
> set and not used: yyptr
> cmd/gc
> /usr/fst/Go1/src/cmd/gc/reflect.c:1022[/usr/fst/Go1/src/cmd/gc/reflect.c:3400]
> switch expression must be integer
> go tool dist: FAILED: /bin/5c -FTVw -Bp+ -I/usr/fst/Go1/include/plan9
> -I/usr/fst/Go1/include/plan9/arm -I /usr/fst/Go1/src/cmd/gc -o
> $WORK/reflect.5 /usr/fst/Go1/src/cmd/gc/reflect.c: '/env/GOEXPERIMENT' file
> does not exist
> /usr/fst/Go1/src/cmd/gc/subr.c:665[/usr/fst/Go1/src/cmd/gc/subr.c:3240]
> switch expression must be integer
> /usr/fst/Go1/src/cmd/gc/subr.c:2863[/usr/fst/Go1/src/cmd/gc/subr.c:5373]
> switch expression must be integer
> warning:
> /usr/fst/Go1/src/cmd/gc/subr.c:2846[/usr/fst/Go1/src/cmd/gc/subr.c:5356]
> used and not set: fn
> go tool dist: FAILED: /bin/5c -FTVw -Bp+ -I/usr/fst/Go1/include/plan9
> -I/usr/fst/Go1/include/plan9/arm -I /usr/fst/Go1/src/cmd/gc -o $WORK/subr.5
> /usr/fst/Go1/src/cmd/gc/subr.c: '/env/GOEXPERIMENT' file does not exist
> sheeva%
>
>
>
> On Mon, Apr 15, 2013 at 1:12 AM, Christopher Nielsen <***@pobox.com>wrote:
>
>> I'll give that a shot and see if I get different results. It'll have to
>> be some time tomorrow though. What concerns me is that the error says it
>> can't find opnames.h when it clearly exists.
>>
>>
>> On Mon, Apr 15, 2013 at 12:08 AM, Gorka Guardiola <***@gmail.com>wrote:
>>
>>> This is a known problem with 5c. It cannot switch on vlong. As a
>>> stopgap, you can
>>> change the types of the things being switched on to integer (type, if I
>>> remember right).
>>>
>>> G.
>>>
>>>
>>>
>>> On Mon, Apr 15, 2013 at 9:00 AM, Christopher Nielsen <***@pobox.com
>>> > wrote:
>>>
>>>> After a little work, I have a Plan 9 dev environment setup. My
>>>> dreamplug boots with no problems, and after installing python and
>>>> mercurial, I was able to clone the go repo. The build completes fine on
>>>> 386, but on the dreamplug I get the errors below. Yes, I know I should
>>>> probably be running as a user other than bootes; this was a quick and dirty
>>>> install to get things running. Also, opnames.h does exist.
>>>>
>>>> dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>>> --rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>>>
>>>> Also, it doesn't look like the tests are being run on 386. Forgive my
>>>> ignorance, but is that currently intentional?* *I haven't had time to
>>>> search the list.
>>>>
>>>> cmd/gc
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
>>>> switch expression must be integer
>>>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
>>>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
>>>> switch expression must be integer
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
>>>> switch expression must be integer
>>>> warning:
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
>>>> used and not set: fn
>>>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
>>>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>>>
>>>> --
>>>> Christopher Nielsen
>>>> "They who can give up essential liberty for temporary safety, deserve
>>>> neither liberty nor safety." --Benjamin Franklin
>>>> "The tree of liberty must be refreshed from time to time with the blood
>>>> of patriots & tyrants." --Thomas Jefferson
>>>>
>>>
>>>
>>>
>>> --
>>> - curiosity sKilled the cat
>>>
>>
>>
>>
>> --
>> Christopher Nielsen
>> "They who can give up essential liberty for temporary safety, deserve
>> neither liberty nor safety." --Benjamin Franklin
>> "The tree of liberty must be refreshed from time to time with the blood
>> of patriots & tyrants." --Thomas Jefferson
>>
>
>


--
- curiosity sKilled the cat
Skip Tavakkolian
2013-04-15 09:02:05 UTC
Permalink
Sheeva/Guru -- GOARM=5
RPi -- GOARM=6 or not set (GOARM=6 is default)
Not if DreamPlug is 5 also.

setting GOARCH=arm, etc. before all.rc on an x86 cpu builds Go for x86 and
arm.


On Mon, Apr 15, 2013 at 1:34 AM, Gorka Guardiola <***@gmail.com> wrote:

> 1) if you don't change the type of type to be int, it will give you bogus
> errors, but
> the real problem is that some of the files do not compile.
>
> 2) opnames.h is autogenerated by dist. IIRC there is no problem with it
> (see 1).
>
> 3) I have GOEXPERIM set to ''. You need to set a ton of variables, out of
> the top of my head,
> assuming you are not cross-compiling:
>
>
> GOROOT=/sys/src/golang #where the go repository resides
> GOOS=plan9
> GOARCH=$objtype
> GOHOSTARCH=$cputype
> GOBIN=/$objtype/bin
> GOPATH=/sys/src/go #wher your go stuff resides
> GOARM=5 #or 6 or 7, depending on your machine's support of floating point.
> GOEXPERIM=''
>
>
>
>
>
>
> On Mon, Apr 15, 2013 at 10:22 AM, Skip Tavakkolian <
> ***@gmail.com> wrote:
>
>> I'm getting something similar on Sheeva. It also looks like there are
>> still env issues:
>>
>> sheeva% ./all.rc
>> # Building C bootstrap tool.
>> cmd/dist
>>
>> # Building compilers and Go bootstrap tool for host, plan9/arm.
>> lib9
>> libbio
>> libmach
>> misc/pprof
>> cmd/addr2line
>> cmd/cov
>> cmd/nm
>> cmd/objdump
>> cmd/pack
>> cmd/prof
>> cmd/cc
>> warning:
>> /usr/fst/Go1/src/cmd/cc/y.tab.c:1733[/usr/fst/Go1/src/cmd/cc/y.tab.c:3416]
>> result of operation not used
>> warning:
>> /usr/fst/Go1/src/cmd/cc/y.tab.c:1733[/usr/fst/Go1/src/cmd/cc/y.tab.c:3416]
>> result of operation not used
>> warning:
>> /usr/fst/Go1/src/cmd/cc/y.tab.c:1736[/usr/fst/Go1/src/cmd/cc/y.tab.c:3419]
>> set and not used: yymsg
>> warning:
>> /usr/fst/Go1/src/cmd/cc/y.tab.c:1924[/usr/fst/Go1/src/cmd/cc/y.tab.c:3595]
>> set and not used: yyptr
>> cmd/gc
>> /usr/fst/Go1/src/cmd/gc/reflect.c:1022[/usr/fst/Go1/src/cmd/gc/reflect.c:3400]
>> switch expression must be integer
>> go tool dist: FAILED: /bin/5c -FTVw -Bp+ -I/usr/fst/Go1/include/plan9
>> -I/usr/fst/Go1/include/plan9/arm -I /usr/fst/Go1/src/cmd/gc -o
>> $WORK/reflect.5 /usr/fst/Go1/src/cmd/gc/reflect.c: '/env/GOEXPERIMENT' file
>> does not exist
>> /usr/fst/Go1/src/cmd/gc/subr.c:665[/usr/fst/Go1/src/cmd/gc/subr.c:3240]
>> switch expression must be integer
>> /usr/fst/Go1/src/cmd/gc/subr.c:2863[/usr/fst/Go1/src/cmd/gc/subr.c:5373]
>> switch expression must be integer
>> warning:
>> /usr/fst/Go1/src/cmd/gc/subr.c:2846[/usr/fst/Go1/src/cmd/gc/subr.c:5356]
>> used and not set: fn
>> go tool dist: FAILED: /bin/5c -FTVw -Bp+ -I/usr/fst/Go1/include/plan9
>> -I/usr/fst/Go1/include/plan9/arm -I /usr/fst/Go1/src/cmd/gc -o $WORK/subr.5
>> /usr/fst/Go1/src/cmd/gc/subr.c: '/env/GOEXPERIMENT' file does not exist
>> sheeva%
>>
>>
>>
>> On Mon, Apr 15, 2013 at 1:12 AM, Christopher Nielsen <***@pobox.com>wrote:
>>
>>> I'll give that a shot and see if I get different results. It'll have to
>>> be some time tomorrow though. What concerns me is that the error says it
>>> can't find opnames.h when it clearly exists.
>>>
>>>
>>> On Mon, Apr 15, 2013 at 12:08 AM, Gorka Guardiola <***@gmail.com>wrote:
>>>
>>>> This is a known problem with 5c. It cannot switch on vlong. As a
>>>> stopgap, you can
>>>> change the types of the things being switched on to integer (type, if I
>>>> remember right).
>>>>
>>>> G.
>>>>
>>>>
>>>>
>>>> On Mon, Apr 15, 2013 at 9:00 AM, Christopher Nielsen <
>>>> ***@pobox.com> wrote:
>>>>
>>>>> After a little work, I have a Plan 9 dev environment setup. My
>>>>> dreamplug boots with no problems, and after installing python and
>>>>> mercurial, I was able to clone the go repo. The build completes fine on
>>>>> 386, but on the dreamplug I get the errors below. Yes, I know I should
>>>>> probably be running as a user other than bootes; this was a quick and dirty
>>>>> install to get things running. Also, opnames.h does exist.
>>>>>
>>>>> dreamplug# ls -l /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>>>> --rw-rw-r-- M 15 bootes bootes 3273 Apr 15 02:47
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h
>>>>>
>>>>> Also, it doesn't look like the tests are being run on 386. Forgive my
>>>>> ignorance, but is that currently intentional?* *I haven't had time to
>>>>> search the list.
>>>>>
>>>>> cmd/gc
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:1022[/usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:3400]
>>>>> switch expression must be integer
>>>>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/reflect.5
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/reflect.c:
>>>>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:665[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:3240]
>>>>> switch expression must be integer
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2863[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5373]
>>>>> switch expression must be integer
>>>>> warning:
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:2846[/usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:5356]
>>>>> used and not set: fn
>>>>> go tool dist: FAILED: /bin/5c -FTVw -Bp+
>>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9
>>>>> -I/usr/bootes/src/go-plan9-arm/include/plan9/arm -I
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc -o $WORK/subr.5
>>>>> /usr/bootes/src/go-plan9-arm/src/cmd/gc/subr.c:
>>>>> '/usr/bootes/src/go-plan9-arm/src/cmd/gc/opnames.h' does not exist
>>>>>
>>>>> --
>>>>> Christopher Nielsen
>>>>> "They who can give up essential liberty for temporary safety, deserve
>>>>> neither liberty nor safety." --Benjamin Franklin
>>>>> "The tree of liberty must be refreshed from time to time with the
>>>>> blood of patriots & tyrants." --Thomas Jefferson
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> - curiosity sKilled the cat
>>>>
>>>
>>>
>>>
>>> --
>>> Christopher Nielsen
>>> "They who can give up essential liberty for temporary safety, deserve
>>> neither liberty nor safety." --Benjamin Franklin
>>> "The tree of liberty must be refreshed from time to time with the blood
>>> of patriots & tyrants." --Thomas Jefferson
>>>
>>
>>
>
>
> --
> - curiosity sKilled the cat
>
l***@proxima.alt.za
2013-04-15 10:37:09 UTC
Permalink
> GOROOT=/sys/src/golang #where the go repository resides
> GOOS=plan9
> GOARCH=$objtype
> GOHOSTARCH=$cputype
> GOBIN=/$objtype/bin
> GOPATH=/sys/src/go #wher your go stuff resides
> GOARM=5 #or 6 or 7, depending on your machine's support of floating point.
> GOEXPERIM=''

Of the above, I think GOROOT is computed as ".." during build (from
$GOROOT/src), GOOS and GOARCH can be used to override the defaults,
which are as given by Gorka, to the best of my knowledge. GOHOSTOS
and GOHOSTARCH are almost certainly fine as computed, CGO_ENABLED is
useful and fussy: I would definitely recommend setting it to "0" for
Plan 9 use, it bites me every time I leave it unassigned.

GOBIN should be <something>/$objtype/bin in my opinion, I use
$home/bin/386 for experimental use.

GOEXPERIMENT is lost in the fog of time in my memory. I haven't used
it or needed it for months.

My "go env" on plan9/386:

term% go env
GOARCH='386'
GOBIN='/usr/lucio/bin/386'
GOCHAR='8'
GOEXE=''
GOHOSTARCH='386'
GOHOSTOS='plan9'
GOOS='plan9'
GOPATH='/home/Project/usr/lucio/Project'
GORACE=''
GOROOT='/n/go'
GOTOOLDIR='/n/go/pkg/tool/plan9_386'
CGO_ENABLED='0'

Note the weird GOPATH, it looks as follows in real life, I must report
this as an issue. I haven't had a chance to prove that it's a
problem.

term% echo $GOPATH
/home/Project /usr/lucio/Project

/home/ (and sometimes /n/home/ - it varies) is where I map
/home/lucio/ from foreign servers; no one needs to do that, it may be
a crazy idea.

And for those who may be curious, this is for the Sheeva:

bangle% go env
GOARCH='arm'
GOBIN='/usr/lucio/bin/arm'
GOCHAR='5'
GOEXE=''
GOHOSTARCH='arm'
GOHOSTOS='plan9'
GOOS='plan9'
GOPATH='/home/Project/usr/lucio/Project'
GORACE=''
GOROOT='/n/go'
GOTOOLDIR='/n/go/pkg/tool/plan9_arm'
CGO_ENABLED='0'

++L
Loading...