u3d-community / U3D

Open-source, cross-platform 2D and 3D game engine built in C++
https://u3d.io
MIT License
172 stars 29 forks source link

Upgrade to SDL 2.26.4 #4

Open klaussilveira opened 1 year ago

SirNate0 commented 1 year ago

I think newer Wayland breaks the current SDL, though it sounds like the newer version fixes it. Or in my case just disabling VIDEO_WAYLAND in CMake, as I use X11.

klaussilveira commented 1 year ago

I started this upgrade to gauge how complex it would be and quickly realized it wouldn't be a walk in the park. I'm considering adding a bounty to it so we can attract outside developers to the project that would be willing to tackle this, preferably with SDL experience.

KyraDigitalGames commented 1 year ago

Its not very hard to get it running on SDL 2.26.5 (Tested on Windows ony). We only have to exclude not needed features to make the build faster.

Before we make the push we should decide how to handle dependencies in the future. We should change the dependencies to git submodules and link directly to the needed tag. Also we should not change de CMakeLists.txt of the projects directly and should configure it through an external CMakeLists.txt. This would make version migrations a lot easier.

klaussilveira commented 1 year ago

I like the way rbfx does it: https://github.com/rbfx/sample-project/blob/master/CMakeLists.txt#L40

Discussion that sparked it: https://web.archive.org/web/20221127090414/https://discourse.urho3d.io/t/embedding-the-engine-as-a-submodule-and-cmake-module/1636

@eugeneko @rokups have you guys had any issues with this approach? Would you recommend U3D following those steps?

rokups commented 1 year ago

No issues. Note that include of UrhoCommon.cmake is optional too. It is included there only to provide user projects with extra build system functions, but if they are not used then it is enough to just add_subdirectory(../rbfx ...) and link to relevant targets. Fixing urho build system to support this wont be easy though... I basically rewrote 90%+ of build system because old one was just terrible to work with. My old attempt in upstream urho can be found here. Luckily i still have a fork with old branches. 1vanK apparently deleted bulk of branches some of which had really useful even if unfinished stuff. Thanks 1vanK...

Edit: btw, we made a forum backup: https://urho4d.github.io/t/embedding-the-engine-as-a-submodule-and-cmake-module/1636/

SirNate0 commented 1 year ago

Finally had a little bit of time to come back to this. I think I may have tracked down the issue for the 32 bit linux builds. I'm not sure what exactly is the cause, but when I do my own 32 bit linux build with the dockerized build environment, I do get a segmentation fault when running sample 11_Physics, but only when I run it using xvfb-run, which is what the rakefile adds as a wrapper here.

In particular, I am getting a crash at the call to X11_XIGetClientPointer (upstream), because that function pointer is null. For that matter, so is X11_XIWarpPointer a few lines lines later. Essentially, all of the things that are wrapped in #if SDL_VIDEO_DRIVER_X11_XINPUT2.

Basically, I am thinking that xvfb-run is not supporting xinput2, but the build system detected that we have it because the library is installed and would be available in a normal X11 environment. I've not investigated any of that, but it seems plausible.


Notes from a little extra debugging. I enabled the DEBUG_DYNAMIC_X11 prints in SDL_x11dyn.c. These were the results:

Long list of symbols ``` X11: Found 'XAllocSizeHints' in libX11.so.6 (0xf7800030) X11: Found 'XAllocWMHints' in libX11.so.6 (0xf7800090) X11: Found 'XAllocClassHint' in libX11.so.6 (0xf78000c0) X11: Found 'XChangePointerControl' in libX11.so.6 (0xf77e8cb0) X11: Found 'XChangeProperty' in libX11.so.6 (0xf77e8d40) X11: Found 'XCheckIfEvent' in libX11.so.6 (0xf77e8300) X11: Found 'XClearWindow' in libX11.so.6 (0xf77e96a0) X11: Found 'XCloseDisplay' in libX11.so.6 (0xf77e94b0) X11: Found 'XConvertSelection' in libX11.so.6 (0xf77e9e20) X11: Found 'XCreateBitmapFromData' in libX11.so.6 (0xf77ea370) X11: Found 'XCreateColormap' in libX11.so.6 (0xf77ea4c0) X11: Found 'XCreatePixmapCursor' in libX11.so.6 (0xf77ea570) X11: Found 'XCreateFontCursor' in libX11.so.6 (0xf77eb5d0) X11: Found 'XCreateFontSet' in libX11.so.6 (0xf77f0120) X11: Found 'XCreateGC' in libX11.so.6 (0xf77eaad0) X11: Found 'XCreateImage' in libX11.so.6 (0xf77f64f0) X11: Found 'XCreateWindow' in libX11.so.6 (0xf780b4a0) X11: Found 'XDefineCursor' in libX11.so.6 (0xf77eb640) X11: Found 'XDeleteProperty' in libX11.so.6 (0xf77eb6c0) X11: Found 'XDestroyWindow' in libX11.so.6 (0xf77eb840) X11: Found 'XDisplayKeycodes' in libX11.so.6 (0xf77fb840) X11: Found 'XDrawRectangle' in libX11.so.6 (0xf77ec3d0) X11: Found 'XDisplayName' in libX11.so.6 (0xf77eb8c0) X11: Found 'XDrawString' in libX11.so.6 (0xf7809260) X11: Found 'XEventsQueued' in libX11.so.6 (0xf77fe310) X11: Found 'XFillRectangle' in libX11.so.6 (0xf77edca0) X11: Found 'XFilterEvent' in libX11.so.6 (0xf77ee010) X11: Found 'XFlush' in libX11.so.6 (0xf77ee100) X11: Found 'XFree' in libX11.so.6 (0xf780ff30) X11: Found 'XFreeCursor' in libX11.so.6 (0xf77efbe0) X11: Found 'XFreeFontSet' in libX11.so.6 (0xf77f03b0) X11: Found 'XFreeGC' in libX11.so.6 (0xf77efd10) X11: Found 'XFreeFont' in libX11.so.6 (0xf77eede0) X11: Found 'XFreeModifiermap' in libX11.so.6 (0xf77fbb20) X11: Found 'XFreePixmap' in libX11.so.6 (0xf77efdd0) X11: Found 'XFreeStringList' in libX11.so.6 (0xf780a6c0) X11: Found 'XGetAtomName' in libX11.so.6 (0xf77f0a40) X11: Found 'XGetInputFocus' in libX11.so.6 (0xf77f2130) X11: Found 'XGetErrorDatabaseText' in libX11.so.6 (0xf77ecc00) X11: Found 'XGetModifierMapping' in libX11.so.6 (0xf77fb890) X11: Found 'XGetPointerControl' in libX11.so.6 (0xf77f2960) X11: Found 'XGetSelectionOwner' in libX11.so.6 (0xf77f3260) X11: Found 'XGetVisualInfo' in libX11.so.6 (0xf780ad10) X11: Found 'XGetWindowAttributes' in libX11.so.6 (0xf77f3a20) X11: Found 'XGetWindowProperty' in libX11.so.6 (0xf77f2d80) X11: Found 'XGetWMHints' in libX11.so.6 (0xf77f1ae0) X11: Found 'XGetWMNormalHints' in libX11.so.6 (0xf77f2930) X11: Found 'XIfEvent' in libX11.so.6 (0xf77f4430) X11: Found 'XGrabKeyboard' in libX11.so.6 (0xf77f3d20) X11: Found 'XGrabPointer' in libX11.so.6 (0xf77f3e90) X11: Found 'XGrabServer' in libX11.so.6 (0xf77f3f80) X11: Found 'XIconifyWindow' in libX11.so.6 (0xf77f4370) X11: Found 'XKeysymToKeycode' in libX11.so.6 (0xf785bfa0) X11: Found 'XKeysymToString' in libX11.so.6 (0xf77f9630) X11: Found 'XInstallColormap' in libX11.so.6 (0xf77f72e0) X11: Found 'XInternAtom' in libX11.so.6 (0xf77f7960) X11: Found 'XListPixmapFormats' in libX11.so.6 (0xf77fe410) X11: Found 'XLoadQueryFont' in libX11.so.6 (0xf77ef0d0) X11: Found 'XLookupKeysym' in libX11.so.6 (0xf785c320) X11: Found 'XLookupString' in libX11.so.6 (0xf785cef0) X11: Found 'XMapRaised' in libX11.so.6 (0xf77fb530) X11: Found 'XMatchVisualInfo' in libX11.so.6 (0xf780b0c0) X11: Found 'XMissingExtension' in libXext.so.6 (0xf773e000) X11: Found 'XMoveWindow' in libX11.so.6 (0xf77fbce0) X11: Found 'XOpenDisplay' in libX11.so.6 (0xf77fc6b0) X11: Found 'XInitThreads' in libX11.so.6 (0xf77fabd0) X11: Found 'XPeekEvent' in libX11.so.6 (0xf77fe0c0) X11: Found 'XPending' in libX11.so.6 (0xf77fe3a0) X11: Found 'XPutImage' in libX11.so.6 (0xf7801af0) X11: Found 'XQueryKeymap' in libX11.so.6 (0xf7802e50) X11: Found 'XQueryPointer' in libX11.so.6 (0xf7802f30) X11: Found 'XRaiseWindow' in libX11.so.6 (0xf7803810) X11: Found 'XReparentWindow' in libX11.so.6 (0xf7806230) X11: Found 'XResetScreenSaver' in libX11.so.6 (0xf77eff00) X11: Found 'XResizeWindow' in libX11.so.6 (0xf77e92a0) X11: Found 'XScreenNumberOfScreen' in libX11.so.6 (0xf77fb430) X11: Found 'XSelectInput' in libX11.so.6 (0xf7806500) X11: Found 'XSendEvent' in libX11.so.6 (0xf7806580) X11: Found 'XSetErrorHandler' in libX11.so.6 (0xf77ece40) X11: Found 'XSetForeground' in libX11.so.6 (0xf7806c20) X11: Found 'XSetIOErrorHandler' in libX11.so.6 (0xf77eced0) X11: Found 'XSetInputFocus' in libX11.so.6 (0xf78075b0) X11: Found 'XSetSelectionOwner' in libX11.so.6 (0xf7807c40) X11: Found 'XSetTransientForHint' in libX11.so.6 (0xf7807460) X11: Found 'XSetTextProperty' in libX11.so.6 (0xf7808030) X11: Found 'XSetWindowBackground' in libX11.so.6 (0xf77e7c70) X11: Found 'XSetWMHints' in libX11.so.6 (0xf7807010) X11: Found 'XSetWMNormalHints' in libX11.so.6 (0xf7807870) X11: Found 'XSetWMProperties' in libX11.so.6 (0xf780bb10) X11: Found 'XSetWMProtocols' in libX11.so.6 (0xf7808160) X11: Found 'XStoreColors' in libX11.so.6 (0xf7808410) X11: Found 'XStoreName' in libX11.so.6 (0xf7808540) X11: Found 'XStringListToTextProperty' in libX11.so.6 (0xf7808be0) X11: Found 'XSync' in libX11.so.6 (0xf7808d10) X11: Found 'XTextExtents' in libX11.so.6 (0xf7809e50) X11: Found 'XTranslateCoordinates' in libX11.so.6 (0xf780a700) X11: Found 'XUndefineCursor' in libX11.so.6 (0xf780a820) X11: Found 'XUngrabKeyboard' in libX11.so.6 (0xf780a920) X11: Found 'XUngrabPointer' in libX11.so.6 (0xf780aa20) X11: Found 'XUngrabServer' in libX11.so.6 (0xf780aaa0) X11: Found 'XUninstallColormap' in libX11.so.6 (0xf780ab10) X11: Found 'XUnloadFont' in libX11.so.6 (0xf780ab90) X11: Found 'XWarpPointer' in libX11.so.6 (0xf780b250) X11: Found 'XWindowEvent' in libX11.so.6 (0xf780b5a0) X11: Found 'XWithdrawWindow' in libX11.so.6 (0xf780b6f0) X11: Found 'XVisualIDFromVisual' in libX11.so.6 (0xf77fb870) X11: Found 'XGetDefault' in libX11.so.6 (0xf77f1260) X11: Found 'XQueryExtension' in libX11.so.6 (0xf7802d30) X11: Found 'XDisplayString' in libX11.so.6 (0xf77fb1d0) X11: Found 'XGetErrorText' in libX11.so.6 (0xf77ecc40) X11: Found '_XEatData' in libX11.so.6 (0xf77e763f) X11: Found '_XFlush' in libX11.so.6 (0xf780d400) X11: Found '_XFlushGCCache' in libX11.so.6 (0xf77eac40) X11: Found '_XRead' in libX11.so.6 (0xf780db80) X11: Found '_XReadPad' in libX11.so.6 (0xf780dc90) X11: Found '_XSend' in libX11.so.6 (0xf780ceb0) X11: Found '_XReply' in libX11.so.6 (0xf780d5b0) X11: Found '_XSetLastRequestRead' in libX11.so.6 (0xf780e800) X11: Found 'XSynchronize' in libX11.so.6 (0xf7808e10) X11: Found 'XESetWireToEvent' in libX11.so.6 (0xf77f6df0) X11: Found 'XESetEventToWire' in libX11.so.6 (0xf77f6fa0) X11: Found 'XRefreshKeyboardMapping' in libX11.so.6 (0xf785c7c0) X11: Found 'XQueryTree' in libX11.so.6 (0xf78036a0) X11: Found 'XSupportsLocale' in libX11.so.6 (0xf782a4c0) X11: Found 'XmbTextListToTextProperty' in libX11.so.6 (0xf782a620) X11: Found 'XFixesCreatePointerBarrier' in libXcursor.so.1 (0xf7710d00) X11: Found 'XFixesDestroyPointerBarrier' in libXcursor.so.1 (0xf7710e50) X11: Symbol 'XIBarrierReleasePointer' NOT FOUND! X11: Found 'XFixesQueryVersion' in libXcursor.so.1 (0xf7712840) X11: Found 'XGetEventData' in libX11.so.6 (0xf77f1390) X11: Found 'XFreeEventData' in libX11.so.6 (0xf77efcc0) X11: Found 'XkbQueryExtension' in libX11.so.6 (0xf7859d70) X11: Found 'XkbKeycodeToKeysym' in libX11.so.6 (0xf785bb10) X11: Found 'XkbGetState' in libX11.so.6 (0xf785ab60) X11: Found 'XkbGetUpdatedMap' in libX11.so.6 (0xf785f890) X11: Found 'XkbGetMap' in libX11.so.6 (0xf785f960) X11: Found 'XkbFreeClientMap' in libX11.so.6 (0xf7870320) X11: Found 'XkbFreeKeyboard' in libX11.so.6 (0xf7872d10) X11: Found 'XkbSetDetectableAutoRepeat' in libX11.so.6 (0xf785acc0) X11: Found 'XKeycodeToKeysym' in libX11.so.6 (0xf785bce0) X11: Found 'Xutf8TextListToTextProperty' in libX11.so.6 (0xf782a6c0) X11: Found 'Xutf8LookupString' in libX11.so.6 (0xf781a870) X11: Found 'XDestroyIC' in libX11.so.6 (0xf781a5d0) X11: Found 'XSetICFocus' in libX11.so.6 (0xf781a760) X11: Found 'XUnsetICFocus' in libX11.so.6 (0xf781a790) X11: Found 'XOpenIM' in libX11.so.6 (0xf781a9b0) X11: Found 'XCloseIM' in libX11.so.6 (0xf781aa00) X11: Found 'Xutf8DrawString' in libX11.so.6 (0xf782b0d0) X11: Found 'Xutf8TextExtents' in libX11.so.6 (0xf782b100) X11: Found 'XSetLocaleModifiers' in libX11.so.6 (0xf782a430) X11: Found 'Xutf8ResetIC' in libX11.so.6 (0xf781a800) X11: Found 'XShmAttach' in libXext.so.6 (0xf7738d30) X11: Found 'XShmDetach' in libXext.so.6 (0xf7738e10) X11: Found 'XShmPutImage' in libXext.so.6 (0xf7739000) X11: Found 'XShmCreateImage' in libXext.so.6 (0xf7738ed0) X11: Found 'XShmCreatePixmap' in libXext.so.6 (0xf7739360) X11: Found 'XShmQueryExtension' in libXext.so.6 (0xf7738a60) X11: Found 'XcursorImageCreate' in libXcursor.so.1 (0xf7727c10) X11: Found 'XcursorImageDestroy' in libXcursor.so.1 (0xf7727c90) X11: Found 'XcursorImageLoadCursor' in libXcursor.so.1 (0xf7725ad0) X11: Found 'XdbeQueryExtension' in libXext.so.6 (0xf773cb90) X11: Found 'XdbeAllocateBackBufferName' in libXext.so.6 (0xf773ccc0) X11: Found 'XdbeDeallocateBackBufferName' in libXext.so.6 (0xf773cd90) X11: Found 'XdbeSwapBuffers' in libXext.so.6 (0xf773ce40) X11: Found 'XdbeBeginIdiom' in libXext.so.6 (0xf773cfd0) X11: Found 'XdbeEndIdiom' in libXext.so.6 (0xf773d080) X11: Found 'XdbeGetVisualInfo' in libXext.so.6 (0xf773d130) X11: Found 'XdbeFreeVisualInfo' in libXext.so.6 (0xf773d430) X11: Found 'XdbeGetBackBufferAttributes' in libXext.so.6 (0xf773d480) X11: Symbol 'XIQueryDevice' NOT FOUND! X11: Symbol 'XIFreeDeviceInfo' NOT FOUND! X11: Symbol 'XISelectEvents' NOT FOUND! X11: Symbol 'XIGrabTouchBegin' NOT FOUND! X11: Symbol 'XIUngrabTouchBegin' NOT FOUND! X11: Symbol 'XIQueryVersion' NOT FOUND! X11: Symbol 'XIGetSelectedEvents' NOT FOUND! X11: Symbol 'XIGetClientPointer' NOT FOUND! X11: Symbol 'XIWarpPointer' NOT FOUND! X11: Found 'XRRQueryVersion' in libXrandr.so.2 (0xf77031d0) X11: Found 'XRRQueryExtension' in libXrandr.so.2 (0xf7703150) X11: Found 'XRRGetScreenInfo' in libXrandr.so.2 (0xf7703e30) X11: Found 'XRRConfigCurrentConfiguration' in libXrandr.so.2 (0xf7703b80) X11: Found 'XRRConfigCurrentRate' in libXrandr.so.2 (0xf7703ba0) X11: Found 'XRRConfigRates' in libXrandr.so.2 (0xf7703b00) X11: Found 'XRRConfigSizes' in libXrandr.so.2 (0xf7703ae0) X11: Found 'XRRSetScreenConfigAndRate' in libXrandr.so.2 (0xf7703ef0) X11: Found 'XRRFreeScreenConfigInfo' in libXrandr.so.2 (0xf7703ec0) X11: Found 'XRRSetScreenSize' in libXrandr.so.2 (0xf77072e0) X11: Found 'XRRGetScreenSizeRange' in libXrandr.so.2 (0xf7707180) X11: Found 'XRRGetScreenResources' in libXrandr.so.2 (0xf7707110) X11: Found 'XRRGetScreenResourcesCurrent' in libXrandr.so.2 (0xf7707130) X11: Found 'XRRFreeScreenResources' in libXrandr.so.2 (0xf7707150) X11: Found 'XRRGetOutputInfo' in libXrandr.so.2 (0xf7705910) X11: Found 'XRRFreeOutputInfo' in libXrandr.so.2 (0xf7705b90) X11: Found 'XRRGetCrtcInfo' in libXrandr.so.2 (0xf7704140) X11: Found 'XRRFreeCrtcInfo' in libXrandr.so.2 (0xf7704350) X11: Found 'XRRSetCrtcConfig' in libXrandr.so.2 (0xf7704380) X11: Found 'XRRListOutputProperties' in libXrandr.so.2 (0xf7705e20) X11: Found 'XRRQueryOutputProperty' in libXrandr.so.2 (0xf7705fa0) X11: Found 'XRRGetOutputProperty' in libXrandr.so.2 (0xf7706850) X11: Found 'XRRGetOutputPrimary' in libXrandr.so.2 (0xf7705cd0) X11: Found 'XRRSelectInput' in libXrandr.so.2 (0xf7703430) X11: Symbol 'XScreenSaverQueryExtension' NOT FOUND! X11: Symbol 'XScreenSaverQueryVersion' NOT FOUND! X11: Symbol 'XScreenSaverSuspend' NOT FOUND! X11: Found 'XShapeCombineMask' in libXext.so.6 (0xf7737e70) X11: Found 'XCreateIC' in libX11.so.6 (0xf781a510) X11: Found 'XGetICValues' in libX11.so.6 (0xf781a640) ```
64 bit build without missing symbols ``` X11: Found 'XAllocSizeHints' in libX11.so.6 (0x7f10dd3b4c40) X11: Found 'XAllocWMHints' in libX11.so.6 (0x7f10dd3b4c80) X11: Found 'XAllocClassHint' in libX11.so.6 (0x7f10dd3b4ca0) X11: Found 'XChangePointerControl' in libX11.so.6 (0x7f10dd39ea00) X11: Found 'XChangeProperty' in libX11.so.6 (0x7f10dd3a2310) X11: Found 'XCheckIfEvent' in libX11.so.6 (0x7f10dd3a1860) X11: Found 'XClearWindow' in libX11.so.6 (0x7f10dd39eda0) X11: Found 'XCloseDisplay' in libX11.so.6 (0x7f10dd3a37b0) X11: Found 'XConvertSelection' in libX11.so.6 (0x7f10dd39eeb0) X11: Found 'XCreateBitmapFromData' in libX11.so.6 (0x7f10dd3a3980) X11: Found 'XCreateColormap' in libX11.so.6 (0x7f10dd3a3c10) X11: Found 'XCreatePixmapCursor' in libX11.so.6 (0x7f10dd39ef40) X11: Found 'XCreateFontCursor' in libX11.so.6 (0x7f10dd3a3cc0) X11: Found 'XCreateFontSet' in libX11.so.6 (0x7f10dd3a6050) X11: Found 'XCreateGC' in libX11.so.6 (0x7f10dd3a0980) X11: Found 'XCreateImage' in libX11.so.6 (0x7f10dd3a9aa0) X11: Found 'XCreateWindow' in libX11.so.6 (0x7f10dd3c7ca0) X11: Found 'XDefineCursor' in libX11.so.6 (0x7f10dd39f430) X11: Found 'XDeleteProperty' in libX11.so.6 (0x7f10dd39f4a0) X11: Found 'XDestroyWindow' in libX11.so.6 (0x7f10dd39f580) X11: Found 'XDisplayKeycodes' in libX11.so.6 (0x7f10dd3ac060) X11: Found 'XDrawRectangle' in libX11.so.6 (0x7f10dd3a13e0) X11: Found 'XDisplayName' in libX11.so.6 (0x7f10dd39da70) X11: Found 'XDrawString' in libX11.so.6 (0x7f10dd3c7310) X11: Found 'XEventsQueued' in libX11.so.6 (0x7f10dd3b3130) X11: Found 'XFillRectangle' in libX11.so.6 (0x7f10dd3a1660) X11: Found 'XFilterEvent' in libX11.so.6 (0x7f10dd39dc70) X11: Found 'XFlush' in libX11.so.6 (0x7f10dd3a1820) X11: Found 'XFree' in libX11.so.6 (0x7f10dd3c4640) X11: Found 'XFreeCursor' in libX11.so.6 (0x7f10dd39f5f0) X11: Found 'XFreeFontSet' in libX11.so.6 (0x7f10dd3a6040) X11: Found 'XFreeGC' in libX11.so.6 (0x7f10dd39f660) X11: Found 'XFreeFont' in libX11.so.6 (0x7f10dd3a5150) X11: Found 'XFreeModifiermap' in libX11.so.6 (0x7f10dd3a90f0) X11: Found 'XFreePixmap' in libX11.so.6 (0x7f10dd39f710) X11: Found 'XFreeStringList' in libX11.so.6 (0x7f10dd3c1b40) X11: Found 'XGetAtomName' in libX11.so.6 (0x7f10dd3a6430) X11: Found 'XGetInputFocus' in libX11.so.6 (0x7f10dd39fae0) X11: Found 'XGetErrorDatabaseText' in libX11.so.6 (0x7f10dd3a3f90) X11: Found 'XGetModifierMapping' in libX11.so.6 (0x7f10dd3afa10) X11: Found 'XGetPointerControl' in libX11.so.6 (0x7f10dd39fc70) X11: Found 'XGetSelectionOwner' in libX11.so.6 (0x7f10dd39fe70) X11: Found 'XGetVisualInfo' in libX11.so.6 (0x7f10dd3c40b0) X11: Found 'XGetWindowAttributes' in libX11.so.6 (0x7f10dd3a4830) X11: Found 'XGetWindowProperty' in libX11.so.6 (0x7f10dd3a7460) X11: Found 'XGetWMHints' in libX11.so.6 (0x7f10dd3a7a20) X11: Found 'XGetWMNormalHints' in libX11.so.6 (0x7f10dd3a80c0) X11: Found 'XIfEvent' in libX11.so.6 (0x7f10dd3ac880) X11: Found 'XGrabKeyboard' in libX11.so.6 (0x7f10dd3a00a0) X11: Found 'XGrabPointer' in libX11.so.6 (0x7f10dd3a0220) X11: Found 'XGrabServer' in libX11.so.6 (0x7f10dd3a0320) X11: Found 'XIconifyWindow' in libX11.so.6 (0x7f10dd3ad8d0) X11: Found 'XKeysymToKeycode' in libX11.so.6 (0x7f10dd410a90) X11: Found 'XKeysymToString' in libX11.so.6 (0x7f10dd3af030) X11: Found 'XInstallColormap' in libX11.so.6 (0x7f10dd3ad150) X11: Found 'XInternAtom' in libX11.so.6 (0x7f10dd3ad770) X11: Found 'XListPixmapFormats' in libX11.so.6 (0x7f10dd3b4bc0) X11: Found 'XLoadQueryFont' in libX11.so.6 (0x7f10dd3a54f0) X11: Found 'XLookupKeysym' in libX11.so.6 (0x7f10dd410dc0) X11: Found 'XLookupString' in libX11.so.6 (0x7f10dd4114c0) X11: Found 'XMapRaised' in libX11.so.6 (0x7f10dd3ad580) X11: Found 'XMatchVisualInfo' in libX11.so.6 (0x7f10dd3c44c0) X11: Found 'XMissingExtension' in libXext.so.6 (0x7f10ddba4760) X11: Found 'XMoveWindow' in libX11.so.6 (0x7f10dd3ad6f0) X11: Found 'XOpenDisplay' in libX11.so.6 (0x7f10dd3b1a30) X11: Found 'XInitThreads' in libX11.so.6 (0x7f10dd3ab930) X11: Found 'XPeekEvent' in libX11.so.6 (0x7f10dd3b2cf0) X11: Found 'XPending' in libX11.so.6 (0x7f10dd3b31b0) X11: Found 'XPutImage' in libX11.so.6 (0x7f10dd3ba380) X11: Found 'XQueryKeymap' in libX11.so.6 (0x7f10dd3bab20) X11: Found 'XQueryPointer' in libX11.so.6 (0x7f10dd3babd0) X11: Found 'XRaiseWindow' in libX11.so.6 (0x7f10dd3b7620) X11: Found 'XReparentWindow' in libX11.so.6 (0x7f10dd3b7750) X11: Found 'XResetScreenSaver' in libX11.so.6 (0x7f10dd39f810) X11: Found 'XResizeWindow' in libX11.so.6 (0x7f10dd39eb30) X11: Found 'XScreenNumberOfScreen' in libX11.so.6 (0x7f10dd3abf90) X11: Found 'XSelectInput' in libX11.so.6 (0x7f10dd3b7890) X11: Found 'XSendEvent' in libX11.so.6 (0x7f10dd3b7900) X11: Found 'XSetErrorHandler' in libX11.so.6 (0x7f10dd39dab0) X11: Found 'XSetForeground' in libX11.so.6 (0x7f10dd3b7080) X11: Found 'XSetIOErrorHandler' in libX11.so.6 (0x7f10dd39db40) X11: Found 'XSetInputFocus' in libX11.so.6 (0x7f10dd3b7a10) X11: Found 'XSetSelectionOwner' in libX11.so.6 (0x7f10dd3b7a90) X11: Found 'XSetTransientForHint' in libX11.so.6 (0x7f10dd3bc920) X11: Found 'XSetTextProperty' in libX11.so.6 (0x7f10dd3bcdd0) X11: Found 'XSetWindowBackground' in libX11.so.6 (0x7f10dd39e650) X11: Found 'XSetWMHints' in libX11.so.6 (0x7f10dd3bc620) X11: Found 'XSetWMNormalHints' in libX11.so.6 (0x7f10dd3bcc00) X11: Found 'XSetWMProperties' in libX11.so.6 (0x7f10dd3c5bc0) X11: Found 'XSetWMProtocols' in libX11.so.6 (0x7f10dd3bce90) X11: Found 'XStoreColors' in libX11.so.6 (0x7f10dd3b9460) X11: Found 'XStoreName' in libX11.so.6 (0x7f10dd3bcf50) X11: Found 'XStringListToTextProperty' in libX11.so.6 (0x7f10dd3b7430) X11: Found 'XSync' in libX11.so.6 (0x7f10dd3c8690) X11: Found 'XTextExtents' in libX11.so.6 (0x7f10dd3c1390) X11: Found 'XTranslateCoordinates' in libX11.so.6 (0x7f10dd3c8790) X11: Found 'XUndefineCursor' in libX11.so.6 (0x7f10dd3c76f0) X11: Found 'XUngrabKeyboard' in libX11.so.6 (0x7f10dd3c77e0) X11: Found 'XUngrabPointer' in libX11.so.6 (0x7f10dd3c78d0) X11: Found 'XUngrabServer' in libX11.so.6 (0x7f10dd3c7940) X11: Found 'XUninstallColormap' in libX11.so.6 (0x7f10dd3c79a0) X11: Found 'XUnloadFont' in libX11.so.6 (0x7f10dd3c7a10) X11: Found 'XWarpPointer' in libX11.so.6 (0x7f10dd3c7bf0) X11: Found 'XWindowEvent' in libX11.so.6 (0x7f10dd3c7fa0) X11: Found 'XWithdrawWindow' in libX11.so.6 (0x7f10dd3c7b60) X11: Found 'XVisualIDFromVisual' in libX11.so.6 (0x7f10dd3ac080) X11: Found 'XGetDefault' in libX11.so.6 (0x7f10dd3a6c70) X11: Found 'XQueryExtension' in libX11.so.6 (0x7f10dd3ba9c0) X11: Found 'XDisplayString' in libX11.so.6 (0x7f10dd3abcf0) X11: Found 'XGetErrorText' in libX11.so.6 (0x7f10dd3a3fd0) X11: Found '_XEatData' in libX11.so.6 (0x7f10dd39c559) X11: Found '_XFlush' in libX11.so.6 (0x7f10dd3c6c20) X11: Found '_XFlushGCCache' in libX11.so.6 (0x7f10dd3a0b50) X11: Found '_XRead' in libX11.so.6 (0x7f10dd3c1ef0) X11: Found '_XReadPad' in libX11.so.6 (0x7f10dd3c2010) X11: Found '_XSend' in libX11.so.6 (0x7f10dd3c34c0) X11: Found '_XReply' in libX11.so.6 (0x7f10dd3c8180) X11: Found '_XSetLastRequestRead' in libX11.so.6 (0x7f10dd3c2250) X11: Found 'XSynchronize' in libX11.so.6 (0x7f10dd3c0b30) X11: Found 'XESetWireToEvent' in libX11.so.6 (0x7f10dd3aa8f0) X11: Found 'XESetEventToWire' in libX11.so.6 (0x7f10dd3aabb0) X11: Found 'XRefreshKeyboardMapping' in libX11.so.6 (0x7f10dd4111b0) X11: Found 'XQueryTree' in libX11.so.6 (0x7f10dd3bbd40) X11: Found 'XSupportsLocale' in libX11.so.6 (0x7f10dd3df740) X11: Found 'XmbTextListToTextProperty' in libX11.so.6 (0x7f10dd3df880) X11: Found 'XFixesCreatePointerBarrier' in libXcursor.so.1 (0x7f10ddb98080) X11: Found 'XFixesDestroyPointerBarrier' in libXcursor.so.1 (0x7f10ddb98200) X11: Found 'XIBarrierReleasePointer' in libXi.so.6 (0x7f10ccbd1630) X11: Found 'XFixesQueryVersion' in libXcursor.so.1 (0x7f10ddb998c0) X11: Found 'XGetEventData' in libX11.so.6 (0x7f10dd3a6db0) X11: Found 'XFreeEventData' in libX11.so.6 (0x7f10dd3a6010) X11: Found 'XkbQueryExtension' in libX11.so.6 (0x7f10dd40c110) X11: Found 'XkbKeycodeToKeysym' in libX11.so.6 (0x7f10dd410690) X11: Found 'XkbGetState' in libX11.so.6 (0x7f10dd40c770) X11: Found 'XkbGetUpdatedMap' in libX11.so.6 (0x7f10dd410280) X11: Found 'XkbGetMap' in libX11.so.6 (0x7f10dd4103a0) X11: Found 'XkbFreeClientMap' in libX11.so.6 (0x7f10dd421f20) X11: Found 'XkbFreeKeyboard' in libX11.so.6 (0x7f10dd4244b0) X11: Found 'XkbSetDetectableAutoRepeat' in libX11.so.6 (0x7f10dd40c8d0) X11: Found 'XKeycodeToKeysym' in libX11.so.6 (0x7f10dd410840) X11: Found 'Xutf8TextListToTextProperty' in libX11.so.6 (0x7f10dd3df940) X11: Found 'Xutf8LookupString' in libX11.so.6 (0x7f10dd3d0900) X11: Found 'XDestroyIC' in libX11.so.6 (0x7f10dd3d04e0) X11: Found 'XSetICFocus' in libX11.so.6 (0x7f10dd3d07f0) X11: Found 'XUnsetICFocus' in libX11.so.6 (0x7f10dd3d0820) X11: Found 'XOpenIM' in libX11.so.6 (0x7f10dd3d5a70) X11: Found 'XCloseIM' in libX11.so.6 (0x7f10dd3d5b50) X11: Found 'Xutf8DrawString' in libX11.so.6 (0x7f10dd3dda30) X11: Found 'Xutf8TextExtents' in libX11.so.6 (0x7f10dd3dda60) X11: Found 'XSetLocaleModifiers' in libX11.so.6 (0x7f10dd3df6b0) X11: Found 'Xutf8ResetIC' in libX11.so.6 (0x7f10dd3d0890) X11: Found 'XShmAttach' in libXext.so.6 (0x7f10ddba8c20) X11: Found 'XShmDetach' in libXext.so.6 (0x7f10ddba8d00) X11: Found 'XShmPutImage' in libXext.so.6 (0x7f10ddba8db0) X11: Found 'XShmCreateImage' in libXext.so.6 (0x7f10ddba2090) X11: Found 'XShmCreatePixmap' in libXext.so.6 (0x7f10ddba9130) X11: Found 'XShmQueryExtension' in libXext.so.6 (0x7f10ddba4260) X11: Found '_XData32' in libX11.so.6 (0x7f10dd3c6c70) X11: Found '_XRead32' in libX11.so.6 (0x7f10dd3c2200) X11: Found 'XcursorImageCreate' in libXcursor.so.1 (0x7f10ccbe8b80) X11: Found 'XcursorImageDestroy' in libXcursor.so.1 (0x7f10ccbe8c10) X11: Found 'XcursorImageLoadCursor' in libXcursor.so.1 (0x7f10ccbe7b70) X11: Found 'XdbeQueryExtension' in libXext.so.6 (0x7f10ddba4600) X11: Found 'XdbeAllocateBackBufferName' in libXext.so.6 (0x7f10ddbab0b0) X11: Found 'XdbeDeallocateBackBufferName' in libXext.so.6 (0x7f10ddbab180) X11: Found 'XdbeSwapBuffers' in libXext.so.6 (0x7f10ddbab230) X11: Found 'XdbeBeginIdiom' in libXext.so.6 (0x7f10ddbab3a0) X11: Found 'XdbeEndIdiom' in libXext.so.6 (0x7f10ddbab440) X11: Found 'XdbeGetVisualInfo' in libXext.so.6 (0x7f10ddbab4e0) X11: Found 'XdbeFreeVisualInfo' in libXext.so.6 (0x7f10ddba3000) X11: Found 'XdbeGetBackBufferAttributes' in libXext.so.6 (0x7f10ddbab7b0) X11: Found 'XIQueryDevice' in libXi.so.6 (0x7f10ccbcf380) X11: Found 'XIFreeDeviceInfo' in libXi.so.6 (0x7f10ccbcf750) X11: Found 'XISelectEvents' in libXi.so.6 (0x7f10ccbd0690) X11: Found 'XIGrabTouchBegin' in libXi.so.6 (0x7f10ccbcfa80) X11: Found 'XIUngrabTouchBegin' in libXi.so.6 (0x7f10ccbcfd40) X11: Found 'XIQueryVersion' in libXi.so.6 (0x7f10ccbcf200) X11: Found 'XIGetSelectedEvents' in libXi.so.6 (0x7f10ccbd0a50) X11: Found 'XIGetClientPointer' in libXi.so.6 (0x7f10ccbcba70) X11: Found 'XIWarpPointer' in libXi.so.6 (0x7f10ccbd0dc0) X11: Found 'XRRQueryVersion' in libXrandr.so.2 (0x7f10ccbb9bf0) X11: Found 'XRRQueryExtension' in libXrandr.so.2 (0x7f10ccbb9b80) X11: Found 'XRRGetScreenInfo' in libXrandr.so.2 (0x7f10ccbba420) X11: Found 'XRRConfigCurrentConfiguration' in libXrandr.so.2 (0x7f10ccbba0f0) X11: Found 'XRRConfigCurrentRate' in libXrandr.so.2 (0x7f10ccbba100) X11: Found 'XRRConfigRates' in libXrandr.so.2 (0x7f10ccbba090) X11: Found 'XRRConfigSizes' in libXrandr.so.2 (0x7f10ccbba080) X11: Found 'XRRSetScreenConfigAndRate' in libXrandr.so.2 (0x7f10ccbba500) X11: Found 'XRRFreeScreenConfigInfo' in libXrandr.so.2 (0x7f10ccbba4f0) X11: Found 'XRRSetScreenSize' in libXrandr.so.2 (0x7f10ccbbd3f0) X11: Found 'XRRGetScreenSizeRange' in libXrandr.so.2 (0x7f10ccbbd280) X11: Found 'XRRGetScreenResources' in libXrandr.so.2 (0x7f10ccbbd250) X11: Found 'XRRGetScreenResourcesCurrent' in libXrandr.so.2 (0x7f10ccbbd260) X11: Found 'XRRFreeScreenResources' in libXrandr.so.2 (0x7f10ccbbd270) X11: Found 'XRRGetOutputInfo' in libXrandr.so.2 (0x7f10ccbbbf00) X11: Found 'XRRFreeOutputInfo' in libXrandr.so.2 (0x7f10ccbbc1d0) X11: Found 'XRRGetCrtcInfo' in libXrandr.so.2 (0x7f10ccbba730) X11: Found 'XRRFreeCrtcInfo' in libXrandr.so.2 (0x7f10ccbba990) X11: Found 'XRRSetCrtcConfig' in libXrandr.so.2 (0x7f10ccbba9a0) X11: Found 'XRRListOutputProperties' in libXrandr.so.2 (0x7f10ccbbc480) X11: Found 'XRRQueryOutputProperty' in libXrandr.so.2 (0x7f10ccbbc620) X11: Found 'XRRGetOutputProperty' in libXrandr.so.2 (0x7f10ccbbcf10) X11: Found 'XRRGetOutputPrimary' in libXrandr.so.2 (0x7f10ccbbc320) X11: Found 'XRRSelectInput' in libXrandr.so.2 (0x7f10ccbb9db0) X11: Found 'XScreenSaverQueryExtension' in libXss.so.1 (0x7f10ccbb2520) X11: Found 'XScreenSaverQueryVersion' in libXss.so.1 (0x7f10ccbb2580) X11: Found 'XScreenSaverSuspend' in libXss.so.1 (0x7f10ccbb2e80) X11: Found 'XShapeCombineMask' in libXext.so.6 (0x7f10ddba7f80) X11: Found 'XCreateIC' in libX11.so.6 (0x7f10dd3d0360) X11: Found 'XGetICValues' in libX11.so.6 (0x7f10dd3d0550) ```

In contrast, there is no segmentation fault if I run the executable directly in the terminal without using xvfb-run, but I am fairly certain that is because there are no events SDL responds to, so that code with the missing symbol never ends up being called:

Backtrace from `xvfb-run gdb -ex=r 11_Physics` ``` #0 0x00000000 in ?? () #1 0x56da5413 in WarpMouseInternal (xwindow=2097158, x=512, y=384) at .../U3D/Source/ThirdParty/SDL/src/video/x11/SDL_x11mouse.c:324 #2 0x56b035e2 in SDL_PerformWarpMouseInWindow (window=, x=512, y=384, ignore_relative_mode=) at .../U3D/Source/ThirdParty/SDL/src/events/SDL_mouse.c:1066 #3 0x56ad9245 in SDL_OnWindowFocusGained (window=0x575cdf30) at .../U3D/Source/ThirdParty/SDL/src/video/SDL_video.c:3210 #4 0x56b01277 in SDL_SendWindowEvent (window=0x575cdf30, windowevent=12 '\f', data1=0, data2=0) at .../U3D/Source/ThirdParty/SDL/src/events/SDL_windowevents.c:180 #5 0x56b0517c in SDL_SetKeyboardFocus (window=0x575cdf30) at .../U3D/Source/ThirdParty/SDL/src/events/SDL_keyboard.c:790 #6 0x56daad3c in X11_DispatchFocusIn (_this=0x57544d40, data=0x574db4c0) at .../U3D/Source/ThirdParty/SDL/src/video/x11/SDL_x11events.c:440 #7 0x56dab765 in X11_DispatchEvent (_this=_this@entry=0x57544d40, xevent=xevent@entry=0xffa4817c) at .../U3D/Source/ThirdParty/SDL/src/video/x11/SDL_x11events.c:984 #8 0x56daca29 in X11_PumpEvents (_this=0x57544d40) at .../U3D/Source/ThirdParty/SDL/src/video/x11/SDL_x11events.c:1714 #9 0x56b09779 in SDL_PumpEventsInternal (push_sentinel=SDL_TRUE) at .../U3D/Source/ThirdParty/SDL/src/events/SDL_events.c:867 #10 0x56b09baa in SDL_WaitEventTimeout (event=0xffa48364, timeout=0) at .../U3D/Source/ThirdParty/SDL/src/events/SDL_events.c:1046 #11 0x56b09d52 in SDL_PollEvent (event=0xffa48364) at .../U3D/Source/ThirdParty/SDL/src/events/SDL_events.c:906 #12 0x568b6be2 in Urho3D::Input::Update (this=) at .../U3D/Source/Urho3D/Input/Input.cpp:420 #13 0x568b764c in Urho3D::Input::HandleBeginFrame (this=0x574bf540, eventType=..., eventData=...) at .../U3D/Source/Urho3D/Input/Input.cpp:2439 #14 0x568baf5d in Urho3D::EventHandlerImpl::Invoke (this=0x57884550, eventData=...) at .../U3D/Source/Urho3D/Input/../Core/../Core/Object.h:320 #15 0x569eaae3 in Urho3D::Object::OnEvent (this=0x574bf540, sender=0x574b6ce0, eventType=..., eventData=...) at .../U3D/Source/Urho3D/Core/../Core/Context.h:223 #16 0x569ec0b5 in Urho3D::Object::SendEvent (this=, eventType=..., eventData=...) at .../U3D/Source/Urho3D/Core/Object.cpp:372 #17 0x569e45bc in Urho3D::Time::BeginFrame (this=, timeStep=0) at .../U3D/Source/Urho3D/Core/Timer.cpp:128 #18 0x569cec89 in Urho3D::Engine::RunFrame (this=0x574b6c10) at .../U3D/Source/Urho3D/Engine/Engine.cpp:504 #19 0x569dca93 in Urho3D::Application::Run (this=) at .../U3D/Source/Urho3D/Engine/Application.cpp:86 #20 0x56728a19 in RunApplication () at .../U3D/Source/Samples/11_Physics/Physics.cpp:51 #21 0x566eb013 in main (argc=1, argv=0xffa486c4) at .../U3D/Source/Samples/11_Physics/Physics.cpp:51 ```

Fix: Install the 32 bit libxi: sudo apt install libxi-dev:i386

klaussilveira commented 1 year ago

Does it make sense to continue supporting Linux 32-bit? We could merge this into a 2.0 branch instead of 1.9.

SirNate0 commented 1 year ago

Does it make sense to continue supporting Linux 32-bit?

Since it should be easier to support than the raspberry pi, I am inclined to say yes, we should continue supporting it. I like that Urho is able to target older and lower-powered hardware. Really, I think the problem is more with our github actions setup rather than anything really to do with the Urho library itself. There are several layers of magic that happen in such a build:

  1. We use github actions. These aren't just a shell script, as a lot of the external ones have their own logic. For the most part, these are fine.
  2. We use the dockerized-build-environment within the github actions. This is also not that bad - it basically just caches all the dependencies that would need to be installed for us, and the end user can somewhat easily use it themselves. Ideally, we would just set up a container following our installation instructions, and the dockerfile should serve as an example of following the installation instructions.
  3. We use rake. There's lots of magic in the rakefile, doing different things if it detects it is a CI build rather than a standard build. It's not necessarily a bad thing, but it does make debugging things harder. I would prefer to drop this, but at the same time, it is in many ways nicer than just using a bunch of shell commands, so I am conflicted.
  4. We run the script/cmake_* scripts (the rakefile calls them, or they can be used manually).
  5. We use CMake, which is basically a whole bunch of magical stuff that typically works, until it doesn't. I don't think there is a better option, but if it does break, it can also be a pain to debug.
  6. CMake uses another tool like make to actually do the build. Generally it works fine. Unless it doesn't (e.g. recent fixes to the xcode build). But there's not really anything we can do about that except work around bugs.

