Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Qt build for Linux
#1
I think half a year ago I tried to build Qt version of ppsspp but I didn't manage so I decided to leave this idea till better times. Because current version of ppsspp is fairly good now (ffmpeg video, atrac3plus - though both of them I have to compile separately), I decided to give it one more try to build Qt version. I installed Qt (4.8.5 with QtCreator 2.8.0) but just like before, there are some issues.
Right now, there is an issue with ffmpeg:

Code:
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.8.5/lib -o PPSSPPQt QtMain.o ControlMappingScreen.o EmuScreen.o GameScreen.o GameSettingsScreen.o MainScreen.o PluginScreen.o MiscScreens.o GamepadEmu.o GameInfoCache.o OnScreenDisplay.o UIShader.o TestRunner.o controls.o ctrldisasmview.o ctrlmemview.o ctrlregisterlist.o ctrlvfpuview.o debugger_disasm.o debugger_displaylist.o debugger_memory.o debugger_memorytex.o debugger_vfpu.o EmuThread.o mainwindow.o qkeyedit.o qtemugl.o QtHost.o ui_atlas.o moc_QtMain.o moc_controls.o moc_ctrldisasmview.o moc_ctrlmemview.o moc_ctrlregisterlist.o moc_ctrlvfpuview.o moc_debugger_disasm.o moc_debugger_displaylist.o moc_debugger_memory.o moc_debugger_memorytex.o moc_debugger_vfpu.o moc_mainwindow.o moc_qkeyedit.o moc_qtemugl.o moc_QtHost.o qrc_resources.o qrc_assets.o -L/usr/local/Trolltech/Qt-4.8.5/lib -L/usr/X11R6/lib -L. -lCore -lCommon -lNative -ldl -lz ../ffmpeg/linux/x86_64/lib/libavformat.a ../ffmpeg/linux/x86_64/lib/libavcodec.a ../ffmpeg/linux/x86_64/lib/libavutil.a ../ffmpeg/linux/x86_64/lib/libswresample.a ../ffmpeg/linux/x86_64/lib/libswscale.a -lSDL -lQtMultimedia -L/usr/local/Trolltech/Qt-4.8.5/lib -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread /usr/bin/ld: ../ffmpeg/linux/x86_64/lib/libavformat.a(id3v2.o): undefined reference to symbol 'uncompress' /usr/bin/ld: note: 'uncompress' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libz.so so try adding it to the linker command line /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libz.so: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[1]: Leaving directory

If it matters, SDL version compiles fine and works as planned, and I use Linux Mint 13 (32-bit). But Qt building is still tough to deal with as before.
Can anyone give some advice about it?
Reply
#2
Looks very easy to fix. Just missing a -lz in the linker.
Reply
#3
Well, I saw similar answers but... actually -lz presents in the linker: "<...> -ldl -lz ../ffmpeg/linux/x86_64/lib/libavformat.a <...>" (you can see it in my output in first post).
Reply
#4
Just to be sure that my system isn't bugged in some way, I did a fresh install of Ubuntu 12.04 on VirtualBox and tried to compile ppsspp. Still got the same issue about undefined "uncompress" (zlib is installed; before I did that, I got "unknown parameter -lz" or something like this).
Reply
#5
(08-24-2013, 06:25 AM)necrotek Wrote: Just to be sure that my system isn't bugged in some way, I did a fresh install of Ubuntu 12.04 on VirtualBox and tried to compile ppsspp. Still got the same issue about undefined "uncompress" (zlib is installed; before I did that, I got "unknown parameter -lz" or something like this).

I encountered this problem as well and I went to the build-PPSSPPQt-Desktop-Release folder and edit the Makefile.PPSSPP. Then I moved -lz to the end of the LIBS macro and it worked. I also added -lQtMultimedia as it was missing for me as well.
Reply
#6
Thank you. I tried to move -lz to the end of LIBS and now I get a lot of lines like this "/usr/bin/ld: i386:x86-64 architecture of input file `../ffmpeg/linux/x86_64/lib/libavformat.a(allformats.o)' is incompatible with i386 output" (~165 similar lines related to ffmpeg). After that I tried to compile ffmpeg using linux script before trying to compile ppsspp again, and it did work. But for some reason, I get a "Segmentation fault (core dumped)" without any additional information if I try to run PPSSPPQt.

If I try ro run release build, the application just doesn't show up and gives "Segmentation Fault". If I try to run debug build, application shows up but closes after 1-2 sec (it differs, sometimes almost instantly, sometimes almost after ppsspp logo disappears). Debug output:

Code:
./PPSSPPQt I: ../native/file/zip_read.cpp:227: I: Registered VFS for prefix : assets/ I: ../native/file/zip_read.cpp:227: I: Registered VFS for prefix : ./ QMetaObject::connectSlotsByName: No matching signal for on_language_changed(QAction*) I: ../native/gfx/texture.cpp:235: I: ZIM loaded: 1 levels I: ../native/gfx/texture.cpp:266: I: Gen-binding texture Segmentation fault (core dumped)

If I try to debug the application, it crashes at this line.
Reply
#7
The segfault should be fixed once https://github.com/hrydgard/ppsspp/pull/3369 is merged.
4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Reply
#8
Thank you. I'll check if it solves the issue when the fix is merged and let you know.
Reply
#9
You could always try it now by overwriting your QtHost.cpp with this one from the commit:

https://raw.github.com/Zetro/ppsspp/e837...QtHost.cpp

Up to you, though.
4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Reply
#10
Well, I tried it before I did my last post and it didn't work. I decided that maybe Git system works in different way than I think so I decided to wait until actual merge happens.
In that case, my SegFault and the one you fixed are different Smile
Reply
#11
That's not actually my fix, but that's unfortunate. Sad
4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Reply


Forum Jump: