Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sviscapi opened this issue Aug 4, 2016 · 11 comments
Closed

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

sviscapi opened this issue Aug 4, 2016 · 11 comments

Comments

@sviscapi
Copy link

sviscapi commented Aug 4, 2016

Hi,

I compiled Plan 9 from User Space on the Open Pandora, a gaming handheld running GNU / Linux (ARM).

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

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

Command line only tools work perfectly, but graphical applications (9term, acme, etc...) fail with the following error message:

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

I browsed the web yesterday, and found that missing X11 development libraries may cause this issue. I checked, and libX11-devel, libXt-devel and libXext-devel are part of my development environment, so this can't be the root cause.

Could you please have a look at it ?

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

@sviscapi
Copy link
Author

sviscapi commented Aug 8, 2016

Hi,

I tried again with a modified INSTALL script to fit my environment better.

I added the following parts:

if [ uname -n = pandora ]; then
echo "* Running on Pandora, adjusting linker flags"
echo "LDFLAGS='-L/mnt/utmp/codeblocks/usr/lib'" >> $PLAN9/config
fi

and

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/i
nclude/freetype2 -I/usr/local/include/freetype2
-I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/mnt/utmp/co
deblocks/usr/include/freetype2 -I/mnt/utmp/codeblocks/usr/include
-I/mnt/utmp/codeblocks/usr/include/libpng16 -I/mnt/utmp/codeblocks
/usr/include/harfbuzz 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

but to no avail: graphical applications are still not working.

What am I doing wrong ?

Cheers, Sam

@sviscapi
Copy link
Author

sviscapi commented Aug 8, 2016

logs.zip

Attaching some relevant files (INSTALL, config, install.log and install.sum) for your convenience.

Cheers, Sam

@aoeu
Copy link
Contributor

aoeu commented Aug 8, 2016

Hi,

This is just an educated guess, but try adding -marm to cflags in 9c, and
recompiling with the INSTALL script.

For reference, here's a code review I abandoned that does exactly that:

https://plan9port-review.googlesource.com/#/c/1530/1/bin/9c

That change was necessary to fix similar problems as to what you are
describing when I setup plan9port on an armv7l Chromebook (in a chroot).

Exactly what version of ARM chip your machine is running? uname -m
should reveal that.

Are the GUI programs suggesting when you try to run them?

On Aug 8, 2016 6:37 AM, "sviscapi" notifications@github.com wrote:

logs.zip https://github.com/9fans/plan9port/files/406591/logs.zip

Attaching some relevant files (INSTALL, config, install.log and
install.sum) for your convenience.

Cheers, Sam


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#61 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AApaq2iEWgKkXy_X02RVxXhwhicC_hRoks5qdwbwgaJpZM4JdAtJ
.

@sviscapi
Copy link
Author

sviscapi commented Aug 9, 2016

Hi @aoeu !

The Pandora is running an armv7l chip.

Do you think the following would work ?

if [ uname -n = pandora ]; then
echo "* Running on Pandora, adjusting linker flags"
echo "LDFLAGS='-L/mnt/utmp/codeblocks/usr/lib'" >> $PLAN9/config
echo "CFLAGS='-marm'" >> $PLAN9/config
fi

Thanks, Sam

@sviscapi
Copy link
Author

Hi @aoeu !

I recompiled plan9port with:

echo "CFLAGS='-marm $CFLAGS'" >> $PLAN9/config

pandora:/mnt/utmp/plan9port-magicsam/plan9port-master$ cat config
SYSVERSION=2.6.x
LDFLAGS='-L/mnt/utmp/codeblocks/usr/lib'
CFLAGS='-marm -Ofast -pipe -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -fsingle-precision-constant -fuse-ld=gold -fuse-linker-plugin -fdiagnostics-color=auto -fsigned-char -mneon-for-64bits -mvectorize-with-neon-double'
FONTSRV=fontsrv

Unfortunately, graphical applications are still failing with the same error message:

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

Do you understand what I'm doing wrong ?

Thanks, Sam

logs-v2.zip

@sviscapi
Copy link
Author

Hi again,

While browsing the logs I noticed that "rio" has not been built (no error message though) and was missing from the "bin" directory...

Could that be the root cause of my graphical applications issues ?

Cheers, Sam

@arturocastro
Copy link

arturocastro commented Sep 14, 2016

Hey @sviscapi,

I was just having this issue on CentOS 6.
I thought I had installed all the dependencies, but I saw that rio was not being built (silent, too).

Installing the libXext-devel and libXt-devel packages and retrying INSTALL worked.

Maybe you're missing some deps too?

@sviscapi
Copy link
Author

Hi @arturocastro !

LibXext-devel and libXt-devel are already part of my development environment. I think the root cause is that I'm trying to compile on ARM...

Could someone please have a look at this issue ? Or at least tell me what are ALL the required dependencies for Plan9Port, and where does the INSTALL script expect them to be (as our environment is a bit "exotic", I might have to change some paths here and there...) ?

Finally, an INSTALL script that doesn't fail silently would come in handy too ;)

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

@scopych
Copy link

scopych commented Oct 8, 2016

I have exactly the same problem with netbsd 7.0.1

@sviscapi
Copy link
Author

Hi all,

@rsc : any news regarding this issue ?

Cheers, Sam

@sviscapi
Copy link
Author

Hi all,

Graphical applications are now working on the Pandora. Here are the modifications I had to make:

  • INSTALL

if [ uname -n = pandora ]; then
echo "* Running on Pandora, adjusting linker flags"
echo "LDFLAGS='-L/mnt/utmp/codeblocks/usr/lib'" >> $PLAN9/config
echo "CFLAGS='-marm -I/mnt/utmp/codeblocks/usr/include
-I/mnt/utmp/codeblocks/usr/include/X11 $CFLAGS'" >> $PLAN9/config
fi

[...]
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/
include/freetype2 -I/usr/local/include/freetype2
-I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/mnt/utmp/c
odeblocks/usr/include/freetype2 -I/mnt/utmp/codeblocks/usr/include
-I/mnt/utmp/codeblocks/usr/include/libpng16 -I/mnt/utmp/codeblock
s/usr/include/harfbuzz 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

  • src/cmd/devdraw/mkwsysrules.sh

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

I hope that helps.

Cheers, Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants