Closed gamelaster closed 5 years ago
Well, for you it's
cmake . -DUSING_GLES2=ON -DUSING_FBDEV=ON
I think
On Raspberry Pi repositaries i though is only a Qt4 (the packages what u writes me is not found in Raspbian packages..). And, i tryied you CMAKE command what u writed, i executed that but nothing has been started, why? :O
I didn't understand what you told, had you compiled successfully now? But it's not working? After cmake you need run make, right?
For Qt, you can use Qt4:
libsdl2-dev, qt4-qmake, libqt4-dev, libqt4-opengl-dev
Okey, i will use Qt4 (Qt5 build tooks 2 days -.-). And back to CMAKE. I will just executed CMAKE command, but i dont know what to do more... Oh, im dumb :D yes i forgotten make... So i will go build with CMAKE, after then Qt. Thanks ^^
Yeah, you need to run make after cmake, rsrs. Cmake only config stuff & create the Makefile, then you need to run make command. You can:
mkdir obj/
cd obj/
cmake ../ -DUSING_GLES2=ON -DUSING_FBDEV=ON
make -j4
So it'll create a folder, and will compile all stuff inside this obj/ folder. You can clean the source easily, removing this folder after. The -j4 is in the case you have a quad core CPU, you can use -j2 if dual core, so it'll compile faster.
My Qt build failing.. But the error is interesting:
../GPU/Common/VertexDecoderCommon.cpp:138:1: warning: when initialized here [-Wreorder]
../GPU/Software/Rasterizer.cpp: In function ‘void Rasterizer::DrawLine(const VertexData&, const VertexData&)’:
../GPU/Software/Rasterizer.cpp:1550:1: error: unrecognizable insn:
(insn 2270 2269 2271 13 (set (reg:HI 2 r2)
(reg:SI 73 s10)) ../GPU/Software/Rasterizer.cpp:1537 -1
(nil))
../GPU/Software/Rasterizer.cpp:1550:1: internal compiler error: in extract_insn, at recog.c:2123
Please submit a full bug report,
What GCC version are you using? 4.8 or later, right?
CC=gcc-4.8 CXX=g++-4.8 cmake ../
You may need delete obj/ first and create again.
This error (upper) says a Qt, but anyway, yes i have default a gcc4.7, so i again testing the MAKE build, but i try Qt too again
It does not say Qt, it's a compiler error. You can try a newer version of gcc (4.8), or clang
CC=clang CXX=clang++ cmake ../
Are you sure it's using gcc 4.7?
Delete the obj/ folder, create again and make sure it's using your gcc 4.7:
CC=gcc-4.7 CXX=g++-4.7 cmake ../
You must see something like this in the terminal:
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/bin/gcc-4.7
-- Check for working C compiler: /usr/bin/gcc-4.7 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-4.7
-- Check for working CXX compiler: /usr/bin/g++-4.7 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc-4.7
Yes i has been sure its have 4.7 (now its have 4.8) . I will try CLANG
well, in Qt build i got a interesting error:
g++ -c -pipe -Wno-unused-function -Wno-unused-variable -Wno-strict-aliasing -fno-strict-aliasing -Wno-unused-parameter -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers -std=c++11 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -O3 -ffast-math -Wall -W -D_REENTRANT -DQT_WEBKIT -DUSING_QT_UI -DUSE_FFMPEG -DARM -D_ARCH_32 -DPPSSPP_GIT_VERSION="\"v1.0.1-731-ga3b728d\"" -D__STDC_CONSTANT_MACROS -DSDL -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../Qt -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I../Common -I../ffmpeg/linux/armv7/include -I../../ppsspp -I../Common -I../native -I../native/ext -I../native/ext/glew -I../Qt -I../Qt/Debugger -I/usr/include/SDL2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/X11R6/include -I.moc/ppsspp -I.ui/ppsspp -I. -o .obj/ppsspp/moc_debugger_memorytex.o .moc/ppsspp/moc_debugger_memorytex.cpp
g++ -c -pipe -Wno-unused-function -Wno-unused-variable -Wno-strict-aliasing -fno-strict-aliasing -Wno-unused-parameter -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers -std=c++11 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -O3 -ffast-math -Wall -W -D_REENTRANT -DQT_WEBKIT -DUSING_QT_UI -DUSE_FFMPEG -DARM -D_ARCH_32 -DPPSSPP_GIT_VERSION="\"v1.0.1-731-ga3b728d\"" -D__STDC_CONSTANT_MACROS -DSDL -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../Qt -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I../Common -I../ffmpeg/linux/armv7/include -I../../ppsspp -I../Common -I../native -I../native/ext -I../native/ext/glew -I../Qt -I../Qt/Debugger -I/usr/include/SDL2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/X11R6/include -I.moc/ppsspp -I.ui/ppsspp -I. -o .obj/ppsspp/moc_debugger_vfpu.o .moc/ppsspp/moc_debugger_vfpu.cpp
g++ -c -pipe -Wno-unused-function -Wno-unused-variable -Wno-strict-aliasing -fno-strict-aliasing -Wno-unused-parameter -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers -std=c++11 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -O3 -ffast-math -Wall -W -D_REENTRANT -DQT_WEBKIT -DUSING_QT_UI -DUSE_FFMPEG -DARM -D_ARCH_32 -DPPSSPP_GIT_VERSION="\"v1.0.1-731-ga3b728d\"" -D__STDC_CONSTANT_MACROS -DSDL -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../Qt -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I../Common -I../ffmpeg/linux/armv7/include -I../../ppsspp -I../Common -I../native -I../native/ext -I../native/ext/glew -I../Qt -I../Qt/Debugger -I/usr/include/SDL2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/X11R6/include -I.moc/ppsspp -I.ui/ppsspp -I. -o .obj/ppsspp/qrc_desktop_assets.o .rcc/ppsspp/qrc_desktop_assets.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
Makefile.PPSSPP:682: recipe for target '.obj/ppsspp/qrc_desktop_assets.o' failed
make[1]: *** [.obj/ppsspp/qrc_desktop_assets.o] Error 4
make[1]: Leaving directory '/root/ppsspp/build-qt'
Makefile:177: recipe for target 'sub-PPSSPP-pro-make_default-ordered' failed
make: *** [sub-PPSSPP-pro-make_default-ordered] Error 2
root@raspberrypi:~/ppsspp#
huh?!?
Well, i found the root of trouble, the GL and QT opengl libraries dont found, uh O_O /usr/bin/ld: cannot find -lEGL /usr/bin/ld: cannot find -lQtOpenGL but i have installed apt-get install libqt4-opengl and apt-get install libgl-dev is associated by another packages... O_O
Do you have libegl1-mesa-dev installed?
And you need to install the DEV package: libqt4-opengl-dev
Okey, all i reinstalled and its work, but now is problem with SDL...
.obj/ppsspp/QtMain.o: In function `main':
QtMain.cpp:(.text.startup+0xd3c): undefined reference to `SDLJoystick::SDLJoystick(bool)'
QtMain.cpp:(.text.startup+0xd44): undefined reference to `SDLJoystick::startEventLoop()'
QtMain.cpp:(.text.startup+0xd4c): undefined reference to `SDL_Init'
QtMain.cpp:(.text.startup+0xd9c): undefined reference to `SDL_OpenAudio'
QtMain.cpp:(.text.startup+0xef0): undefined reference to `SDL_CloseAudio'
QtMain.cpp:(.text.startup+0xef8): undefined reference to `SDL_PauseAudio'
QtMain.cpp:(.text.startup+0xf04): undefined reference to `SDLJoystick::~SDLJoystick()'
QtMain.cpp:(.text.startup+0xf44): undefined reference to `SDL_GetError'
QtMain.cpp:(.text.startup+0xf8c): undefined reference to `SDLJoystick::~SDLJoystick()'
collect2: error: ld returned 1 exit status
Makefile.PPSSPP:198: recipe for target 'ppsspp' failed
reinstalled SDL, not helped..
well, at the command where is writed a SDL error
g++ -Wl,-O1 -o ppsspp .obj/ppsspp/QtMain.o .obj/ppsspp/BackgroundAudio.o .obj/ppsspp/ControlMappingScreen.o .obj/ppsspp/CwCheatScreen.o .obj/ppsspp/DevScreens.o .obj/ppsspp/EmuScreen.o .obj/ppsspp/GameInfoCache.o .obj/ppsspp/GamepadEmu.o .obj/ppsspp/GameScreen.o .obj/ppsspp/GameSettingsScreen.o .obj/ppsspp/InstallZipScreen.o .obj/ppsspp/MainScreen.o .obj/ppsspp/MiscScreens.o .obj/ppsspp/NativeApp.o .obj/ppsspp/OnScreenDisplay.o .obj/ppsspp/PauseScreen.o .obj/ppsspp/ReportScreen.o .obj/ppsspp/SavedataScreen.o .obj/ppsspp/Store.o .obj/ppsspp/TiltAnalogSettingsScreen.o .obj/ppsspp/TiltEventProcessor.o .obj/ppsspp/TouchControlLayoutScreen.o .obj/ppsspp/TouchControlVisibilityScreen.o .obj/ppsspp/ui_atlas.o .obj/ppsspp/TestRunner.o .obj/ppsspp/mainwindow.o .obj/ppsspp/ctrldisasmview.o .obj/ppsspp/ctrlmemview.o .obj/ppsspp/ctrlregisterlist.o .obj/ppsspp/ctrlvfpuview.o .obj/ppsspp/debugger_disasm.o .obj/ppsspp/debugger_displaylist.o .obj/ppsspp/debugger_memory.o .obj/ppsspp/debugger_memorytex.o .obj/ppsspp/debugger_vfpu.o .obj/ppsspp/moc_QtMain.o .obj/ppsspp/moc_mainwindow.o .obj/ppsspp/moc_ctrldisasmview.o .obj/ppsspp/moc_ctrlmemview.o .obj/ppsspp/moc_ctrlregisterlist.o .obj/ppsspp/moc_ctrlvfpuview.o .obj/ppsspp/moc_debugger_disasm.o .obj/ppsspp/moc_debugger_displaylist.o .obj/ppsspp/moc_debugger_memory.o .obj/ppsspp/moc_debugger_memorytex.o .obj/ppsspp/moc_debugger_vfpu.o .obj/ppsspp/qrc_desktop_assets.o -L/root/ppsspp/build-qt -L/root/ppsspp/Qt/../ffmpeg/linux/armv7/lib/ -L/usr/lib/arm-linux-gnueabihf -L/usr/X11R6/lib -lCore -lGPU -lCommon -lNative -ldl -lrt -lavformat -lavcodec -lavutil -lswresample -lswscale -lEGL -lz -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread
missing linking to SDL ... But i dont know how to add that :/
Okay, finally, i modified a CMakeList.txt to good build on Raspbian + installed SDL2 manually from buildbot taked to successfull build.. But, when i runned that, its writing Segmentation Fault:
pi@raspberrypi ~/Desktop/ppsspp $ ./PPSSPPSDL
18:44:362 Core/Config.cpp:869 I[LOAD]: Loading controller config: /home/pi/.config/ppsspp/PSP/SYSTEM/controls.ini
18:44:363 Core/Config.cpp:874 E[LOAD]: Failed to read /home/pi/.config/ppsspp/PSP/SYSTEM/controls.ini. Setting controller config to default.
Segmentation fault
When i use a configs from another Linux device, i got again segmentation fault
pi@raspberrypi ~/Desktop/ppsspp $ ./PPSSPPSDL
19:07:927 Core/Config.cpp:869 I[LOAD]: Loading controller config: /home/pi/.config/ppsspp/PSP/SYSTEM/controls.ini
W: /root/ppsspp/native/file/file_util.cpp:215: W: IsDirectory: stat failed on /home/gamiee/Plocha/GTA Liberty City Stories - Kópia.iso
Pixels: 1280 x 720
Segmentation fault
Some backtrace:
Starting program: /root/ppsspp/build/PPSSPPSDL
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x7629d060 (LWP 15514)]
[New Thread 0x75a9d060 (LWP 15515)]
[New Thread 0x7529d060 (LWP 15516)]
[New Thread 0x74a9d060 (LWP 15517)]
34:17:473 Core/Config.cpp:869 I[LOAD]: Loading controller config: /root/.config/ppsspp/PSP/SYSTEM/controls.ini
34:17:473 Core/Config.cpp:874 E[LOAD]: Failed to read /root/.config/ppsspp/PSP/SYSTEM/controls.ini. Setting controller config to default.
[New Thread 0x741a3060 (LWP 15518)]
Pixels: 1280 x 720
Virtual pixels: 1280 x 720
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x741a3060 (LWP 15518)]
0x76cb883c in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
(gdb) bt full
#0 0x76cb883c in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
No symbol table info available.
#1 0x76fa6c00 in start_thread () from /lib/arm-linux-gnueabihf/libpthread.so.0
No symbol table info available.
#2 0x76b17728 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
No symbol table info available.
#3 0x76b17728 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
I strongly recommend you try to create a small app that simply initializes OpenGL, spits out the GL renderer/etc., maybe draws a pattern to the screen, and sleeps for a keypress first.
The Raspberry PI 1 had complexity in getting OpenGL working, so it's best to solve that first. It will probably be easier dealing with something that is: (1) simple and small, (2) quicker to build, (3) targeted directly at the problem.
If you can't get OpenGL to work properly in a small test program, PPSSPP will never work.
Additionally, I will note that the GPU in this device isn't very strong iirc. Don't expect the moon.
-[Unknown]
Actually i got RPI2, but its same. Anyway, i can try it on end of this week cuz im away, but anyway, is possible to enable "better" backtrace/debug for be sure where is trouble? (a compiler param or what?) Thankie, when i arrive back i will continue to run a PPSSPP by test a build small OpenGL app :-) I writing all what i installed and do for someone other can install too ;)
Well, you can get a better backtrace by compiling in debug mode (e.g. with -O0 -g, cmake can do it with cmake -DCMAKE_BUILD_TYPE=Debug
.) But no, there's not really any tracing - unless your driver offers it.
There may even be small app demos that work already. What I'm interested in is just seeing code that works to draw things and initialize OpenGL properly, and was compiled a similar way to PPSSPP.
-[Unknown]
k, maybe you wanna try this:
git clone --progress https://github.com/hrydgard/ppsspp
cd ppsspp
git submodule update --init
then copy mesa egl includes (EGL, GLES, GLESv2 and KHR folders - unzip them from http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/mesa_10.1.0.orig.tar.gz) in a folder (let's say /usr/local/include/mesa)
then patch CMakeLists.txt:
awk 'NR==50{print ""
print "set(MIPS OFF)"
print "set(X86 OFF)"
print "set(ARM ON)"
print "set(ARMV7 ON)"
print "set(USING_EGL ON)"
print "set(USING_FBDEV ON)"
print "set(USING_GLES2 ON)"
print "set(USING_QT_UI OFF)"
print "set(MOBILE_DEVICE ON)"
print "set(HEADLESS OFF)"
print "set(UNITTEST OFF)"
print "set(RPI OFF)"
print "include_directories(/usr/local/include/mesa)"
print "link_directories(/opt/vc/lib)"
print "set(SIMULATOR OFF)"
print "set (CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -march=armv7-a -mfpu=neon\")"
print "set (CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=neon\")"}1' CMakeLists.txt > CMakeListsPatched.txt
cp CMakeListsPatched.txt CMakeLists.txt
rm -rf CMakeListsPatched.txt
then patch ffmpeg:
cd ffmpeg
sed -i '/{GENERAL}/d' linux_arm.sh
sed -i '/^build_ARMv6/d' linux_arm.sh
sed -i 's/softfp/hard/g' linux_arm.sh
sed -i 's/make install/make install -j3/g' linux_arm.sh
then run cmake in ppsspp folder:
cd ..
cmake .
then go back to ffmpeg folder and build it:
cd ffmpeg
./linux_arm.sh
then go back to ppsspp folder and build it:
cd ..
cmake .
make -j3
and that should be it.
One small note:
the assumption is that you have SDL2 working on your system.
You also need to patch this file: native/base/PCMain.cpp (https://github.com/hrydgard/native/blob/master/base/PCMain.cpp) to use SDL2 for GLES - instead of initializing GLES by itself (like SDL1). This just means looking where you have #ifdef USING_EGL
and removing that piece of code.
For example, remove the entire block:
#ifdef USING_EGL
EGL_Init();
#endif
because now SDL2 handles all EGL operations. Search all ifdef USING_EGL and remove those blocks in that file.
Another example:
#ifdef USING_EGL
eglSwapBuffers(g_eglDisplay, g_eglSurface);
#else
if (!keys[SDLK_TAB] || t - lastT >= 1.0/60.0)
{
SDL_GL_SwapWindow(g_Screen);
lastT = t;
}
#endif
should be changed to (no more ifdef, else, endif or the code for USING_EGL):
if (!keys[SDLK_TAB] || t - lastT >= 1.0/60.0)
{
SDL_GL_SwapWindow(g_Screen);
lastT = t;
}
Already, is not possible to build ffmpeg on RPI, + RPI2 is ARMv7. Anyway, in ffmpeg repositary is my crosscompiled Linux ARMv7 from Ubuntu, so that is okay i thought. Already is NEEDED SDL2 (its not possible to build with SDL1.2), and when i look, is maybe need just turn off USING_EGL for using a SDL functions. But its interesting the x86 build is going okay when i test it last time (but i saw some bugs anyway). Well anyway, i try your tweaks and we will see. But, i fixed a troubles with libraries by funny tweak, just add to include /usr/include a to libraries /usr/lib and the build going great (but linking so much libraries is worth, but for now is okay, next time i filter that). So, i will try all, but at end of week etc. Just, i thought will be better to use SDL1.2, couse for Raspbian ARE NOT REPOSITARES for SDL2, but its possible to install it from SDL build bot for RPI. So, just test. Thanks for all tips,I Will try that. ;)
I thought this thread was about RPI2. And you said you have RPI2 not RPI. With my instructions, you should get ppsspp on RPI2 working - https://www.youtube.com/watch?v=O8juShfoJtE
Well disabling USING_EGL not helped about segmentation fault so well, i trying to do a @mihailescu2m . Well, @unknownbrackets i tryied to build the hello_pi stuffs, and hello_teapot runs absolutly ok (using GLESv2 and EGL).
Well, when i using a @mihailescu2m patch of CMakeList its taking segmentation fault:
D: /root/ppsspp/native/file/zip_read.cpp:323: D: Registered VFS for prefix : assets/
D: /root/ppsspp/native/file/zip_read.cpp:323: D: Registered VFS for prefix : /root/
50:29:177 Core/Config.cpp:869 I[LOAD]: Loading controller config: /root/.config/ppsspp/PSP/SYSTEM/controls.ini
50:29:178 Core/Config.cpp:874 E[LOAD]: Failed to read /root/.config/ppsspp/PSP/SYSTEM/controls.ini. Setting controller config to default.
Segmentation fault
When i disable USING_EGL, the compile fails
Linking CXX executable PPSSPPSDL
/usr/bin/ld: lib/libnative.a(gl3stub.c.o): undefined reference to symbol 'eglGetProcAddress'
/opt/vc/lib/libEGL.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/PPSSPPSDL.dir/build.make:680: recipe for target 'PPSSPPSDL' failed
make[2]: *** [PPSSPPSDL] Error 1
CMakeFiles/Makefile2:209: recipe for target 'CMakeFiles/PPSSPPSDL.dir/all' failed
make[1]: *** [CMakeFiles/PPSSPPSDL.dir/all] Error 2
Makefile:72: recipe for target 'all' failed
make: *** [all] Error 2
:hushed:
Hello @mihailescu2m, I am trying to compile using your instructions (even I found a retropi-script) made by you. I think your compilation steps are logic, but I am having problems I think because SDL2.
When you said on Aug 24 "the assumption is that you have SDL2 working on your system.". What type of SDL2 we need? I mean, SDL2 with OpenGLES, OpenGL?? There are so many ways to compile SDL2, and I think PPSSPP need an special SDL2 settings. I am trying like follow:
/configure --prefix=/usr \
--enable-sdl-dlopen \
--disable-arts --disable-esd --disable-nas \
--enable-alsa \
--disable-pulseaudio \
--disable-video-wayland \
--without-x --disable-video-x11 --disable-x11-shared \
--disable-video-x11-xcursor --disable-video-x11-xinerama \
--disable-video-x11-xinput --disable-video-x11-xrandr \
--disable-video-x11-scrnsaver --disable-video-x11-xshape \
--disable-video-x11-vm --disable-video-opengl \
--disable-video-directfb --disable-rpath \
--enable-video-opengles --host=arm-raspberry-linux-gnueabihf
Could you tell me more information about your SDL2 version?? Sub libraries like (sdl2-image, sdl2-mixer??) What version is your library??
Thanks!
You need sdl2 packages for raspberry pi. For example, check original retropie scripts for links to their deb packages. Raspbian sdl2 might work too, but I'm not 100% sure. But I am 100% sure debian or Ubuntu SDL won't work, they are based on old version that has no rpi support. Or compile latest sdl2 from their repository with the raspberry pi flag enabled.
On 16 Oct 2015, at 7:17 AM, Jose Antonio Lopez Suarez notifications@github.com wrote:
Hello @mihailescu2m, I am trying to compile using your instructions (even I found a retropi-script) made by you. I think your compilation steps are logic, but I am having problems I think because SDL2.
When you said on Aug 24 "the assumption is that you have SDL2 working on your system.". What type of SDL2 we need? I mean, SDL2 with OpenGLES, OpenGL?? There are so many ways to compile SDL2, and I think PPSSPP need an special SDL2 settings. I am trying like follow:
/configure --prefix=/usr \ --enable-sdl-dlopen \ --disable-arts --disable-esd --disable-nas \ --enable-alsa \ --disable-pulseaudio \ --disable-video-wayland \ --without-x --disable-video-x11 --disable-x11-shared \ --disable-video-x11-xcursor --disable-video-x11-xinerama \ --disable-video-x11-xinput --disable-video-x11-xrandr \ --disable-video-x11-scrnsaver --disable-video-x11-xshape \ --disable-video-x11-vm --disable-video-opengl \ --disable-video-directfb --disable-rpath \ --enable-video-opengles --host=arm-raspberry-linux-gnueabihf — Reply to this email directly or view it on GitHub.
Well, with SDL2 built from source, and the above CMakeLists tweaking, ppsspp compiles, starts, immediately dies:
16:50:227 Core/Config.cpp:859 I[LOAD]: Loading controller config: /home/pi/.config/ppsspp/PSP/SYSTEM/controls.ini 16:50:227 Core/Config.cpp:864 E[LOAD]: Failed to read /home/pi/.config/ppsspp/PSP/SYSTEM/controls.ini. Setting controller config to default. pure virtual method called terminate called without an active exception Pixels: 1680 x 1050 Virtual pixels: 1680 x 1050
Can you get a stack trace? Pure virtual call is bad.
-[Unknown]
Reading symbols from build/PPSSPPSDL...done. (gdb) run Starting program: /home/pi/ppsspp111/build/PPSSPPSDL [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1". [New Thread 0x76206050 (LWP 15603)] [New Thread 0x758ff050 (LWP 15604)] [New Thread 0x750ff050 (LWP 15605)] [New Thread 0x748ff050 (LWP 15606)] W: file_util.cpp:178: IsDirectory: stat failed on assets/lang/en_US.ini W: file_util.cpp:178: IsDirectory: stat failed on /home/pi/lang/en_US.ini [New Thread 0x73b20050 (LWP 15608)] pure virtual method called Pixels: 1680 x 1050 Virtual pixels: 1680 x 1050 terminate called without an active exception
Program received signal SIGABRT, Aborted. [Switching to Thread 0x73b20050 (LWP 15608)] 0x76a15f50 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt full
0 0x76a15f50 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
_sys_result = <optimized out> pd = 0x73b20050 pid = <optimized out> selftid = 15608
1 0x76a17304 in __GI_abort () at abort.c:89
save_stage = 2 act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = > {1990537140, 1992822896, 1991383520, 45, 45, 1992822896, 1991383520, 1996447744, 1992085504, 868504, 1941046544, 0, 1992170908, 1, 1941044108, 1996350484, 1996441392, 1, 5, 0, 1991383520, 1990122408, 1, 1992953856, 0, 240, 19582032, 1996436672, 0, 1996378028, 45, 0}}, sa_flags = 1, sa_restorer = 0x0} sigs = {__val = {32, 0 <repeats 31 times>}}
2 0x76c19b5c in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
No symbol table info available.
3 0x76c179a0 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
No symbol table info available. Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Hmm, that doesn't say much. Are you able to get HEADLESS=1 or UNITTEST=1 to compile (you can also set them to ON in the CMakeCache.) If they compile and run fine, then at least we know it's likely somethign UI related.
-[Unknown]
I had this same crash and wasn't able to get a useful backtrace, but did step through and I think it crashed during some graphics / gpu related code. I can try and debug again and actually make a note of it.
Does the Pi 2 fully support NEON? Maybe it's best to try disabling that here too?
http://forums.ppsspp.org/showthread.php?tid=2108&pid=111909#pid111909
If we can determine what code is crashing, maybe we can determine why / solve it. I seem to remember Pi 1 required some call to init the driver, does Pi 2 also?
-[Unknown]
the rpi2 does have neon but I can certainly try disabling.
I can confirm by disabling as mentioned on the forum thread makes it work.
So this is something related to RPI2 NEON support you think or something in the code ? Will dig further.
Could be a different ABI - normally there are specific rules about when you need to save the NEON registers, and maybe they're handled differently?
NEON definitely works on other devices, but it's most tested on Android. I think it's been tested on other Linux but honestly I'm not sure.
-[Unknown]
I see one issue about to test with a fix - i just compiled with VERBOSE=1 and i see that -mcpu=cortex-a9 is being set when ARMV7 is enabled. That would be a problem. Testing with the correct cpu flag now.
Will recompile test and submit a pull request with fixes for the CMakeLists.txt (it's also missing an include for RPI, and it should automatically enable GLES2/FBDEV for the rpi also)
Okay, sounds good. Does ppsspp-ffmpeg's build script need any changes? It might also have the same mcpu.
-[Unknown]
Yeh - im currently doing this (as part of a build script)
diff --git a/linux_arm.sh b/linux_arm.sh
index db2cb69..ece75f6 100755
--- a/linux_arm.sh
+++ b/linux_arm.sh
@@ -117,6 +117,3 @@ make clean
make install
}
-build_ARMv6
-build_ARMv7
-echo Linux ARM builds finished
and then manually building with
cd ffmpeg
# get the ffmpeg configure variables from the ppsspp ffmpeg distributed script
source linux_arm.sh
./configure \
--cc=gcc-4.8 \
--cpu=cortex-a7 \
--prefix="./linux/$(uname -m)" \
--extra-cflags="-fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300" \
--disable-shared \
--enable-static \
--enable-zlib \
--enable-pic \
--disable-everything \
${MODULES} \
${VIDEO_DECODERS} \
${AUDIO_DECODERS} \
${VIDEO_ENCODERS} \
${AUDIO_ENCODERS} \
${DEMUXERS} \
${MUXERS} \
${PARSERS}
# disable XVMC as it will be enabled if X headers are available, but we don't want to have to link with X
sed -i "s/CONFIG_XVMC 1/CONFIG_XVMC 0/g" config.h
make clean
make install
Cool, we can just add a build_rpi2.sh or whatever. I guess it would ideally build into a separate dir. Ugh, so many binaries.
-[Unknown]
actually, the ffmpeg build script cpu setting is ok, except it installs to ./linux/armv7 rather than ./linux/armv7l for the rpi. probably should use the prefix as above
does the cmake config currently allow using the system installed libavcodec/libavformat? - saves time then building on linux on rpi etc.
Yeah, I think there's some switch for it. Until recently, some patches weren't in ffmpeg's main tree that were very needed for ATRAC3+ support, but now system ffmpeg ought to be okay as long as it's relatively new. I think it needs to be ffmpeg 2.7 or higher (newer than July 2015.)
I think USE_SYSTEM_FFMPEG=ON will do what you want.
-[Unknown]
still segfaulting with the correct CFLAGS for rpi2 cpu :/
I have disabled every ARM7/NEON specific piece of code I could find, and it still crashes when building with -march=armv7-a but works if switching that to -march=armv6 - so either I have missed some code, or the compiler is generating some bad arm7 code. Still digging though.
I have narrowed it down to the ext/native part of ppsspp at least (building everything else with arm7+neon and arm6 for ext/native )
Hmm, interesting. We do have the fast matrix mul in native.
-[Unknown]
I commented it out in ext/native/math/fast/fast_math.c and it still crashed.
Just in case there is anything of use in here (eg from thread 1) - here is a backtrace for all threads at the point it crashes.
pure virtual method called
terminate called without an active exception
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x73eff020 (LWP 2405)]
0x76a21f50 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x76a21f50 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x76a23304 in __GI_abort () at abort.c:89
#2 0x76c25b5c in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#3 0x76c239a0 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) thread apply all bt
Thread 6 (Thread 0x73eff020 (LWP 2405)):
#0 0x76a21f50 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x76a23304 in __GI_abort () at abort.c:89
#2 0x76c25b5c in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#3 0x76c239a0 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 5 (Thread 0x746ff020 (LWP 2404)):
#0 0x76f9da40 in do_futex_wait (isem=isem@entry=0x76e39b74 <cecservice_notify_available_event+24>)
at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:48
#1 0x76f9daf4 in __new_sem_wait (sem=0x76e39b74 <cecservice_notify_available_event+24>)
at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:69
#2 0x76e28774 in cecservice_notify_func () from /opt/vc/lib/libbcm_host.so
#3 0x768b5da0 in vcos_thread_entry (arg=0x76e39b88 <cecservice_notify_task>)
at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#4 0x76f96e90 in start_thread (arg=0x746ff020) at pthread_create.c:311
#5 0x76ac2128 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92
from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 4 (Thread 0x74eff020 (LWP 2403)):
#0 0x76f9da40 in do_futex_wait (isem=isem@entry=0x76e38dec <tvservice_notify_available_event+24>)
at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:48
#1 0x76f9daf4 in __new_sem_wait (sem=0x76e38dec <tvservice_notify_available_event+24>)
at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:69
#2 0x76e27bb4 in tvservice_notify_func () from /opt/vc/lib/libbcm_host.so
#3 0x768b5da0 in vcos_thread_entry (arg=0x76e38e00 <tvservice_notify_task>)
at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#4 0x76f96e90 in start_thread (arg=0x74eff020) at pthread_create.c:311
#5 0x76ac2128 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92
from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 3 (Thread 0x756ff020 (LWP 2402)):
#0 0x76f9da40 in do_futex_wait (isem=isem@entry=0x76e39c70 <dispmanx_notify_available_event+24>)
at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:48
#1 0x76f9daf4 in __new_sem_wait (sem=0x76e39c70 <dispmanx_notify_available_event+24>)
at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:69
#2 0x76e2bc1c in dispmanx_notify_func () from /opt/vc/lib/libbcm_host.so
#3 0x768b5da0 in vcos_thread_entry (arg=0x76e3a9b0 <dispmanx_notify_task>)
at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#4 0x76f96e90 in start_thread (arg=0x756ff020) at pthread_create.c:311
#5 0x76ac2128 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92
from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 2 (Thread 0x760c7020 (LWP 2401)):
#0 0x76abaadc in ioctl () at ../sysdeps/unix/syscall-template.S:81
---Type <return> to continue, or q <return> to quit---
#1 0x768c7030 in completion_thread () from /opt/vc/lib/libvchiq_arm.so
#2 0x768b5da0 in vcos_thread_entry (arg=0x768d2248 <vchiq_instance+16>)
at /home/dc4/projects/staging/userland/interface/vcos/pthreads/vcos_pthreads.c:144
#3 0x76f96e90 in start_thread (arg=0x760c7020) at pthread_create.c:311
#4 0x76ac2128 in ?? () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:92
from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Thread 1 (Thread 0x76fef000 (LWP 2397)):
#0 0x76f9da40 in do_futex_wait (isem=isem@entry=0x76ec7a40 <khrn_queue+76>)
at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:48
#1 0x76f9daf4 in __new_sem_wait (sem=0x76ec7a40 <khrn_queue+76>) at ../nptl/sysdeps/unix/sysv/linux/sem_wait.c:69
#2 0x768c9acc in vchiu_queue_pop () from /opt/vc/lib/libvchiq_arm.so
#3 0x76eb0c74 in rpc_recv () from /opt/vc/lib/libEGL.so
#4 0x76e4a798 in glGetShaderiv () from /opt/vc/lib/libGLESv2.so
#5 0x00b2e860 in Thin3DGLShader::Compile (this=0x1810a98,
source=0x17fcffc "#ifdef GL_ES\nprecision mediump float;\n#endif\n#ifdef GL_ES\nprecision lowp float;\n#endif\nvarying vec4 oColor0;\nvarying vec2 oTexCoord0;\nuniform sampler2D Sampler0;\nvoid main() { gl_FragColor = texture2D"...)
at /home/pi/RetroPie-Setup/tmp/build/ppsspp/ext/native/thin3d/thin3d_gl.cpp:226
#6 0x00b2f4f4 in Thin3DGLContext::CreateFragmentShader (this=0x1811ea8,
glsl_source=0xec6eac "#ifdef GL_ES\nprecision lowp float;\n#endif\nvarying vec4 oColor0;\nvarying vec2 oTexCoord0;\nuniform sampler2D Sampler0;\nvoid main() { gl_FragColor = texture2D(Sampler0, oTexCoord0) * oColor0; }\n",
hlsl_source=0xec6f6c "struct PS_INPUT { float4 color : COLOR0; float2 uv : TEXCOORD0; };\nsampler2D Sampler0 : register(s0);\nfloat4 main(PS_INPUT input) : COLOR0 {\n return input.color * tex2D(Sampler0, input.uv);\n}\n")
at /home/pi/RetroPie-Setup/tmp/build/ppsspp/ext/native/thin3d/thin3d_gl.cpp:623
#7 0x00b2d8dc in Thin3DContext::CreatePresets (this=0x1811ea8)
at /home/pi/RetroPie-Setup/tmp/build/ppsspp/ext/native/thin3d/thin3d.cpp:100
#8 0x00b2e9f0 in Thin3DGLContext::Thin3DGLContext (this=0x1811ea8)
at /home/pi/RetroPie-Setup/tmp/build/ppsspp/ext/native/thin3d/thin3d_gl.cpp:388
#9 0x00b2fe2c in T3DCreateGLContext ()
at /home/pi/RetroPie-Setup/tmp/build/ppsspp/ext/native/thin3d/thin3d_gl.cpp:803
#10 0x0044baf8 in NativeInitGraphics () at /home/pi/RetroPie-Setup/tmp/build/ppsspp/UI/NativeApp.cpp:514
#11 0x00af6990 in main (argc=1, argv=0x7efff7f4)
at /home/pi/RetroPie-Setup/tmp/build/ppsspp/ext/native/base/PCMain.cpp:621
Heya,
Today i trying to build on my RPI a PPSSPP, but i still failure becouse libswresample has not found.
/home/pi/Desktop/ppsspp/Core/HLE/sceAtrac.cpp:95:38: fatal error: libswresample/swresample.h: Directory or file not exists
I searched alot about that and i found its becouse of ffmpeg, but i installed ffmpeg, but anyway, i probably need a ffmpeg-dev, but thats not for RPI...
Any ideas?
//EDIT: after some exploring i found that file in Hrydgards FFMPEG repository. That repository i got, and i found that file in my "solution". So i dont know why the sceAtrac cant found swresample.h ...