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

Soldier of Fortune needs XSetErrorHandler #5

Open
strycore opened this issue Apr 28, 2017 · 3 comments
Open

Soldier of Fortune needs XSetErrorHandler #5

strycore opened this issue Apr 28, 2017 · 3 comments

Comments

@strycore
Copy link

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

@MrAlert
Copy link
Owner

MrAlert commented Apr 28, 2017

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.

@strycore
Copy link
Author

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

@MrAlert
Copy link
Owner

MrAlert commented Apr 29, 2017

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]
...

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