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

SDL + Linux armv7hl use XDisplay by default, without linking X11 #11539

Closed
akien-mga opened this issue Nov 6, 2018 · 2 comments
Closed

SDL + Linux armv7hl use XDisplay by default, without linking X11 #11539

akien-mga opened this issue Nov 6, 2018 · 2 comments

Comments

@akien-mga
Copy link
Contributor

What happens?

Building PPSSPP 1.7.2 on Mageia 7 armv7hl (with #11538 to make it properly link about libGL.so), I run into the following build issue:

[100%] Linking CXX executable PPSSPPSDL
/usr/bin/cmake -E cmake_link_script CMakeFiles/PPSSPPSDL.dir/link.txt --verbose=1
/usr/bin/c++  -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -DNDEBUG -O2 -g -D_NDEBUG  -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags CMakeFiles/PPSSPPSDL.dir/android/jni/TestRunner.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/DiscordIntegration.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/NativeApp.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/BackgroundAudio.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/DevScreens.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/DisplayLayoutEditor.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/DisplayLayoutScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/EmuScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/GameInfoCache.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/MainScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/MiscScreens.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/PauseScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/GameScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/GameSettingsScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TiltAnalogSettingsScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TiltEventProcessor.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TouchControlLayoutScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TouchControlVisibilityScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/GamepadEmu.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/OnScreenDisplay.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/ControlMappingScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/RemoteISOScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/ReportScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/SavedataScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/Store.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/CwCheatScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/InstallZipScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/ProfilerDraw.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/ui_atlas.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TextureUtil.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/ComboKeyMappingScreen.cpp.o  -o PPSSPPSDL lib/libCore.a -lpthread lib/libCommon.a /lib/libsnappy.so lib/libnative.a /usr/lib/libSDL2.so /usr/lib/libzip.so lib/libpng17.a lib/librg_etc1.a lib/libgason.a lib/libudis86.a -lrt -lpthread /usr/lib/libGLEW.so lib/libkirk.a lib/libcityhash.a lib/libsfmt19937.a lib/libxbrz.a lib/libxxhash.a lib/libSPIRV.a lib/libglslang.a lib/libOGLCompiler.a lib/libOSDependent.a lib/libHLSL.a lib/libSPVRemapper.a lib/libspirv-cross-glsl.a lib/libspirv-cross-core.a lib/libarmips.a /usr/lib/libGL.so /usr/lib/libGLU.so -lEGL -ldl /usr/lib/libavformat.so /usr/lib/libavcodec.so /usr/lib/libswresample.so /usr/lib/libswscale.so /usr/lib/libavutil.so /usr/lib/libz.so lib/libdiscord-rpc.a 
/usr/bin/ld: lib/libnative.a(SDLGLGraphicsContext.cpp.o): undefined reference to symbol 'XOpenDisplay'
/usr/bin/ld: /lib/libX11.so.6: error adding symbols: DSO missing from command line

XOpenDisplay is used in SDL/SDLGLGraphicsContext.cpp by default, unless USING_FBDEV is defined. I'll admit that I'm not familiar with ARM platforms so I don't know if I should be using USING_FBDEV here, but in any case the NOT USING_FBDEV case should likely link against X11 to be able to use XOpenDisplay.

What should happen?

It should link fine out of the box ;)

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

ARMv7 hl build nodes of Mageia's buildsystem, Mageia 7 (Cauldron).
PPSSPP 1.7.1.

@unknownbrackets
Copy link
Collaborator

Perhaps changing:

if(USING_GLES2)
	find_package(X11)
endif()

To:

if(USING_GLES2 OR (USING_EGL AND NOT USING_FBDEV))
	find_package(X11)
endif()

Or something like that? Does that help?

-[Unknown]

@akien-mga
Copy link
Contributor Author

Thanks, I'll try that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants