Discussion:
[9fans] Go on Plan9/Arm
(too old to reply)
l***@proxima.alt.za
2012-10-19 18:45:59 UTC
Permalink
Now that the sheevaplug is running again, I thought I'd try compiling
Go on it, see how far I'd get.

It seems not very far at all and I'm sure I'm just not seeing the wood
for the trees. Compilation stops when int32 isn't defined:

bangle% ./make.rc
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, plan9/arm.
lib9
libbio
libmach
/usr/lucio/Project/go/include/plan9/../mach.h:37 /usr/lucio/Project/go/include/plan9/mach.h:5 /usr/lucio/Project/go/src/libmach/5obj.c:35 syntax error, last name: int32
go tool dist: FAILED: /bin/5c -FTVw -I/usr/lucio/Project/go/include/plan9 -I/usr/lucio/Project/go/include/plan9/arm -I /usr/lucio/Project/go/src/libmach -o $WORK/5obj.5 /usr/lucio/Project/go/src/libmach/5obj.c: '/usr/lucio/Project/go/pkg/obj/plan9_arm/libmach.a' does not exist
/usr/lucio/Project/go/include/plan9/../mach.h:37 /usr/lucio/Project/go/include/plan9/mach.h:5 /usr/lucio/Project/go/src/libmach/5.c:36 syntax error, last name: int32
/usr/lucio/Project/go/include/plan9/../mach.h:37 /usr/lucio/Project/go/include/plan9/mach.h:5 /usr/lucio/Project/go/src/libmach/5db.c:33 syntax error, last name: int32
go tool dist: FAILED: /bin/5c -FTVw -I/usr/lucio/Project/go/include/plan9 -I/usr/lucio/Project/go/include/plan9/arm -I /usr/lucio/Project/go/src/libmach -o $WORK/5.5 /usr/lucio/Project/go/src/libmach/5.c: '/usr/lucio/Project/go/pkg/obj/plan9_arm/libmach.a' does not exist
/usr/lucio/Project/go/include/plan9/../mach.h:37 /usr/lucio/Project/go/include/plan9/mach.h:5 /usr/lucio/Project/go/src/libmach/6.c:36 syntax error, last name: int32
go tool dist: FAILED: /bin/5c -FTVw -I/usr/lucio/Project/go/include/plan9 -I/usr/lucio/Project/go/include/plan9/arm -I /usr/lucio/Project/go/src/libmach -o $WORK/5db.5 /usr/lucio/Project/go/src/libmach/5db.c: '/usr/lucio/Project/go/pkg/obj/plan9_arm/libmach.a' does not exist
go tool dist: FAILED: /bin/5c -FTVw -I/usr/lucio/Project/go/include/plan9 -I/usr/lucio/Project/go/include/plan9/arm -I /usr/lucio/Project/go/src/libmach -o $WORK/6.5 /usr/lucio/Project/go/src/libmach/6.c: '/usr/lucio/Project/go/pkg/obj/plan9_arm/libmach.a' does not exist

What I don't understand is where the 386 compilation finds the int32
definition missing in arm. I looked in the obvious places and my guess
is that the "go" tool does not use the same rules to search for header
files. No doubt I'm wrong :-|

Any ideas? It's latish here and my thought processes have slowed
down...

++L
Charles Forsyth
2012-10-19 19:46:04 UTC
Permalink
Try compiling under iostats.
Post by l***@proxima.alt.za
What I don't understand is where the 386 compilation finds the int32
definition missing in arm. I lo
l***@proxima.alt.za
2012-10-20 04:34:57 UTC
Permalink
Post by Charles Forsyth
Try compiling under iostats.
Thanks for the suggestion, Charles. It does look even more baffling,
but I will look deeper for the relevant details. In the meantime,
these snippets may amuse:

...
1 2 2142 0 0 /usr/lucio/Project/go/include/ureg_x86.h
...
1 2 466 0 0 /amd64/include/ureg.h
...
1 2 193 0 0 /usr/lucio/Project/go/include/plan9/ureg_amd64.h
...

I'll see if I can track these references, they may after all be legitimate.

++L
l***@proxima.alt.za
2012-10-20 06:52:00 UTC
Permalink
Post by Charles Forsyth
Try compiling under iostats.
Thanks, Charles, that helped locate the absence of an
"include/plan9/arm/u.h" that seemingly just needs to add a few missing
definitions to the native /arm/include/u.h file.

I also tightened up a few spots in the Go release code and
successfully arrived to the point where all the z* files need to be
put together. Sadly, I'm not competent to do this.

So, I'm now going to submit the minor fixes to the Go developers, then
it will be easier for others to take things further. I'll make an
announcement here as soon as my submissions have been incorporated
into the development code base.

++L
Jeremy Jackins
2013-03-21 16:54:38 UTC
Permalink
Sorry to dredge up an old thread, but did you get any further with
this Lucio? I'm getting a similar error building current Go tip.
Francisco J Ballesteros
2013-03-21 17:23:30 UTC
Permalink
I think Gorka has it running.
At least, it runs in our rpi's.
Post by Jeremy Jackins
Sorry to dredge up an old thread, but did you get any further with
this Lucio? I'm getting a similar error building current Go tip.
Francisco J Ballesteros
2013-03-21 17:29:39 UTC
Permalink
yes, checked and runs on 386, amd64, and arm.
with the 9 tree from sources.

iirc, I had to do some changes for amd64 and gorka had to port to arm.

hth
Post by Francisco J Ballesteros
I think Gorka has it running.
At least, it runs in our rpi's.
Post by Jeremy Jackins
Sorry to dredge up an old thread, but did you get any further with
this Lucio? I'm getting a similar error building current Go tip.
Jeremy Jackins
2013-03-21 18:24:37 UTC
Permalink
Fantastic, I'll be waiting on the edge of my seat for this!

l***@proxima.alt.za
2013-03-21 17:23:43 UTC
Permalink
Post by Jeremy Jackins
Sorry to dredge up an old thread, but did you get any further with
this Lucio? I'm getting a similar error building current Go tip.
Not at all, the timing is pretty good. Gorka (Paurea) is currently
busy with the Go port to Plan 9/arm and he's confident he'll have it
out soon. I haven't actually helped him any so far, but I will be
testing his submissions as soon as I have a trustworthy platform, a
few things are out of kilt around here.

I would expect an announcement from Gorka in the near future.

++L
Continue reading on narkive:
Loading...