Skip to content
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

openmsx - fix building with new versions requiring SDL2 #2772

Merged
merged 1 commit into from Jul 12, 2019

Conversation

Projects
None yet
3 participants
@cmitu
Copy link
Contributor

commented Jul 9, 2019

Newer OpenMSX versions use SDL2 and SDL2-TTF, pull the correct dependencies. The memory used during build increased for a couple of files so bump the required amount of memory (tested on Raspbian Stretch, Pi 3B+).

The new versions also have SDLGL support, so it might be a good candidate for removing the !kms flag for Raspbian Buster. However, I couldn't get it to compile under Buster due to memory constraints (seems it requires more than 1Gb and it locked on my 3B+ test system during compilation so I couldn't get a working version). I can re-try on Buster to test under (f)kms, but it might take a bit.

@psyke83

This comment has been minimized.

Copy link
Member

commented Jul 10, 2019

Buster + FKMS on RPI3:

My install has a lot of dev packages installed already, so it might have enabled additional features beyond what you'd see enabled with the existing dependencies in your PR (e.g. libflac-dev and opengl libs). Maybe you'd like to give them a check and verify that your produced binary doesn't also have additional dependencies that you missed?

	linux-vdso.so.1 (0x7efbf000)
	/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0x76ee8000)
	librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x76eb1000)
	libSDL2-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so.0 (0x76da0000)
	libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x76d75000)
	libSDL2_ttf-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libSDL2_ttf-2.0.so.0 (0x76d5e000)
	libvorbis.so.0 => /usr/lib/arm-linux-gnueabihf/libvorbis.so.0 (0x76d27000)
	libtcl8.6.so => /usr/lib/arm-linux-gnueabihf/libtcl8.6.so (0x76b9f000)
	libGLEW.so.2.1 => /usr/lib/arm-linux-gnueabihf/libGLEW.so.2.1 (0x76af1000)
	libogg.so.0 => /usr/lib/arm-linux-gnueabihf/libogg.so.0 (0x76f1d000)
	libGL.so.1 => /usr/lib/arm-linux-gnueabihf/libGL.so.1 (0x76a5e000)
	libtheoradec.so.1 => /usr/lib/arm-linux-gnueabihf/libtheoradec.so.1 (0x76a34000)
	libpng16.so.16 => /usr/lib/arm-linux-gnueabihf/libpng16.so.16 (0x769f8000)
	libasound.so.2 => /usr/lib/arm-linux-gnueabihf/libasound.so.2 (0x76917000)
	libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x767d0000)
	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x7674e000)
	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76721000)
	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x766f7000)
	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x765a9000)
	/lib/ld-linux-armhf.so.3 (0x76efd000)
	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76596000)
	libpulse-simple.so.0 => /usr/lib/arm-linux-gnueabihf/libpulse-simple.so.0 (0x76582000)
	libpulse.so.0 => /usr/lib/arm-linux-gnueabihf/libpulse.so.0 (0x7652c000)
	libsndio.so.7.0 => /usr/lib/arm-linux-gnueabihf/libsndio.so.7.0 (0x7650b000)
	libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0x763e9000)
	libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0x763ca000)
	libXcursor.so.1 => /usr/lib/arm-linux-gnueabihf/libXcursor.so.1 (0x763b1000)
	libXinerama.so.1 => /usr/lib/arm-linux-gnueabihf/libXinerama.so.1 (0x7639e000)
	libXi.so.6 => /usr/lib/arm-linux-gnueabihf/libXi.so.6 (0x76380000)
	libXrandr.so.2 => /usr/lib/arm-linux-gnueabihf/libXrandr.so.2 (0x76367000)
	libXss.so.1 => /usr/lib/arm-linux-gnueabihf/libXss.so.1 (0x76354000)
	libXxf86vm.so.1 => /usr/lib/arm-linux-gnueabihf/libXxf86vm.so.1 (0x7633f000)
	libwayland-egl.so.1 => /usr/lib/arm-linux-gnueabihf/libwayland-egl.so.1 (0x7632d000)
	libwayland-client.so.0 => /usr/lib/arm-linux-gnueabihf/libwayland-client.so.0 (0x76313000)
	libwayland-cursor.so.0 => /usr/lib/arm-linux-gnueabihf/libwayland-cursor.so.0 (0x762fa000)
	libxkbcommon.so.0 => /usr/lib/arm-linux-gnueabihf/libxkbcommon.so.0 (0x762b1000)
	libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0x7620e000)
	libGLX.so.0 => /usr/lib/arm-linux-gnueabihf/libGLX.so.0 (0x761f0000)
	libGLdispatch.so.0 => /usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0x7615f000)
	libcairo.so.2 => /usr/lib/arm-linux-gnueabihf/libcairo.so.2 (0x76066000)
	libpulsecommon-12.2.so => /usr/lib/arm-linux-gnueabihf/pulseaudio/libpulsecommon-12.2.so (0x75fe5000)
	libcap.so.2 => /lib/arm-linux-gnueabihf/libcap.so.2 (0x75fd0000)
	libdbus-1.so.3 => /lib/arm-linux-gnueabihf/libdbus-1.so.3 (0x75f7f000)
	libbsd.so.0 => /usr/lib/arm-linux-gnueabihf/libbsd.so.0 (0x75f55000)
	libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x75f26000)
	libXrender.so.1 => /usr/lib/arm-linux-gnueabihf/libXrender.so.1 (0x75f0d000)
	libXfixes.so.3 => /usr/lib/arm-linux-gnueabihf/libXfixes.so.3 (0x75ef8000)
	libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0x75ee0000)
	libpixman-1.so.0 => /usr/lib/arm-linux-gnueabihf/libpixman-1.so.0 (0x75e05000)
	libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0x75dbd000)
	libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0x75daa000)
	libxcb-render.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-render.so.0 (0x75d8f000)
	libX11-xcb.so.1 => /usr/lib/arm-linux-gnueabihf/libX11-xcb.so.1 (0x75d7b000)
	libICE.so.6 => /usr/lib/arm-linux-gnueabihf/libICE.so.6 (0x75d55000)
	libSM.so.6 => /usr/lib/arm-linux-gnueabihf/libSM.so.6 (0x75d3e000)
	libXtst.so.6 => /usr/lib/arm-linux-gnueabihf/libXtst.so.6 (0x75d29000)
	libsystemd.so.0 => /lib/arm-linux-gnueabihf/libsystemd.so.0 (0x75c8c000)
	libwrap.so.0 => /lib/arm-linux-gnueabihf/libwrap.so.0 (0x75c74000)
	libsndfile.so.1 => /usr/lib/arm-linux-gnueabihf/libsndfile.so.1 (0x75bf8000)
	libasyncns.so.0 => /usr/lib/arm-linux-gnueabihf/libasyncns.so.0 (0x75be3000)
	libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x75bd0000)
	libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x75bbb000)
	libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0x75b78000)
	libuuid.so.1 => /lib/arm-linux-gnueabihf/libuuid.so.1 (0x75b61000)
	liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0x75b30000)
	liblz4.so.1 => /usr/lib/arm-linux-gnueabihf/liblz4.so.1 (0x75b04000)
	libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0x75a2a000)
	libnsl.so.1 => /lib/arm-linux-gnueabihf/libnsl.so.1 (0x75a06000)
	libFLAC.so.8 => /usr/lib/arm-linux-gnueabihf/libFLAC.so.8 (0x759a6000)
	libvorbisenc.so.2 => /usr/lib/arm-linux-gnueabihf/libvorbisenc.so.2 (0x75914000)
	libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0x758f0000)
	libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0x758c6000)

