9fans/plan9port

Unable to install on debian

vlulla opened this issue · 6 comments

vlulla commented

Trying to install on my debian (bookworm) fails. Here's the error message that I get:

cd /home/vijay/code/c/plan9port/src/cmd/devdraw; mk all
9c -I/usr/include mklatinkbd.c
9l -o o.mklatinkbd mklatinkbd.o
./o.mklatinkbd -r $PLAN9/lib/keyboard | sed 's/, }/ }/' >latin1.h
9c -I/usr/include devdraw.c
9c -I/usr/include latin1.c
9c -I/usr/include mouseswap.c
9c -I/usr/include srv.c
9c -I/usr/include winsize.c
9l -o o.devdraw devdraw.o latin1.o mouseswap.o srv.o winsize.o x11-alloc.c x11-cload.c x11-draw.c x11-fill.c x11-get.c x11-keysym2ucs.c x11-load.c x11-pixelbits.c x11-screen.c x11-unload.c 
x11-alloc.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-cload.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-draw.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-fill.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-get.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-load.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-pixelbits.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-screen.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-unload.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
mk: 9l -o o.devdraw ...  : exit status=exit(1)

I tried setting the CFLAGS=-I$PLAN9/include in src/mkhdr but that didn't help. Since this build system is different than the commonly used configure based system in linux distros i am unsure where i ought to make this change. Any pointers/guidance is greatly appreciated!

Just put all p9p related files to /usr/local/plan9 and try to build. There are many places in src, where /usr/local/plan9 hardcoded.

vlulla commented

I tried this and still get the same error.

cd /usr/local/plan9/src/cmd/devdraw; mk all
9c -I/usr/include mklatinkbd.c
9l -o o.mklatinkbd mklatinkbd.o
./o.mklatinkbd -r $PLAN9/lib/keyboard | sed 's/, }/ }/' >latin1.h
9c -I/usr/include devdraw.c
9c -I/usr/include latin1.c
9c -I/usr/include mouseswap.c
9c -I/usr/include srv.c
9c -I/usr/include winsize.c
9l -o o.devdraw devdraw.o latin1.o mouseswap.o srv.o winsize.o x11-alloc.c x11-cload.c x11-draw.c x11-fill.c x11-get.c x11-keysym2ucs.c x11-load.c x11-pixelbits.c x11-screen.c x11-unload.c 
x11-alloc.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-cload.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-draw.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-fill.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-get.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-load.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-pixelbits.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-screen.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
x11-unload.c:1:10: fatal error: u.h: No such file or directory
    1 | #include <u.h>
      |          ^~~~~
compilation terminated.
jxy commented

The 9l command in your output shouldn't have any .c files. What do you get when you run sh ./mkwsysrules.sh?

I guess you don't have some X11 dependencies and somehow it messed up mk rules generation.

vlulla commented

I read. I'm assuming this is the /usr/local/plan9/src/cmd/devdraw/mkwsysrules.sh...which yields:

WSYSTYPE=x11
X11=/usr
X11H=-I/usr/include
CFLAGS=$CFLAGS -I/usr/include
HFILES=$HFILES $XHFILES
WSYSOFILES=$WSYSOFILES 
WSYSHFILES=x11-inc.h x11-keysym2ucs.h x11-memdraw.h
jxy commented

Did you run under that directory $PLAN9/src/cmd/devdraw?

The WSYSOFILES should read like

WSYSOFILES=$WSYSOFILES x11-alloc.o x11-cload.o x11-draw.o x11-fill.o x11-get.o x11-keysym2ucs.o x11-load.o x11-pixelbits.o x11-screen.o x11-unload.o
vlulla commented

No i had not! Running mkwsysrules.sh script in $PLAN9/src/cmd/devdraw showed that WSYSOFILES was not being set correctly. Noticing the difference between your and my output i investigated the mkwsysrules.sh script. It appears that this line was not working for me. I realized that this was because of having QUOTING_STYLE=shell-always defined in my environment!! Whoops....sorry!

Many thanks @jxy for your help/guidance with this. I have now been able to compile all the plan9 programs. I appreciate your help. I'm super excited to try acme!