-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Can't compile PPSSPP on the Raspberry Pi 4 #12137
Comments
you are running raspbian? seems this error is because they i think compile by default for Armv6 mode for compatibility reason for first raspberry pi? |
It has an armv8 processor so it seems like it'd be better to compile for armv8. https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/ So that means, remove -[Unknown] |
@mrcmunir but why does it think I'm compiling for ArmV6? I'v told it to use the ArmV7 toolchain |
@unknownbrackets I'll try that. But do keep in mind that raspbian is STILL 32 bit... so only ArmV7 support |
In that case, try -[Unknown] |
We do not support ARMv6. In fact we should probably try to make it error out early with an error message if someone tries to compile for that architecture. |
Hi, I just tried compiling using the recommendation of Running cmake followed by a make -j4 and sudo make install worked fine, however the successfully built PPSSPPSDL executable was not able to launch from the global path (I guess it was not copied to /usr/bin or something similar). pi@raspberrypi:~/ppsspp $ ./PPSSPPSDL
I don't know how up-to-date you PPSSPP developers are with what is going on in the raspberry pi land, but as a piece of information which might be related: The graphics driver has changed for the raspberry pi 4 from the closed source "vc4" to the open source OpenGL "fkms" driver Maybe it has something to do with that. |
@kaiomatico Remove the following lines to make it build and execute correctly. |
Thank you for your suggestions @namanix , I removed line 12,23 and 24, rebuilt and got a little further (even though PPSSPPSDL still seems not to be copied to the local /bin path). Have a look at the screenshot what happens after I have rebuilt ppsspp with your suggested changes and then try to run it: |
On the Pi 3, to get hardware accelerated rendering (which you definitely want), you had to use FBDEV and run without GUI. "failed to add service - already in use?" was shown if you tried to run it in GUI, iirc. Maybe this isn't necessary on the Pi 4, but then you would need to remove USING_FBDEV too. FBDEV basically means that it draws full screen only.
-[Unknown] |
@unknownbrackets Your comment about hardware accelerated rending got me worried if mine actually is. Do you have the core running on the Rpi 3 right now? And can you tell me the fps of a game that you have so that I can check if the Rpi4 does it better? (Just to check if hardware rendering is on) |
@unknownbrackets Thank you for your help, I tried running PPSSPPSDL without starting the X Server, which resulted in the following error message: After that I built PPSSPP without the FBDEV in the .cmake file and tried to run it in the GUI which resulted in this error message again: So somehow I am too stupid to compile it on my own 😆 ... I will probably just wait until a Retropie build becomes available or something similar. By the way I saw that the .cmake file states that it should use GLES2, with the raspberry pi 4 we have GLES3 support. Maybe it is worth optimizing this file further or adding a .cmake file specificially for the raspberry pi 4 because so many things have changed. Thank you all for your efforts |
I don't have it handy, but performance was not great in Crisis Core for example. It sounds like the Pi 4 is generally doing well, so if you're seeing Crisis Core run in game (like when fighting) at better than 50% speed, I think we can safely assume you have hardware accelerated rendering. Check the Pi 3 instructions. It may help performance if you change the CPU scaling to upclock sooner, like with the Pi 3. Hm. I think that non-FBDEV code is actually assuming you're using X11. Maybe it's Wayland or something. Unfortunately, I don't know a lot about X alternatives. But you can try this completely untested code change: https://github.com/hrydgard/ppsspp/compare/master...unknownbrackets:sdl-wm?expand=1 USING_GLES2 just means using OpenGL ES 2.x+ instead of using desktop OpenGL. It also means GLES 3, which we'll automatically detect support for. -[Unknown] |
@unknownbrackets I compiled your current sdl-wm branch and it works great. I've used the attached .cmake file. I just wonder why the PPSSPP version is so old (v0.9.9.1) even though the last commits seem to be just a couple of days old. Anyway thank you! Maybe this patch could be merged. https://user-images.githubusercontent.com/8037196/60742260-e5ab3d80-9f6c-11e9-9dad-1ca02e74b7cb.png https://github.com/hrydgard/ppsspp/files/3363822/raspberry.armv7.cmake.txt |
Thanks for reporting. I wonder if there's some reasonable way to detect the Pi 4 in that file - I don't want to just break Pi 3. There's three parts to the version number: v1.2.3, -1234, and -gabc12345. The second part represents how many changes you are away from the first part. The problem here is that your copy from git doesn't know about any newer release than v0.9.9.1, so it thinks this is just a git build 11,613 changes later than that. You should be able to use something like:
To get the latest git tags, which will make the version number correct (you'd have to rebuild.) -[Unknown] |
You could just do an fopen/fread or cat /proc/cpuinfo and grep for revision "a03111", "b03111" or "c03111". This is what identifies a raspberry pi 4. See this table: https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md My Pi 4 2GB shows the following: |
How does this work? Also, I realized you might've just cloned from my fork, which probably has outdated tags. -[Unknown] |
Oops I just saw that I compiled the master branch 22 hours ago, somehow it just worked, now we don't know why -.- this time I will make sure to checkout the rpi4 branch before compiling. |
Ah, try this line instead - I was just trying to make sure it was using neon and vfpu4:
Instead of:
-[Unknown] |
Running cmake with the edited SET(ARCH_FLAGS ... line works great now, but running make after that leads to the following error (see log) |
Ah, hadn't had a chance to try it - updated the branch, it should compile now (still not sure if it'll work.) It sounds like eff793c was working, though. If it's broken since then, we may want to bisect: (I guess it still needs at least the cmake settings.) In that range, I would suspect #12097... -[Unknown] |
Ok so after realizing yeterday that I successfully ran your master branch rather than the sdl-wm branch I've tried to compile the sdl-wm branch today. It caused the same error I described yesterday (see |
It would be great to bisect to confirm: It's not clear to me if the master on my fork (which is simply an older git build at eff793c) was working without cmake changes or not. But bisecting would tell you when it stopped working for sure. So to be clear, the rpi4 branch (I pushed new code there) still fails with the same error message? That's really weird, because -[Unknown] |
Great, thanks for confirming. Sorry for the confusion, it was really helpful to have you test the different versions. -[Unknown] |
Sounds like we can close this now? |
What happens?
When I compile with:
cmake . -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/raspberry.armv7.cmake
it fails with this error when making:
I've also made a new raspberry.armv8.cmake file in which I changed the mcpu to cortex-a72.
Gives me the same error.
Is this a bug? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered: