Graphical applications fail to start on GNU / Linux (ARM)

304 views
Skip to first unread message

Samuel Viscapi

unread,
Nov 14, 2016, 7:40:27 AM11/14/16
to plan9port-dev
Hi all :)

I compiled Plan 9 from User Space some months ago on the Open Pandora, an handheld gaming device running GNU/Linux (ARM):

https://pyra-handheld.com/boards/pages/pandora/

* Release thread:

https://pyra-handheld.com/boards/threads/plan-9-from-user-space.65064/#post-1388455

* Package on the official repository:

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

There's a pending github issue (since early August 2016) regarding graphical applications that fail to start:

https://github.com/9fans/plan9port/issues/61

Could someone please have a look at it ?

Cheers, Sam a.k.a "Magic Sam" from the Open Pandora community

P.S: I have also compiled Inferno on the Open Pandora :)

https://pyra-handheld.com/boards/threads/inferno-operating-system.78360/

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


fge...@gmail.com

unread,
Nov 14, 2016, 8:01:24 AM11/14/16
to svis...@gmx.com, plan9port-dev
(I believe more context could probably help.)

i)
If the root cause is some build error: what does install.log say about
compile or link errors?
hint: look for ^9c or ^9l lines
plan9port should build without any _errors_.

ii)
If the root cause is something else, what is the exact command you are
trying to run?

iii)
On rpi, I get "muxrpc: unexpected eof" when I run (e.g) acme as root,
then exit acme, then I try to run acme as normal user.
-> try acme as root.

My experience is that, if inferno emu is running correctly, plan9port
won't need anything else to build and work correctly.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "plan9port-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to plan9port-de...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Gleydson Soares

unread,
Nov 14, 2016, 8:04:11 AM11/14/16
to svis...@gmx.com, plan9port-dev
what happens if you runs `9 acme' ?

Samuel Viscapi

unread,
Nov 14, 2016, 10:38:59 AM11/14/16
to plan9port-dev, svis...@gmx.com
Hi,

Sorry for the lack of context, I posted the message in a hurry this morning.

I) If I'm not mistaken, there were no build errors at all (logs are attached to the github issue if you want to check), even though some parts were not built correctly (e.g "rio" is missing from the bin directory).

II) Many Plan 9 Port commands run correctly, but graphical applications (like acme) fail to start with the following error message:

usage: devdraw (don't run directly)
acme: can't open display: muxrpc: unexpected eof

Best, Sam

Samuel Viscapi

unread,
Nov 14, 2016, 10:38:59 AM11/14/16
to plan9port-dev, svis...@gmx.com
Hi,

I get the following message when trying to run "acme" (or any other graphical application):


usage: devdraw (don't run directly)
acme: can't open display: muxrpc: unexpected eof

Best, Sam

Gleydson Soares

unread,
Nov 14, 2016, 10:41:59 AM11/14/16
to svis...@gmx.com, plan9port-dev
Did you have tried to run acme wrapping it with 9 script?
Looks like your $PLAN9 and $PATH are broken.

Samuel Viscapi

unread,
Nov 15, 2016, 2:27:46 PM11/15/16
to plan9port-dev, svis...@gmx.com
Hi Gleydon,

I've just tried running acme trough the "9" wrapper, to no avail, it fails with the exact same message. For information, my $PLAN9 and $PATH look as follows:

PLAN9=/mnt/utmp/plan9port-magicsam/plan9port-master export PLAN9
PATH=$PATH:$PLAN9/bin export PATH

Also of importance is that non graphical applications work as expected. They wouldn't if paths were broken (AFAIK).

Best, Samuel

Samuel Viscapi

unread,
Nov 15, 2016, 2:36:35 PM11/15/16
to plan9port-dev, svis...@gmx.com
Hi Gergely,

I tried to run acme as root, and it fails the same way (usage: devdraw (don't run directly)...). I believe the root cause to be that, for an unknown reason, "rio" failed to build correctly on the Pandora (but without any obvious error message in the logs). That would explain why graphical applications don't work IMHO.

Best, Samuel

On Monday, November 14, 2016 at 2:01:24 PM UTC+1, Gergely Födémesi wrote:

fge...@gmail.com

unread,
Nov 16, 2016, 2:54:03 AM11/16/16
to svis...@gmx.com, plan9port-dev
Hi,
you don't need rio (the windowing part of plan9port) for the
graphical applications to run.

Though your install.log shows that relevant X headers and/or libs are
not used during build. Take a look at this line in your logs.zip:
9l -o o.devdraw nowsys.o -L/mnt/utmp/codeblocks/usr/lib

As far as I know nowsys.o is built and linked either when no graphic
headers/libraries are found or plan9port is configured explicitly. See
also nowsys reference here:
https://swtch.com/plan9port/man/man1/install.html

My relevant line:
9l -o o.devdraw devdraw.o latin1.o mouseswap.o winsize.o x11-alloc.o
x11-cload.o x11-draw.o x11-fill.o x11-get.o x11-init.o x11-itrans.o
x11-keysym2ucs.o x11-load.o x11-pixelbits.o x11-srv.o x11-unload.o
x11-wsys.o

cheers,
fgergo

fge...@gmail.com

unread,
Nov 16, 2016, 3:10:52 AM11/16/16
to Samuel Viscapi, plan9port-dev
Another hint: _IF_ you _must_ add /mnt/utmp/codeblocks/usr/lib to
LDFLAGS, try to add it from the shell before running install (e.g.
LDFLAGS=$LDFLAGS:/mnt/utmp/codeblocks/usr/lib ./INSTALL) and not
configure LDFLAGS explicitly in $PLAN9/config.
Otherwise don't change default LDFLAGS.

For comparison my config:
SYSVERSION=2.6.x
FONTSRV=

Samuel Viscapi

unread,
Nov 16, 2016, 10:18:15 PM11/16/16
to plan9port-dev, svis...@gmx.com
Hi Gergely,

Good news ! Graphical applications are now working :) I had a look at rio's mkfile yesterday, and noticed a bunch of hard-coded paths in src/cmd/devdraw/mkwsysrules.sh. There, I just added the correct path to the X11 include files on the Pandora:

elif [ -d /mnt/utmp/codeblocks/usr/include/X11 ]; then
X11=/mnt/utmp/codeblocks/usr
else
X11=noX11dir
fi

And that's it ! Graphical applications (acme, 9term, etc...) are now working perfectly ! I think this is pretty consistent with what you found on your end regarding nowsys.o.

The complete list of changes I had to make for graphical applications to run on the Pandora is available on the github issue (now closed) mentioned in the 1st post.

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

Cheers, Sam a.k.a "Magic Sam" from the Open Pandora community

Reply all
Reply to author
Forward
0 new messages