9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Cross-compiling Plan 9
@ 2014-07-05 13:13 Aleksandar Kuktin
  2014-07-05 13:22 ` Jacob Todd
  2014-07-05 14:02 ` Charles Forsyth
  0 siblings, 2 replies; 16+ messages in thread
From: Aleksandar Kuktin @ 2014-07-05 13:13 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]

Hello list!

Are there any pointers or short instructions or a HOWTO or something
similar on the art of cross-compiling Plan 9 from Linux?

I've recently decided to start using Plan 9 and, because I am a fucking
lunatic, I've decided to download the source code (from
plan9.bell-labs.com) and compile it to a complete system.

Also, since I have decided to piggy-back the booting of Plan 9 on
Linux, where exactly in the source am I supposed to look to figure out
how to boot Plan 9? My plan is to hack Linux and replace the part when
it starts init with a routine to load Plan 9 and pass control to it.

I do all of this because I am dead-set on porting Plan 9 to my
smartphone-turned-handheld computer. Because I'm not sure I won't brick
the device if I muck with the bootloader, I have to go this way since I
have proven that I am capable of changing the kernel without bricking
the device.

-- 
Svi moji e-mailovi su kriptografski potpisani. Proverite ih.
All of my e-mails are cryptographically signed. Verify them.
--
You don't need an AI for a robot uprising.
Humans will do just fine.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-05 13:13 [9fans] Cross-compiling Plan 9 Aleksandar Kuktin
@ 2014-07-05 13:22 ` Jacob Todd
  2014-07-05 14:02 ` Charles Forsyth
  1 sibling, 0 replies; 16+ messages in thread
From: Jacob Todd @ 2014-07-05 13:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

No. Use an installer, then once tinge rebooted cd /sys/src; obtype=arm mk
installn. Replace arm with you architecture of choice.

[-- Attachment #2: Type: text/html, Size: 147 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-05 13:13 [9fans] Cross-compiling Plan 9 Aleksandar Kuktin
  2014-07-05 13:22 ` Jacob Todd
@ 2014-07-05 14:02 ` Charles Forsyth
  2014-07-07 17:41   ` Yoann Padioleau
  1 sibling, 1 reply; 16+ messages in thread
From: Charles Forsyth @ 2014-07-05 14:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

On 5 July 2014 14:13, Aleksandar Kuktin <akuktin@gmail.com> wrote:

>
> Are there any pointers or short instructions or a HOWTO or something
> similar on the art of cross-compiling Plan 9 from Linux?
>

It would be easier to compile using 9vx under Linux, or a virtual plan 9
machine in qemu under Linux.
It is possible to cross-compile directly, but I've only built and used that
environment twice myself
(once for Solaris, once for Linux), and it isn't any longer in any
distributable shape. It might reappear
as a side effect of some work on the compiler suite. It's similar to the
way Inferno's kernel is cross
compiled using the Plan 9 compilers hosted by some other OS, but needs a
few special twists to
deal with the Plan 9 source tree.

[-- Attachment #2: Type: text/html, Size: 1251 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-05 14:02 ` Charles Forsyth
@ 2014-07-07 17:41   ` Yoann Padioleau
  2014-07-07 18:21     ` Skip Tavakkolian
                       ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Yoann Padioleau @ 2014-07-07 17:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]

Hi,

I was able to cross compile Plan9 from MacOS which is probably quite similar
to cross compiling from Linux.

The first thing was to compile the plan9 C compilers
on MacOS. I used https://code.google.com/p/ken-cc/ because this fork
of the Plan9 C compilers are easier to compile on non-plan9 OSes.

Then I installed plan9port which contained a few utilities that are used
when compiling the plan9 kernel (/bin/rc, /bin/mk).

Then I setup a few symlinks at the root e.g.

/lib -> /home/pad/plan9/root/lib
/386 -> /home/pad/plan9/root/386
/sys -> /home/pad/plan9/sys

Finally I have a env.sh that I source that contains important environment variables:
export KENCC=/home/pad/kencc
# need to modify plan9/src/cmd/mk/shell.c and put rcshell as default shell
export PLAN9=/usr/local/plan9

export PATH=$PLAN9/bin:$KENCC/bin:$PATH

#for 8._cp to be found and called
PATH=$PATH:.

export objtype=386
#export objtype=arm
export cputype=386

Then I did a few modifications to plan9 Labs and was able to compile and run everything
under qemu.

My forks:
https://github.com/aryx/fork-kencc
https://github.com/aryx/fork-plan9


On Jul 5, 2014, at 7:02 AM, Charles Forsyth <charles.forsyth@gmail.com<mailto:charles.forsyth@gmail.com>>
 wrote:


On 5 July 2014 14:13, Aleksandar Kuktin <akuktin@gmail.com<mailto:akuktin@gmail.com>> wrote:

Are there any pointers or short instructions or a HOWTO or something
similar on the art of cross-compiling Plan 9 from Linux?

It would be easier to compile using 9vx under Linux, or a virtual plan 9 machine in qemu under Linux.
It is possible to cross-compile directly, but I've only built and used that environment twice myself
(once for Solaris, once for Linux), and it isn't any longer in any distributable shape. It might reappear
as a side effect of some work on the compiler suite. It's similar to the way Inferno's kernel is cross
compiled using the Plan 9 compilers hosted by some other OS, but needs a few special twists to
deal with the Plan 9 source tree.



[-- Attachment #2: Type: text/html, Size: 3705 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-07 17:41   ` Yoann Padioleau
@ 2014-07-07 18:21     ` Skip Tavakkolian
  2014-07-07 18:33       ` Charles Forsyth
  2014-07-07 18:34     ` Charles Forsyth
  2014-07-08  0:10     ` Aleksandar Kuktin
  2 siblings, 1 reply; 16+ messages in thread
From: Skip Tavakkolian @ 2014-07-07 18:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 2561 bytes --]

this is an interesting exercise; however, it is much harder than it needs
to be. perhaps you have other reasons for doing it the hard way.

i posit that bringing up plan9 on qemu and compiling /sys/src is faster
than compiling on macos: kencc+p9p+cross compile plan9 and bring up plan9
on qemu.  i would be happy to be proven wrong.



On Mon, Jul 7, 2014 at 10:41 AM, Yoann Padioleau <pad@fb.com> wrote:

>  Hi,
>
>  I was able to cross compile Plan9 from MacOS which is probably quite
> similar
> to cross compiling from Linux.
>
>  The first thing was to compile the plan9 C compilers
> on MacOS. I used https://code.google.com/p/ken-cc/ because this fork
> of the Plan9 C compilers are easier to compile on non-plan9 OSes.
>
>  Then I installed plan9port which contained a few utilities that are used
> when compiling the plan9 kernel (/bin/rc, /bin/mk).
>
>  Then I setup a few symlinks at the root e.g.
>
>  /lib -> /home/pad/plan9/root/lib
> /386 -> /home/pad/plan9/root/386
> /sys -> /home/pad/plan9/sys
>
>  Finally I have a env.sh that I source that contains important
> environment variables:
>  export KENCC=/home/pad/kencc
> # need to modify plan9/src/cmd/mk/shell.c and put rcshell as default shell
> export PLAN9=/usr/local/plan9
>
>  export PATH=$PLAN9/bin:$KENCC/bin:$PATH
>
>  #for 8._cp to be found and called
> PATH=$PATH:.
>
>  export objtype=386
> #export objtype=arm
> export cputype=386
>
>  Then I did a few modifications to plan9 Labs and was able to compile and
> run everything
> under qemu.
>
>  My forks:
> https://github.com/aryx/fork-kencc
> https://github.com/aryx/fork-plan9
>
>
>  On Jul 5, 2014, at 7:02 AM, Charles Forsyth <charles.forsyth@gmail.com>
>  wrote:
>
>
> On 5 July 2014 14:13, Aleksandar Kuktin <akuktin@gmail.com> wrote:
>
>>
>> Are there any pointers or short instructions or a HOWTO or something
>> similar on the art of cross-compiling Plan 9 from Linux?
>>
>
> It would be easier to compile using 9vx under Linux, or a virtual plan 9
> machine in qemu under Linux.
> It is possible to cross-compile directly, but I've only built and used
> that environment twice myself
> (once for Solaris, once for Linux), and it isn't any longer in any
> distributable shape. It might reappear
> as a side effect of some work on the compiler suite. It's similar to the
> way Inferno's kernel is cross
> compiled using the Plan 9 compilers hosted by some other OS, but needs a
> few special twists to
> deal with the Plan 9 source tree.
>
>
>

