0intro / 9legacy

Plan 9 from Bell Labs, with contributions.
https://9p.io/
MIT License
81 stars 16 forks source link

How to build? #17

Open 0Nera opened 3 months ago

0Nera commented 3 months ago

I have compiled the compiler and other programs from https://github.com/9fans/plan9port But when building the kernel, I have problems with paths. mk refers to /sys Is there no way to build plan9 from source using linux?

0intro commented 3 months ago

Unfortunately, it's not possible to build Plan 9 on Linux yet.

In the past, I've experimented to change the mkfiles to be able to build on Linux with the port of Plan 9 C compiler to Unix, and it was quite promising. I may consider looking at it again.

Be aware that it's not possible to build Plan 9 using GCC or clang. Plan 9 uses a different dialect of C than what the standard describes, Plan 9 uses its own calling convention and Plan 9 uses its own a.out executable format. Also, the assembler use a completely different syntax than the usual AT&T or Intel syntax.

Note that the 9c script included into plan9port is just a wrapper on top on GCC. The programs available as part of plan9port are ports of Plan 9 programs. They have been modified to build correctly with GCC.

In the Harvey operating system, based on Plan 9, the approach was to be able to build the system using GCC or clang. It required a lot of changes and a complete rewrite of the assembly code.

fish4terrisa-MSDSM commented 3 months ago

In the Harvey operating system, based on Plan 9, the approach was to be able to build the system using GCC or clang. It required a lot of changes and a complete rewrite of the assembly code.

Harvey seems to be archived now. It's developers started a new project r9, which is a os written with rust and accepts some of the plan9 designs.