Beta Plan 9 from User Space


@ptitSeb : thanks for your reply, I'll give it a go tomorrow morning :) I'll try to add a new target to that INSTALL script, i.e if uname -n = pandora then LDFLAGS = blablabla...

IMHO, it's a runtime issue resulting from a compile time issue, except there are no obvious error messages in the logs, and compilation itself didn't fail...

You can have a look at the logs (install.log, install.sum) if you want, they are in /mnt/utmp/plan9port-magicsam/plan9port-master

Cheers, Magic Sam
 
Hi all :)

@ptitSeb : I added a new target to the INSTALL script:
if [ `uname -n` = pandora ]; then
echo "* Running on Pandora, adjusting linker flags"
echo "LDFLAGS='-L/mnt/utmp/codeblocks/usr/lib'" >> $PLAN9/config
fi

I'll keep you all posted.

EDIT: I also need to hack that script for it to find the fontsrv X11 files.

EDIT 2: here is the relevant part
if [ `uname` != Darwin ]; then
# Determine whether fontsrv X11 files are available.
rm -f a.out
gcc -o a.out -c -Iinclude -I/usr/include -I/usr/local/include -I/usr/inc
lude/freetype2 -I/usr/local/include/freetype2 \
-I/usr/X11R6/include -I/usr/X11R6/include/freetype2 src/cmd/fontsrv/
x11.c >/dev/null 2>&1
if [ -f a.out ]; then
echo " fontsrv dependencies found."
echo "FONTSRV=fontsrv" >>$PLAN9/config
else
echo " fontsrv dependencies not found."
echo "FONTSRV=" >>$PLAN9/config
rm -f bin/fontsrv
fi
rm -f a.out
fi

@ptitSeb : I guess I need to add -I/mnt/utmp/codeblocks/usr/include/freetype2 to that list of include directories, right ?

Cheers, Magic Sam
 
Last edited:
@Magic Sam :
Code:
/media/sda1/sources$ uname -m
armv7l
no pandora here, but armv7l

Also, LDFLAGS have an effect only on building (linking to be more precise), not on runtime...
 
Hi @ptitSeb :)

That's "`uname -n` = pandora", not `uname -m`... :p

Am I right about that Freetype 2 include directory ?

Cheers, Magic Sam
 
@Magic Sam : 'uname -n" depends on the installation. It maybe "pandora" for you, but not for me (for example). It's ok for your build system, but will not be shareable...

About freetype2:
Code:
/media/sda1/sources$ pkg-config --cflags freetype2
-I/mnt/utmp/codeblocks/usr/include/freetype2 -I/mnt/utmp/codeblocks/usr/include -I/mnt/utmp/codeblocks/usr/include/libpng16 -I/mnt/utmp/codeblocks/usr/include/harfbuzz
 
@ptitSeb : thanks for your explanation and for the correct CFLAGS :)
* Compiler version:
gcc version 6.1.0 (GCC)
* Running on Linux: checking for NPTL...
NPTL found.
* Running on Pandora, adjusting linker flags
fontsrv dependencies found.
* Building mk...
[...]

pandora:/mnt/utmp/plan9port-magicsam/plan9port-master$ cat config
SYSVERSION=2.6.x
LDFLAGS='-L/mnt/utmp/codeblocks/usr/lib'
FONTSRV=fontsrv

I'll let you know whether it worked correctly or not, compilation can take quite a long time.

EDIT: @ptitSeb : it didn't work :(

Cheers, Magic Sam
 
Last edited:
Hi all,

The github issue regarding graphical applications that don't work is still pending...

In the mean time, I thought I could give Inferno a try :)

Would there be any interest in this operating system ?

EDIT: seems to be compiling correctly (at work) on CentOS 7 x86_64 :p

EDIT 2: confirmed, it runs :) It's really weird to use though !

EDIT 3: compiling on the Pandora :D

EDIT 4: compilation done ! I had to edit some configuration files and create some symlinks (gcc --> arm-gcc), but that's it. As always with Plan 9 / Inferno related stuff, I experience issues with graphical applications... :(
emu: bad display depth 16 chan r5g6b5 xscreendepth 16
Killed

@ptitSeb : I'm sorry to bother you again... Inferno's graphical applications fail with the above error messsage. Do you know which rgb format would match our screen depth (24 bits IIRC) ?

EDIT: see here , here and here for more information.

EDIT: seems to be working a bit better when specifying a colour map, ie: emu -C m8