We could merge this into a 2.0 branch instead of 1.9.

Since it's just an semi-minor update to one of the ThirdParty libraries (really it's just the build system part that is all that complicated to the changes), I am inclined to say we still aim for 1.9. I would rather have much more significant changes with 2.0, if we decide we want some of them (different scripting support, additional shader types like compute/geometry, maybe different containers). I'm not committed to that, but it seems to me that getting SDL upgraded and CI working better would be good things to finish out 1.9 (and allow easier maintenance if we want a 1.9.1 with some new features back-ported to it).

rokups commented 1 year ago

Anyone that uses linux for the desktop uses 64bit OS. There is a tiny tiny portion of people who use 32bit linux specifically to make use of their very old hardware. As you can imagine such old hardware has limited capabilities of running games, provided there happens to be a person interested in games made with urho at all.

klaussilveira commented 1 year ago

We use the dockerized-build-environment within the github actions. This is also not that bad - it basically just caches all the dependencies that would need to be installed for us, and the end user can somewhat easily use it themselves. Ideally, we would just set up a container following our installation instructions, and the dockerfile should serve as an example of following the installation instructions.

I started this branch to try and move away from the dockerized build environment and rake. I think that it adds too much friction and complexity to an already annoying task (building). The biggest challenge on it was the emscripten build: https://github.com/u3d-community/U3D/tree/workflows

Should we try and merge that branch into master and see how far it gets us? I think it is OK to temporarily lose platforms on master until the build is stable and regains compatibility.