[-- Attachment #2: Type: text/html, Size: 4293 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-07 18:21     ` Skip Tavakkolian
@ 2014-07-07 18:33       ` Charles Forsyth
  0 siblings, 0 replies; 16+ messages in thread
From: Charles Forsyth @ 2014-07-07 18:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

On 7 July 2014 19:21, Skip Tavakkolian <skip.tavakkolian@gmail.com> wrote:

> i posit that bringing up plan9 on qemu and compiling /sys/src is faster
> than compiling on macos: kencc+p9p+cross compile plan9 and bring up plan9
> on qemu.  i would be happy to be proven wrong.


yes, i think it might.

on linux I use 9vx (not sure about MacOS).

also, when i originally did cross compilation from Solaris (which it was) I
wasn't allowed to change
the system by adding symbolic links but that makes it easier than having to
add parameters to mkfiles.

[-- Attachment #2: Type: text/html, Size: 1034 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-07 17:41   ` Yoann Padioleau
  2014-07-07 18:21     ` Skip Tavakkolian
@ 2014-07-07 18:34     ` Charles Forsyth
  2014-07-07 18:47       ` Yoann Padioleau
  2014-07-08  0:10     ` Aleksandar Kuktin
  2 siblings, 1 reply; 16+ messages in thread
From: Charles Forsyth @ 2014-07-07 18:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

On 7 July 2014 18:41, Yoann Padioleau <pad@fb.com> wrote:

>
>  The first thing was to compile the plan9 C compilers
> on MacOS. I used https://code.google.com/p/ken-cc/ because this fork
> of the Plan9 C compilers are easier to compile on non-plan9 OSes.
>

I'm (slowly, as usual) bringing those up to date, and will include arm64.

[-- Attachment #2: Type: text/html, Size: 743 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-07 18:34     ` Charles Forsyth
@ 2014-07-07 18:47       ` Yoann Padioleau
  2014-07-07 19:51         ` Charles Forsyth
  0 siblings, 1 reply; 16+ messages in thread
From: Yoann Padioleau @ 2014-07-07 18:47 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

Hi,

Thx a lot Charles for https://code.google.com/p/ken-cc/<https://urldefense.proofpoint.com/v1/url?u=https://code.google.com/p/ken-cc/&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=%2FN9d7W2LRwZks3eyFNLr8Q%3D%3D%0A&m=kAvsCQ2h%2FsxAGKi2jv2IOZ6RdU94%2FThwCj1BUwwuHa8%3D%0A&s=6cc3a6fec9ae89696979739db03eef1df62ed849f99cc320c993d3897fc22f09>

The main issues I had were related to Rune incompatibilities. See:
https://github.com/aryx/fork-kencc/commit/67149c8a19d3dcccb303d9d8de4e679384ca1bf6
https://github.com/aryx/fork-kencc/commit/c0877323424a28e86352bbe172c5dad431441c53
https://github.com/aryx/fork-kencc/commit/160e42f7db33acc7b48e89d5999f5ec3a9c49993
...

On Jul 7, 2014, at 11:34 AM, Charles Forsyth <charles.forsyth@gmail.com<mailto:charles.forsyth@gmail.com>>
 wrote:


On 7 July 2014 18:41, Yoann Padioleau <pad@fb.com<mailto:pad@fb.com>> wrote:

The first thing was to compile the plan9 C compilers
on MacOS. I used https://code.google.com/p/ken-cc/<https://urldefense.proofpoint.com/v1/url?u=https://code.google.com/p/ken-cc/&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=%2FN9d7W2LRwZks3eyFNLr8Q%3D%3D%0A&m=kAvsCQ2h%2FsxAGKi2jv2IOZ6RdU94%2FThwCj1BUwwuHa8%3D%0A&s=6cc3a6fec9ae89696979739db03eef1df62ed849f99cc320c993d3897fc22f09> because this fork
of the Plan9 C compilers are easier to compile on non-plan9 OSes.

I'm (slowly, as usual) bringing those up to date, and will include arm64.


[-- Attachment #2: Type: text/html, Size: 2744 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-07 18:47       ` Yoann Padioleau
@ 2014-07-07 19:51         ` Charles Forsyth
  0 siblings, 0 replies; 16+ messages in thread
From: Charles Forsyth @ 2014-07-07 19:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On 7 July 2014 19:47, Yoann Padioleau <pad@fb.com> wrote:

> The main issues I had were related to Rune incompatibilities. See:


An annoying change to get not much (have a look at some of the crud they
stuff into that enlarged space),
but that will also be changed to match the current versions.

[-- Attachment #2: Type: text/html, Size: 612 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-07 17:41   ` Yoann Padioleau
  2014-07-07 18:21     ` Skip Tavakkolian
  2014-07-07 18:34     ` Charles Forsyth
@ 2014-07-08  0:10     ` Aleksandar Kuktin
  2014-07-09  0:10       ` kokamoto
  2014-07-13 19:11       ` Aleksandar Kuktin
  2 siblings, 2 replies; 16+ messages in thread
From: Aleksandar Kuktin @ 2014-07-08  0:10 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1896 bytes --]

>On Mon, 7 Jul 2014 17:41:35 +0000
>Yoann Padioleau <pad@fb.com> wrote:
>
> Hi,
> 
> I was able to cross compile Plan9 from MacOS which is probably quite
> similar to cross compiling from Linux.
> 
> The first thing was to compile the plan9 C compilers
> on MacOS. I used https://code.google.com/p/ken-cc/ because this fork
> of the Plan9 C compilers are easier to compile on non-plan9 OSes.
> 
> Then I installed plan9port which contained a few utilities that are
> used when compiling the plan9 kernel (/bin/rc, /bin/mk).
> 
> Then I setup a few symlinks at the root e.g.
> 
> /lib -> /home/pad/plan9/root/lib
> /386 -> /home/pad/plan9/root/386
> /sys -> /home/pad/plan9/sys
> 
> Finally I have a env.sh that I source that contains important
> environment variables: export KENCC=/home/pad/kencc
> # need to modify plan9/src/cmd/mk/shell.c and put rcshell as default
> shell export PLAN9=/usr/local/plan9
> 
> export PATH=$PLAN9/bin:$KENCC/bin:$PATH
> 
> #for 8._cp to be found and called
> PATH=$PATH:.
> 
> export objtype=386
> #export objtype=arm
> export cputype=386
> 
> Then I did a few modifications to plan9 Labs and was able to compile
> and run everything under qemu.
> 
> My forks:
> https://github.com/aryx/fork-kencc
> https://github.com/aryx/fork-plan9

Thanks, Yoann.

Ken-cc may be the missing piece of the puzzle for me, however it is a
little too early to tell. Right now I'm working on compiling the kernel
which SHOULD, theoretically, be easier then userspace since the kernel
is far, far more hermetic than the userspace.

Anyhow, I'll be sure to post the method for doing it, should I
eventually end up victorious.

-- 
Svi moji e-mailovi su kriptografski potpisani. Proverite ih.
All of my e-mails are cryptographically signed. Verify them.
--
You don't need an AI for a robot uprising.
Humans will do just fine.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-08  0:10     ` Aleksandar Kuktin
@ 2014-07-09  0:10       ` kokamoto
  2014-07-09  7:24         ` Charles Forsyth
  2014-07-13 19:11       ` Aleksandar Kuktin
  1 sibling, 1 reply; 16+ messages in thread
From: kokamoto @ 2014-07-09  0:10 UTC (permalink / raw)
  To: 9fans

I got a little bit big size of it by compiling it on my 386
Plan9 machine than doing on pi itself.
Is this natural?

Kenji




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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-09  0:10       ` kokamoto
@ 2014-07-09  7:24         ` Charles Forsyth
  2014-07-10  2:02           ` kokamoto
  0 siblings, 1 reply; 16+ messages in thread
From: Charles Forsyth @ 2014-07-09  7:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

do you mean size using the size command or size using ls -l?



On 9 July 2014 01:10, <kokamoto@hera.eonet.ne.jp> wrote:

> I got a little bit big size of it by compiling it on my 386
> Plan9 machine than doing on pi itself.
> Is this natural?
>
> Kenji
>
>
>

[-- Attachment #2: Type: text/html, Size: 602 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-09  7:24         ` Charles Forsyth
@ 2014-07-10  2:02           ` kokamoto
  0 siblings, 0 replies; 16+ messages in thread
From: kokamoto @ 2014-07-10  2:02 UTC (permalink / raw)
  To: 9fans

> do you mean size using the size command or size using ls -l?

Yes, however I know now two edittion of the 9pi sources,
one on my 386 mashin, and the other on my pi machine
are slightly different each other.   Sorry my noise.

Kenji




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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-08  0:10     ` Aleksandar Kuktin
  2014-07-09  0:10       ` kokamoto
@ 2014-07-13 19:11       ` Aleksandar Kuktin
  2014-07-14 22:19         ` David du Colombier
  1 sibling, 1 reply; 16+ messages in thread
From: Aleksandar Kuktin @ 2014-07-13 19:11 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2937 bytes --]

>On Tue, 8 Jul 2014 02:10:37 +0200
>Aleksandar Kuktin <akuktin@gmail.com> wrote:
>
> >On Mon, 7 Jul 2014 17:41:35 +0000
> >Yoann Padioleau <pad@fb.com> wrote:
> >
> > Hi,
> > 
> > I was able to cross compile Plan9 from MacOS which is probably quite
> > similar to cross compiling from Linux.
> > 
> > The first thing was to compile the plan9 C compilers
> > on MacOS. I used https://code.google.com/p/ken-cc/ because this fork
> > of the Plan9 C compilers are easier to compile on non-plan9 OSes.
> > 
> > Then I installed plan9port which contained a few utilities that are
> > used when compiling the plan9 kernel (/bin/rc, /bin/mk).
> > 
> > [snip]
> 
> Ken-cc may be the missing piece of the puzzle for me, however it is a
> little too early to tell. Right now I'm working on compiling the
> kernel which SHOULD, theoretically, be easier then userspace since
> the kernel is far, far more hermetic than the userspace.
> 
> Anyhow, I'll be sure to post the method for doing it, should I
> eventually end up victorious.

Well, I managed to make the kernel and almost everything else I touched
compile. No idea yet on whether it will run. But libscribble is giving
me a really hard time. There is a bunch of #pragmas about incomplete
data structures that the compiler (8c from Kens suite) doesn't
understand and those are holding me back.

As for the rest, the biggest problem is a bug in Kens compiler from
code.google.com. There is a header, a.out.h, which contains a
definition/declaration (I always forget what is a definition and what is
a declaration) of a structure called Sym that is different in the two
header files. As a consequence, the compiler and assembler produce
object files whose symbol tables the archiver is unable to read. As a
consequence of that, the libraries are useless. The solution to this
was to delete the copy in src/libmach/a.out.h, and rebuild everything
with the other copy.

Since I am building everything on Unix, and am using the Unix shell
(bash in my case), I had to rewrite much of the mkfile rules,
specifically ones that deal with loops, conditionals and substituting
outputs from commands. Because all those rules are simple, this was a
trivial task. I also needed to change sed programs embedded all over
the place to be understandable to my systems sed.

Probably the biggest problem was rewriting several programs from the
aux/ directory (/sys/src/cmd/aux/). These are written to be run on Plan
9 and "porting" them to Unix had to be done by hand. Again, since they
are for the most part simple, it wasn't much of a chore. It just had to
be done.

And that wraps up this weeks events in my attempt to compile and run
Plan 9.

-- 
Svi moji e-mailovi su kriptografski potpisani. Proverite ih.
All of my e-mails are cryptographically signed. Verify them.
--
You don't need an AI for a robot uprising.
Humans will do just fine.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-13 19:11       ` Aleksandar Kuktin
@ 2014-07-14 22:19         ` David du Colombier
  2014-07-14 22:31           ` Yoann Padioleau
  0 siblings, 1 reply; 16+ messages in thread
From: David du Colombier @ 2014-07-14 22:19 UTC (permalink / raw)
  To: 9fans

> Since I am building everything on Unix, and am using the Unix shell
> (bash in my case), I had to rewrite much of the mkfile rules,
> specifically ones that deal with loops, conditionals and substituting
> outputs from commands. Because all those rules are simple, this was a
> trivial task. I also needed to change sed programs embedded all over
> the place to be understandable to my systems sed.

If you use plan9port's mk, you can define MKSHELL=rc in the
mkfiles, instead of translating them to bash.

In the same way, you can place $PLAN9/bin at the beginning of
your PATH to use plan9port's sed instead of the Unix one.

In my side, I also tried to compile the Plan 9 programs and
libraries on Unix using Charles' toolchain. It was working
pretty fine. The main issue I encountered was the lack of
support for long Runes in his version.

Thus, I simply copied the related code from Plan 9:

http://www.9legacy.org/9legacy/patch/kencc-rune.diff

--
David du Colombier



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

* Re: [9fans] Cross-compiling Plan 9
  2014-07-14 22:19         ` David du Colombier
@ 2014-07-14 22:31           ` Yoann Padioleau
  0 siblings, 0 replies; 16+ messages in thread
From: Yoann Padioleau @ 2014-07-14 22:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

Yep, I did exactly the same. With kencc+a-few-patches+plan9port+few-symlinks
you can easily cross compile plan9.

See my kencc fork changes:
https://github.com/aryx/fork-kencc/commits/master
(and my fork 9 fork:
https://github.com/aryx/fork-plan9
)
On Jul 14, 2014, at 3:19 PM, David du Colombier <0intro@gmail.com<mailto:0intro@gmail.com>> wrote:

Since I am building everything on Unix, and am using the Unix shell
(bash in my case), I had to rewrite much of the mkfile rules,
specifically ones that deal with loops, conditionals and substituting
outputs from commands. Because all those rules are simple, this was a
trivial task. I also needed to change sed programs embedded all over
the place to be understandable to my systems sed.

If you use plan9port's mk, you can define MKSHELL=rc in the
mkfiles, instead of translating them to bash.

In the same way, you can place $PLAN9/bin at the beginning of
your PATH to use plan9port's sed instead of the Unix one.

In my side, I also tried to compile the Plan 9 programs and
libraries on Unix using Charles' toolchain. It was working
pretty fine. The main issue I encountered was the lack of
support for long Runes in his version.

Thus, I simply copied the related code from Plan 9:

https://urldefense.proofpoint.com/v1/url?u=http://www.9legacy.org/9legacy/patch/kencc-rune.diff&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=%2FN9d7W2LRwZks3eyFNLr8Q%3D%3D%0A&m=aLQhZbTqEOAyTguyZu3l8YOQdmbEXDfuDYgNH8idwCE%3D%0A&s=a9410420e661f42c32ce304cfe6fe28914154e91a65bd7c1c9e5f0f341b0b146

--
David du Colombier



[-- Attachment #2: Type: text/html, Size: 2621 bytes --]

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

end of thread, other threads:[~2014-07-14 22:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-05 13:13 [9fans] Cross-compiling Plan 9 Aleksandar Kuktin
2014-07-05 13:22 ` Jacob Todd
2014-07-05 14:02 ` Charles Forsyth
2014-07-07 17:41   ` Yoann Padioleau
2014-07-07 18:21     ` Skip Tavakkolian
2014-07-07 18:33       ` Charles Forsyth
2014-07-07 18:34     ` Charles Forsyth
2014-07-07 18:47       ` Yoann Padioleau
2014-07-07 19:51         ` Charles Forsyth
2014-07-08  0:10     ` Aleksandar Kuktin
2014-07-09  0:10       ` kokamoto
2014-07-09  7:24         ` Charles Forsyth
2014-07-10  2:02           ` kokamoto
2014-07-13 19:11       ` Aleksandar Kuktin
2014-07-14 22:19         ` David du Colombier
2014-07-14 22:31           ` Yoann Padioleau

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