Cheers, Magic Sam
 
Last edited:
Hi all,

Back to Plan 9 from User Space !

I believe the root cause (of the graphical applications failing to start) to be somewhere in src/cmd/rio (mkriorules.sh ?) and src/cmd/devdraw (mkwsysrules.sh). I think the paths in those scripts are incompatible with the setup from @ptitSeb Code::Blocks:
pandora:/mnt/utmp/plan9port-magicsam/plan9port-master/src/cmd/devdraw$ cat mkwsysrules.sh
#!/bin/sh

[ -f $PLAN9/config ] && . $PLAN9/config

if [ "x$X11" = "x" ]; then
if [ -d /usr/X11R6 ]; then
X11=/usr/X11R6
elif [ -d /usr/local/X11R6 ]; then
X11=/usr/local/X11R6
elif [ -d /usr/X ]; then
X11=/usr/X
elif [ -d /usr/openwin ]; then # for Sun
X11=/usr/openwin
elif [ -d /usr/include/X11 ]; then
X11=/usr
elif [ -d /usr/local/include/X11 ]; then
X11=/usr/local
else
X11=noX11dir
fi
fi

if [ "x$WSYSTYPE" = "x" ]; then
if [ "x`uname`" = "xDarwin" ]; then
if sw_vers | grep 'ProductVersion: 10\.[0-5]\.' >/dev/null; then
WSYSTYPE=osx
else
#echo 1>&2 'WARNING: OS X Lion is not working. Copy binaries from a Snow Leopard system.'
WSYSTYPE=osx-cocoa
fi
elif [ -d "$X11" ]; then
WSYSTYPE=x11
else
WSYSTYPE=nowsys
fi
fi

if [ "x$WSYSTYPE" = "xx11" -a "x$X11H" = "x" ]; then
if [ -d "$X11/include" ]; then
X11H="-I$X11/include"
else
X11H=""
fi
fi

echo 'WSYSTYPE='$WSYSTYPE
echo 'X11='$X11
echo 'X11H='$X11H

if [ $WSYSTYPE = x11 ]; then
echo 'CFLAGS=$CFLAGS '$X11H
echo 'HFILES=$HFILES $XHFILES'
XO=`ls x11-*.c 2>/dev/null | sed 's/\.c$/.o/'`
echo 'WSYSOFILES=$WSYSOFILES '$XO
elif [ $WSYSTYPE = osx ]; then
if [ -d /System/Library/PrivateFrameworks/MultitouchSupport.framework ]; then
echo 'CFLAGS=$CFLAGS -DMULTITOUCH'
echo 'LDFLAGS=$LDFLAGS -F/System/Library/PrivateFrameworks'
fi
echo 'WSYSOFILES=$WSYSOFILES osx-screen-carbon-objc.o osx-draw.o osx-srv.o'
echo 'MACARGV=macargv.o'
elif [ $WSYSTYPE = osx-cocoa ]; then
echo 'WSYSOFILES=$WSYSOFILES osx-draw.o cocoa-screen-objc.o cocoa-srv.o cocoa-thread.o'
echo 'MACARGV=macargv-objc.o'
elif [ $WSYSTYPE = nowsys ]; then
echo 'WSYSOFILES=nowsys.o'
fi

I'll have a look at this ASAP !

Cheers, Magic Sam
 
Try this (fixing the X11 path).
Code:
#!/bin/sh

[ -f $PLAN9/config ] && . $PLAN9/config

if [ "x$X11" = "x" ]; then
if [ -d /usr/X11R6 ]; then
X11=/usr/X11R6
elif [ -d /usr/local/X11R6 ]; then
X11=/usr/local/X11R6
elif [ -d /usr/X ]; then
X11=/usr/X
elif [ -d /usr/openwin ]; then # for Sun
X11=/usr/openwin
elif [ -d /usr/include/X11 ]; then
X11=/usr
elif [ -d /usr/local/include/X11 ]; then
X11=/usr/local
elif [ -d /mnt/utmp/codeblocks/usr/include/X11 ]; then
X11=/mnt/utmp/codeblocks/usr
else
X11=noX11dir
fi
fi

if [ "x$WSYSTYPE" = "x" ]; then
if [ "x`uname`" = "xDarwin" ]; then
if sw_vers | grep 'ProductVersion: 10\.[0-5]\.' >/dev/null; then
WSYSTYPE=osx
else
#echo 1>&2 'WARNING: OS X Lion is not working. Copy binaries from a Snow Leopard system.'
WSYSTYPE=osx-cocoa
fi
elif [ -d "$X11" ]; then
WSYSTYPE=x11
else
WSYSTYPE=nowsys
fi
fi

