[solved] 4.6.0 keeps using an old SDL build on my computer

Forum rules
Please be as descriptive as possible in your posts (list your hardware and operating system, the version of the source port you are using, any mods you are running and how they're being loaded, etc.)
This will help others to give you a solution!

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [solved] 4.6.0 keeps using an old SDL build on my computer

Re: 4.6.0 doesn't work on my computer

by Matt » Sun May 23, 2021 10:36 am

_mental_ wrote:The cause is in the provided linker output. Removal of /usr/local/lib/libSDL2.so should fix those errors.
Blzut3 wrote:Indeed you probably want to remove your presumably self compiled version of SDL2 in /usr/local. Files to look for and remove would be:

Code: Select all

/usr/local/lib/libSDL2*
/usr/local/lib/cmake/SDL2
/usr/local/include/SDL2
Awesome, got it to compile and run, thanks!!!

Re: 4.6.0 doesn't work on my computer

by Blzut3 » Sun May 23, 2021 8:33 am

Indeed you probably want to remove your presumably self compiled version of SDL2 in /usr/local. Files to look for and remove would be:

Code: Select all

/usr/local/lib/libSDL2*
/usr/local/lib/cmake/SDL2
/usr/local/include/SDL2
Then remove your GZDoom build directory and run CMake fresh.

Re: 4.6.0 doesn't work on my computer

by _mental_ » Sun May 23, 2021 3:38 am

The cause is in the provided linker output. Removal of /usr/local/lib/libSDL2.so should fix those errors.

Re: 4.6.0 doesn't work on my computer

by Matt » Sun May 23, 2021 1:59 am

Any idea how I could locate it? I don't even know what filenames to look for...

Re: 4.6.0 doesn't work on my computer

by Graf Zahl » Sun May 23, 2021 1:26 am

You obviously also have an old SDL binary lurking around.

Re: 4.6.0 doesn't work on my computer

by Matt » Sun May 23, 2021 12:54 am

By deleting that old SDL2 folder I manage to get to 100% on the compiling but it ends like this:

Code: Select all

/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `I_GetVulkanDrawableSize(int*, int*)':
sdlglvideo.cpp:(.text+0x304): undefined reference to `SDL_Vulkan_GetDrawableSize'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `I_GetVulkanPlatformExtensions(unsigned int*, char const**)':
sdlglvideo.cpp:(.text+0x325): undefined reference to `SDL_Vulkan_GetInstanceExtensions'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `I_CreateVulkanSurface(VkInstance_T*, VkSurfaceKHR_T**)':
sdlglvideo.cpp:(.text+0x355): undefined reference to `SDL_Vulkan_CreateSurface'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `SystemBaseFrameBuffer::GetClientWidth()':
sdlglvideo.cpp:(.text+0xacf): undefined reference to `SDL_Vulkan_GetDrawableSize'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `SystemBaseFrameBuffer::GetClientHeight()':
sdlglvideo.cpp:(.text+0xb3f): undefined reference to `SDL_Vulkan_GetDrawableSize'
/usr/bin/ld: CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o: in function `ProcessSDLWindowEvent(SDL_WindowEvent const&)':
sdlglvideo.cpp:(.text+0x10dc): undefined reference to `SDL_GetWindowBordersSize'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/CMakeFiles/zdoom.dir/build.make:7066: gzdoom] Error 1
make[1]: *** [CMakeFiles/Makefile2:1040: src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Verbose:
Spoiler:
And trying to run the install from the repository gives me

Code: Select all

/opt/gzdoom/gzdoom: symbol lookup error: /opt/gzdoom/gzdoom: undefined symbol: SDL_GetWindowBordersSize

Re: 4.6.0 doesn't work on my computer

by Matt » Sun May 23, 2021 12:37 am

Graf Zahl wrote:You seem to have SDL headers in both /usr/include and /usr/local/include and obviously they are from different SDL versions if one is incomplete.
Turns out the one in /usr/local/include has a last modified date of 2015. :shock:

Moving it out of /usr/local/include into somewhere nonsensical (my home folder) did not fix it. wait.......

Here's the error with VERBOSE=1:
Spoiler:

Re: 4.6.0 doesn't work on my computer

by _mental_ » Sun May 23, 2021 12:34 am

Apparently, another installation of SDL2 was picked by CMake somehow. Please run the following command instead of just make, and post command line that triggered compilation error.

Code: Select all

make VERBOSE=1

Re: 4.6.0 doesn't work on my computer

by Matt » Sun May 23, 2021 12:29 am

_mental_ wrote:Please post output of the following command

Code: Select all

apt search libsdl2-dev

Code: Select all

Sorting... Done
Full Text Search... Done
libsdl2-dev/stable,stable,now 2.0.9+dfsg1-1 amd64 [installed]
  Simple DirectMedia Layer development files

Re: 4.6.0 doesn't work on my computer

by _mental_ » Sun May 23, 2021 12:26 am

Missing SDL_GetWindowBordersSize() declaration has not nothing to do with Vulkan support. It means that SDL2 version is older than 2.0.5. Please post output of the following command

Code: Select all

apt search libsdl2-dev

Re: 4.6.0 doesn't work on my computer

by Graf Zahl » Sun May 23, 2021 12:24 am

You seem to have SDL headers in both /usr/include and /usr/local/include and obviously they are from different SDL versions if one is incomplete.

Re: 4.6.0 doesn't work on my computer

by Matt » Sat May 22, 2021 10:35 pm

Then nothing is working and I have no idea why.

I've even resorted to Google to look up

Code: Select all

undefined symbol: SDL_GetWindowBordersSize
and literally the only result is this thread...


I've found /usr/include/SDL2/SDL_vulkan.h while searching my entire system on Seamonkey. No idea why it can't be found by the compiler. I'm guessing this file would contain whatever the blob is complaining about with that hapax legomenon error message, in which case no idea why it can't be found by GZDoom either.


And trying to add the full path for SDL_vulkan.h to sdlglvideo.cpp just gives me this unspeakable mess:
Spoiler:
Looking at this more closely it seems to be finding two files that do the same thing?


For what it's worth, I have not seen anything else break running anything else that looks like it involves SDL, so it's probably not a corrupt installation but something related to paths GZDoom is using to search for the SDL Vulkan header. I have no idea how to configure that stuff.

Re: 4.6.0 won't work with the SDL found in Buster stable

by Blzut3 » Sat May 22, 2021 8:43 pm

SDL2 in buster definitely has SDL_vulkan.h. The official deb is compiled against Ubuntu 18.04 which is using an older version of SDL2, 2.0.8 vs 2.0.9, just fine.

Re: Can't compile 4.6.0 and can't figure out what to install

by Matt » Sat May 22, 2021 8:35 pm

Thanks, I'll give it a try...

Code: Select all

/home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:118:43: error: 
      use of undeclared identifier 'SDL_WINDOW_VULKAN'
        static const uint32_t VulkanWindowFlag = SDL_WINDOW_VULKAN;
                                                 ^
/home/m/doom/gzdoom-g4.6.0/src/common/platform/posix/sdl/sdlglvideo.cpp:724:4: error: 
      use of undeclared identifier 'SDL_GetWindowBordersSize'
                        SDL_GetWindowBordersSize(Priv::window, &top, &le...
                        ^
2 errors generated.
make[2]: *** [src/CMakeFiles/zdoom.dir/build.make:201: src/CMakeFiles/zdoom.dir/common/platform/posix/sdl/sdlglvideo.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:811: src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
The first definitely looks Vulkan-specific so I'm not sure why it's there now? But I guess that SDL_GetWindowBordersSize is one of those things that's in the new SDL.

If only I could update just that without it getting me to completely overhaul or uninstall a huge amount of other stuff...

Re: Can't compile 4.6.0 and can't figure out what to install

by Rachael » Sat May 22, 2021 8:08 pm

Well - you might be able to self-compile a version without Vulkan support.

When inside your build folder try running cmake -DHAVE_VULKAN=0 and then see if you have any luck building that with your current SDL version.

If that doesn't work then unfortunately yes you may have to update your SDL version.

Top