Please get rid of the !kms flag. Although the SDLGL-PP driver doesn't seem to work, it automatically falls back to the regular SDL driver:

Parameters: 
Executing: /opt/retropie/emulators/openmsx/bin/openmsx "/home/pi/RetroPie/roms/msx/Galaga.zip"
warning: Couldn't activate renderer SDLGL-PP: Failed to init GLEW: Unknown error
Trying to switch to SDL renderer instead...

This may mean that you don't need to worry about adding the OpenGL-related packages to the depends, but I suppose it could be useful for full x11/x64 platforms?

Anyway, aside from the potential missing dependencies, it works absolutely fine on fkms (and yes - the compile was extremely slow, with swap usage observed to reach 950mb without emulationstation running).

@cmitu

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2019

I managed to compile it also also on Buster and got the same results as you - games seem to work, the SDLGL-PP renderer does not, I assume because of the GLEW usage (maybe depending on GLX and needing X11).

Regarding the dependencies, I think the bare minimum is included in the scriptmodule (see this build requirements), the others might get added by pkg-config --libs <dependency>, but I'll check on my system.

I'll give it another look later and remove the kms flag - thank you for the review.

@psyke83

This comment has been minimized.

Copy link
Member

commented Jul 10, 2019

Yeah,there's no need to add dependencies for features we don't need (like X11 or GLEW), I was just thinking that perhaps there may be some mandatory dependencies missing (that you happened to have installed).

I can fire up a buster chroot later today and try compiling from a clean environment to make sure it's ok (and it should hopefully complete faster thanks to less swapping needed).

@cmitu

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2019

Looking at my system (Buster Lite), there are fewer dependencies (i.e. PulseAudio, Wayland, Flac, Vorbisenc), but still some X11 and GL deps. I see libflac and vorbisenc missing here, but they're not used by the emulator.
I will remove glew and re-test (probably leaving it behind isPlatform "x11").

@cmitu

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2019

Removing glew just shaves the GL dependencies, X11 libs are still pulled through, but I think it's ok for now.

@cmitu cmitu force-pushed the cmitu:openmsx-build-fix branch from 7904d00 to e588290 Jul 11, 2019

@cmitu

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2019

Alright, should be fine now:

  • built with glew only for x11 platforms
  • enabled for kms platforms.
@joolswills

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

Thanks for the info / debugging and fix.

@joolswills joolswills merged commit 23c4fae into RetroPie:master Jul 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.