sdlcl icon indicating copy to clipboard operation
sdlcl copied to clipboard

Soldier of Fortune needs XSetErrorHandler

Open strycore opened this issue 8 years ago • 3 comments

This is a strange one, Soldier of Fortune (SDL1.1) complains about a missing symbol related to Xorg:

./sof-bin: symbol lookup error: ./sof-bin: undefined symbol: XSetErrorHandler

strycore avatar Apr 28 '17 02:04 strycore

Huh. I just checked and the real SDL 1.2 library doesn't link directly to X11. I suppose that's the big ABI difference between 1.1 and 1.2. Adding -lX11 and -lXext to the LDFLAGS in the Makefile would probably fix this, but I'm wondering if we should build libSDL-1.2.so.0 and libSDL-1.1.so.0 separately instead of just symlinking one to the other.

MrAlert avatar Apr 28 '17 23:04 MrAlert

Tried with -lX11 and -lXext and still had the same results, this may also be a custom build of libSDL 1.1

strycore avatar Apr 29 '17 01:04 strycore

That's odd. XSetErrorHandler is provided by libX11 so I don't see why this would fail. I checked the library with readelf -d and indeed adding -lX11 -lXext to LDFLAGS added them as dependencies even though it doesn't use any symbols from those libraries.

[mr_alert@lobo sdlcl]$ readelf -d ./libSDL-1.2.so.0 

Dynamic section at offset 0xcde8 contains 27 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libX11.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libXext.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
...

MrAlert avatar Apr 29 '17 01:04 MrAlert