if [ "x$WSYSTYPE" = "xx11" -a "x$X11H" = "x" ]; then
if [ -d "$X11/include" ]; then
X11H="-I$X11/include"
else
X11H=""
fi
fi

echo 'WSYSTYPE='$WSYSTYPE
echo 'X11='$X11
echo 'X11H='$X11H

if [ $WSYSTYPE = x11 ]; then
echo 'CFLAGS=$CFLAGS '$X11H
echo 'HFILES=$HFILES $XHFILES'
XO=`ls x11-*.c 2>/dev/null | sed 's/\.c$/.o/'`
echo 'WSYSOFILES=$WSYSOFILES '$XO
elif [ $WSYSTYPE = osx ]; then
if [ -d /System/Library/PrivateFrameworks/MultitouchSupport.framework ]; then
echo 'CFLAGS=$CFLAGS -DMULTITOUCH'
echo 'LDFLAGS=$LDFLAGS -F/System/Library/PrivateFrameworks'
fi
echo 'WSYSOFILES=$WSYSOFILES osx-screen-carbon-objc.o osx-draw.o osx-srv.o'
echo 'MACARGV=macargv.o'
elif [ $WSYSTYPE = osx-cocoa ]; then
echo 'WSYSOFILES=$WSYSOFILES osx-draw.o cocoa-screen-objc.o cocoa-srv.o cocoa-thread.o'
echo 'MACARGV=macargv-objc.o'
elif [ $WSYSTYPE = nowsys ]; then
echo 'WSYSOFILES=nowsys.o'
fi
 
Hi all :)

@ptitSeb : thanks for having a look ! I was actually planning to try a similar fix ;)

I'll keep you posted ASAP !

EDIT: @ptitSeb : I'm rebuilding everything with your modification. Stay tuned !

Cheers, Magic Sam
[doublepost=1479292069,1479278055][/doublepost]@ptitSeb : it worked :D

Thanks again for your help, it's as usual really appreciated !

I'll package a new build with updated sources ASAP (this week-end ? )

Cheers, Magic Sam
 
Hi all,

I have uploaded build #2 to the Repo :)

Grab it there while it's hot !
Changelog:

New in build #2

- Updated sources (last commit from November 3rd 2016)
- Updated the runscripts
- Compiled with @ptitSeb 's latest beta Code:Blocks
- Graphical applications (9term, acme, etc...) are now working correctly !
- New screenshots from the Pandora port
- Sources are inside the package

EDIT: many thanks to @ptitSeb and several other people over at Github and Google Groups for their help !

Cheers, Magic Sam
 
Last edited:
[BUMP]
Hi all :)

I just thought this project could be of interest for people in the Plan 9 / Inferno nebula:

http://harvey-os.org/

EDIT: ARMv7 is not supported yet though...

Cheers, Magic Sam
[/BUMP]
 
Hi all :)

I compiled a new version (build #3) yesterday evening.

New in build #3

- Latest version from July 21st 2017
- Compiled with @ptitSeb 's latest beta Code::Blocks (GCC 7.1)
- Updated all libs
- New run script: boots straight into 9term / rc
- Source is inside the package

I'll upload it to the Repo ASAP (on Sunday if time permits).

EDIT: http://repo.openpandora.org/?page=detail&app=plan9port-magicsam

Cheers, Magic Sam
 
Last edited:
Hi again,

I prepared a new build with $PLAN9/dict, news and sky dictionaries out of the PND, in order to download custom dictionaries and sky databases to the SD card (dict and astro commands), and to create news items (news command).

I'll upload it to the Repo ASAP...

Cheers, Magic Sam
 
Shame I can't run weston/wayland on my computer as it seems to have problems with my touchpad on this machine. I guess I should try plugging in a mouse, or running it on another machine with separate USB mouse and keyboard, and see what I can do there.

And a double shame than RDP feels like it has blotted its copybook with the frequency and number of security failings reported, although if you configured an X server to accept connections from the wider internet then I guess you'd be able to man in the middle the default connection too; I'm not sure the X server has received the same scrutiny as Microsoft's RDP implementations. RDP is certainly a lot more performant and nicer to use than VNC or anything older when it comes to talking to windows machines graphically.
 
Back
Top