apkenv
apkenv copied to clipboard
Compilation fails on RPi 3
In case this is still alive, the compilation fails on the RPi 3, similar to this issue with:
In file included from compat/gles2_wrappers.c:4:0:
/opt/vc/include/GLES2/gl2.h:49:26: error: two or more data types in declaration specifiers
/opt/vc/include/GLES2/gl2.h:49:1: warning: useless type name in empty declaration [enabled by default]
If I use @krnlyng 's RPi2 branch, the compilation gets almost finished, failing at:
libEGL.so undefined reference to "XCreateImage"
and 4 other similar libEGL errors just with different references.
Did you try linking against the X11 libs? -lX11 -lXext
Also, I wonder if we can get a pull request for @krnlyng's RPi2 branch?
Yep, I linked -lX11 and the compilation was succesful. The problem is that I still can't pretty much run anything. First of all, I tried Portal, but I kinda figured out that probably wasn't gonna work, so I tried a really old version of Fruit Ninja (from ~2014 I think - 1.8.6), and that didn't do anything too.
All of the basic bionic libraries (m, c, stdc++) cannot link because of:
cannot locate '__cxa_finalize'
Then it stops. (BTW Portal segfaults)
Maybe this helps? https://wiki.maemo.org/Apkenv/Game_Compatibility
V. 1.5.4, which should work according to the wiki does the same (+can't find sqrt in libm.so). Though I'm using bionic libs from Oreo, I'll try the old ones too.
Edit: The CM7 libs "cannot map lib*.so, will try general pool", JVM error 12. https://confluence.atlassian.com/bitbucketserverkb/forking-jvm-error-12-cannot-allocate-memory-or-error-12-not-enough-space-779171744.html this doesn't help
@helloOO7 as far as i remember apkenv uses a linker from android 4. android 5 base libraries might still work with it, but libraries from android 6 and above have changed a lot and sometimes depend on extra functionality from the linker, like packed relocations, or custom callbacks in android libdl for namespaces and other things. also last time i checked many applications shipped custom versions of libgui and other android libraries which need further handling. i think your best bet are android libraries from cm10.1 or cm11 or maybe cm12. i would start by getting one of the supported games to work to understand what things do and then add support for the apps you want to run gradually.
@thp i don't remember if that branch was fully working, i only have a beaglebone black and the branch was experimental. but i will look into it :)
@krnlyng
Libs from Lollipop crash with:
unimplemented but required: pthread_gettid_np
Haven't been able to find any version of 4.x for RPi3 nor 2, do you happen to know one?
By the way, your RPi2 branch works just fine compilation and general "running" - wise on the RPi 3. The only problem was that you need to link against -lX11 in rpi2.mk platform file. The Bionic libraries included there are obsolete 2.3 ones though and show the errors mentioned in my previous comment.
Edit: Do you happen to have an app that works on your beaglebone that I could check if it works on my end? Because if it does, then it's probably apkenv's problem, which would be much harder to fix and I doubt anyone would want to do that, considering this was abandoned 2 years ago.
Edit 2: Shall we change the title for future reference?
@HelloOO7 Have you tried with the libs from harmattan?
https://github.com/thp/apkenv/tree/master/libs/harmattan
@thp Yep, tried them and it definitely looks more promising.
https://pastebin.com/mNEPzn1u
(log)
It just hangs from there, but it's definitely progress!
Do you have the $DISPLAY variable set and/or X11 started or is it just running on the framebuffer device? Not sure how the RPi port is set up, but that might be something to look out for.
Also, maybe attach gdb (or run in gdb and then break) and see where it hangs and/or build with make DEBUG=1 to get some more debug output.
Nice, debug mode shows some more useful info. Looks like apkenv is running just fine (the terminal is full of constantly updated lines like:
gl*****()
gl
etc.
It seems that the only problem here is that an X11 windows isn't showing up. Any idea?
@HelloOO7 Is this still an issue? Have you updated to a newer version of Raspbian OS? Has this fixed the issue?
It's been a while since I tested this and I'm kind of in a holiday rush at the moment, but I'll dig out my Pi3 when I get the time and give you an update.
I have tested the current Git master branch on an RPi3 with Raspbian GNU/Linux 11 (bullseye). Instructions are in README.raspberrypi, you can build it using make PLATFORM=rpi3. This might not necessarily be accelerated using VideoCore libs, but the standard (Mesa?) libs seem to work well enough for me.
Edit: Forgot to mention, it's the 32-bit version of Raspbian OS (although the 64-bit version should still support 32-bit userland, as the CPU definitely still supports it, but it's untested and YMMV).