[Vm-dev] VM building on Pi, OpenGL libraries and other fun things

tim Rowledge tim at rowledge.org
Tue Aug 8 04:50:14 UTC 2017


I’ve been trying to build a Pi vm with the B3DAcceleratorPlugin and FFI access to the openGL library recently. It’s been… interesting.

First problem was actually building a vm; I haven’t done that in a month or two and the latest Raspbian combined with the latest Mac OS and the nfs setup I’ve had in use for the last 5 years just didn’t want to function. When I first started using nfs to let me keep all the sources on my iMac and build directly in those directories it worked just fine. Then Raspbian got ‘improved’ by moving to a Debian Jessie base and I had to find out a bunch of new parameters to add to the /etc/fstab line. And it started to need `sudo` so that the `install` command in the makefiles would work. And it had problems with permissions under xrdp.

Gradually this has got more and more onerous so recently I converted to using RealVNC, which is after all the Raspbian default now. It’s ok I suppose but having to make the Pi think it has a real monitor attached is a nuisance at times. It does, however, get past a load of the permissions issues and even allows GP to run (see gpblocks.org) despite the SDL stuff being a bit persnickety.

Lately though it got completely impossible to persuade the vm build to run properly because of permissions arguments. I spent altogether too much brain-juice on tracking down what might  be the problem and I don’t really think I found a satisfactory exposition on the issues. As best I can make out the nfs subsystem simply doesn’t want to accept that uid 20 on the Pi is equivalent to uid 1000 on the mac. One of the complications these days is that the web is so flooded with stuff that googling finds more than you can possibly evaluate and if you are struggling to find really meaningful search terms you’re screwed - you don’t understand enough to be able to get to understand enough.

So, I tried a different approach and this is where it might be useful information for others out there; after all nfs is still reasonably common and Pis are everywhere and it is possibly good advice for other combinations anyway. I installed afpfs-ng (never heard of it before) and used that to mount the relevant Mac OS directories. Instant improvement in behaviour. No problem building the vm. I suspect it’s at least in part because you specify the uid/pwd for the access you want instead of semi-magical nfs incantations that no longer work.

Bascially
`sudo apt-get install afpfs-ng`
`mkdir mymountpoint`
`chmod og-rwx mymountpoint`
`mount_afp afp://username:password@macnameorip/targetdir mymountpoint`
or to be more literal
mount_afp afp://fred:flintstone@fredMac/squeakdev /home/pi/squeakdev
It works with FUSE, so maybe you want to install that too.

Once I could actually build the vm I tried adding B3DAcceleratorPlugin to the build list. I’ve actually tried this before several years ago according to my notes and I could swear I’d managed to build it, but nothing in my notes suggests that to be the case. It certainly didn’t want to work now. Looking at the config.log it looked like the GL directory and the relevant header file were in place but the GL library wasn’t found. After much more blundering about I discovered that glXMakeCurrent is actually in libGL (which seemed odd after reading that it is part of openGLX, but that’s unix for you) and that I did indeed have a /usr/lib/libGL.so.1 file (well a link to the ‘real’ library) and yet… no worky. In desperation I made a link for libGL.so without the .1 suffix and… build. Runs Balloon3D examples. So now it would be nice to know why what appears to be a crucial file is not installed.

Question for other linux users - do you have a libGL.so file? Did you have to install mesa-common-dev? Can you make a vm with a working B3DAcceleratorPlugin?


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Fractured Idiom:- FELIX NAVIDAD - Our cat has a boat




More information about the Vm-dev mailing list