Open laleksic opened 5 years ago
I'm far from a Linux expert, but maybe a library is corrupt, missing or Linux can't find it. Maybe try sudo ldconfig or specify a path to the library LD_LIBRARY_PATH= or install the -dev version of the package the library is in.
Running those scripts isn't a great idea. You should definitely reinstall the distros lib32-sdl2 and lib32-sdl2-mixer packages although the latter will probably break voc support which means that you will not have digital sounds in the game.
Can you post the output of ldd (and valgrind)?
Is your Fedora installation 32-bits? Otherwise the library paths in the trace are very weird.
Hopefully the a new SDL_Mixer release gets cut soon and we don't have to deal with compiling the dependencies ourselves anymore, although making sure that linking picks up a 32bit lib over a 64bit one is still going to be an issue.
@donnierussellii
I'm far from a Linux expert, but maybe a library is corrupt, missing or Linux can't find it. Maybe try sudo ldconfig or specify a path to the library LD_LIBRARY_PATH= or install the -dev version of the package the library is in.
sudo ldconfig
should have been run by the SDL install scripts, no? Anyway, running it again doesn't help. Also setting LD_LIBRARY_PATH
manually didn't help either, though the output of gdb
shows it was actually linking to the custom built libraries (built from source by the scripts).
@Manuel-K
Is your Fedora installation 32-bits? Otherwise the library paths in the trace are very weird.
Nope. It's 64bit. But I don't see why the paths are strange? When I build shockolate
from source it linked to SDL & Mixer libs in /laleksic/sources/systemshock/build_ext/built_sdl/lib/
which is where the SDL build scripts put it. And when I ran the binary release it linked to SDL & Mixer libs in /usr/local/lib/
, again where the script is supposed to put them.
Running those scripts isn't a great idea.
Heh, I thought the point of them is that they are preferred to the default SDL packages?
You should definitely reinstall the distros lib32-sdl2 and lib32-sdl2-mixer packages although the latter will probably break voc support which means that you will not have digital sounds in the game.
I installed now the distro 32bit SDL & Mixer.
Can you post the output of ldd (and valgrind)?
And now, ldd
shows its linking to the correct distro packaged 32bit SDL in /lib/
. (This is for the binary release of shockolate
only now)
laleksic@fedora /l/s/shockolate> ldd ./systemshock
linux-gate.so.1 (0xf7f62000)
libSDL2-2.0.so.0 => /lib/libSDL2-2.0.so.0 (0xf7dfb000)
libSDL2_mixer-2.0.so.0 => /lib/libSDL2_mixer-2.0.so.0 (0xf7dd7000)
libGL.so.1 => /lib/libGL.so.1 (0xf7d73000)
libstdc++.so.6 => /lib/libstdc++.so.6 (0xf7be3000)
libm.so.6 => /lib/libm.so.6 (0xf7ae1000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7ac3000)
libc.so.6 => /lib/libc.so.6 (0xf791f000)
libdl.so.2 => /lib/libdl.so.2 (0xf791a000)
libpthread.so.0 => /lib/libpthread.so.0 (0xf78fb000)
librt.so.1 => /lib/librt.so.1 (0xf78f1000)
libGLX.so.0 => /lib/libGLX.so.0 (0xf78ce000)
libX11.so.6 => /lib/libX11.so.6 (0xf777b000)
libXext.so.6 => /lib/libXext.so.6 (0xf7765000)
libGLdispatch.so.0 => /lib/libGLdispatch.so.0 (0xf7704000)
/lib/ld-linux.so.2 (0xf7f64000)
libxcb.so.1 => /lib/libxcb.so.1 (0xf76d7000)
libXau.so.6 => /lib/libXau.so.6 (0xf76d2000)
These are definitely 32bit libraries (Fedora stores 64bit libs in /lib64/
), and I did check this:
laleksic@fedora /l/s/shockolate> file /lib/libSDL2-2.0.so.0
/lib/libSDL2-2.0.so.0: symbolic link to libSDL2-2.0.so.0.8.0
laleksic@fedora /l/s/shockolate> file /lib/libSDL2-2.0.so.0.8.0
/lib/libSDL2-2.0.so.0.8.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=3789210b88f132659769e3902fcfe7eebfa4ae16, stripped, too many notes (256)
laleksic@fedora /l/s/shockolate> file /lib/libSDL2_mixer-2.0.so.0
/lib/libSDL2_mixer-2.0.so.0: symbolic link to libSDL2_mixer-2.0.so.0.2.0
laleksic@fedora /l/s/shockolate> file /lib/libSDL2_mixer-2.0.so.0.2.0
/lib/libSDL2_mixer-2.0.so.0.2.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=25d785449b481c4292f4a2597465ffd40dc9cf2f, stripped, too many notes (256)
Though none of this helps, since I'm still getting the same error.
Here's the valgrind
output:
valgrind ./systemshock
==4741== Memcheck, a memory error detector
==4741== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==4741== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==4741== Command: ./systemshock
==4741==
12:47:47 INFO InitMac.c:100: Starting Shockolate
==4741== Conditional jump or move depends on uninitialised value(s)
==4741== at 0x816B3EF: ResProcDirEntry (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B342: ResReadDirEntries (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B0A7: ResOpenResFile (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8089029: init_strings (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8090ACE: init_all (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x807BF8B: main (in /laleksic/sources/shockolate/systemshock)
==4741==
==4741== Conditional jump or move depends on uninitialised value(s)
==4741== at 0x816B3EF: ResProcDirEntry (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B342: ResReadDirEntries (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B0A7: ResOpenResFile (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8091734: init_load_resources (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8090B7A: init_all (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x807BF8B: main (in /laleksic/sources/shockolate/systemshock)
==4741==
==4741== Conditional jump or move depends on uninitialised value(s)
==4741== at 0x816B3EF: ResProcDirEntry (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B342: ResReadDirEntries (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B0A7: ResOpenResFile (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8091760: init_load_resources (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8090B7A: init_all (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x807BF8B: main (in /laleksic/sources/shockolate/systemshock)
==4741==
==4741== Conditional jump or move depends on uninitialised value(s)
==4741== at 0x816B3EF: ResProcDirEntry (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B342: ResReadDirEntries (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B0A7: ResOpenResFile (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8091796: init_load_resources (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8090B7A: init_all (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x807BF8B: main (in /laleksic/sources/shockolate/systemshock)
==4741==
==4741== Conditional jump or move depends on uninitialised value(s)
==4741== at 0x816B3EF: ResProcDirEntry (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B342: ResReadDirEntries (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B0A7: ResOpenResFile (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x80917C2: init_load_resources (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8090B7A: init_all (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x807BF8B: main (in /laleksic/sources/shockolate/systemshock)
==4741==
==4741== Conditional jump or move depends on uninitialised value(s)
==4741== at 0x816B3EF: ResProcDirEntry (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B342: ResReadDirEntries (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x816B0A7: ResOpenResFile (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x80917EE: init_load_resources (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x8090B7A: init_all (in /laleksic/sources/shockolate/systemshock)
==4741== by 0x807BF8B: main (in /laleksic/sources/shockolate/systemshock)
==4741==
==4741== Jump to the invalid address stated on the next line
==4741== at 0x0: ???
==4741== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==4741==
==4741==
==4741== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==4741== Bad permissions for mapped region at address 0x0
==4741== at 0x0: ???
==4741== Jump to the invalid address stated on the next line
==4741== at 0x60BB46D0: ???
==4741== by 0xFEC57FCB: ???
==4741== Address 0x60bb46d0 is not stack'd, malloc'd or (recently) free'd
==4741==
==4741==
==4741== Process terminating with default action of signal 11 (SIGSEGV)
==4741== Access not within mapped region at address 0x60BB46D0
==4741== at 0x60BB46D0: ???
==4741== by 0xFEC57FCB: ???
==4741== If you believe this happened as a result of a stack
==4741== overflow in your program's main thread (unlikely but
==4741== possible), you can try to increase the size of the
==4741== main thread stack using the --main-stacksize= flag.
==4741== The main thread stack size used in this run was 8388608.
==4741==
==4741== HEAP SUMMARY:
==4741== in use at exit: 1,380,233 bytes in 1,541 blocks
==4741== total heap usage: 17,533 allocs, 15,992 frees, 346,375,212 bytes allocated
==4741==
==4741== LEAK SUMMARY:
==4741== definitely lost: 8 bytes in 1 blocks
==4741== indirectly lost: 104 bytes in 4 blocks
==4741== possibly lost: 144,211 bytes in 4 blocks
==4741== still reachable: 1,235,910 bytes in 1,532 blocks
==4741== suppressed: 0 bytes in 0 blocks
==4741== Rerun with --leak-check=full to see details of leaked memory
==4741==
==4741== For counts of detected and suppressed errors, rerun with: -v
==4741== Use --track-origins=yes to see where uninitialised values come from
==4741== ERROR SUMMARY: 510 errors from 8 contexts (suppressed: 0 from 0)
fish: “valgrind ./systemshock” terminated by signal SIGSEGV (Address boundary error)
@Interrupt
Hopefully the a new SDL_Mixer release gets cut soon and we don't have to deal with compiling the dependencies ourselves anymore, although making sure that linking picks up a 32bit lib over a 64bit one is still going to be an issue.
Just to point out this wasn't an issue for me when compiling from source. I tried to do so before running the SDL install script and without a 32bit SDL2/Mixer, but with a 64bit SDL2/Mixer, and it failed to link to them.
By the way everyone, thank you all for your time helping me now, and thank you for working on this. Even though I can't run it yet I'm still very happy about this actually being a thing.
It's off-topic but are there any plans to integrate the TSHHP Irrlicht renderer with the logic from the released System shock sources?
RE: an Irrlicht renderer: Now that we have the sources for the game there's not much reason to bolt on another game engine to do the rendering. What we could do and have done already in the case of OpenGL support is to add new rendering backends that support different hardware accelerated features.
FYI: I worked with downstream maintainers and SDL_Mixer just got updated to 2.0.2 (and SDL2 2.0.8), should you need it, for F28 & F29, see https://bodhi.fedoraproject.org/updates/FEDORA-2018-f0923138c6
@janisozaur The critical change is this: https://github.com/SDL-mirror/SDL_mixer/commit/7cad09d4d479df2b21b3e489f8e155bdf8254fd4
Without this commit there are not digital sounds. What we really need is a new stable release of SDL_Mixer.
Ah, I misunderstood you then.
I'm confused. I've installed Fedora 28 x86_64 in VirtualBox, had a fight with yum and the guest additions, compiled master and I cannot reproduce @laleksic's problem. Everything works as expected modulo serious lag.
@Manuel-K If that's so, something must be broken in my installation. I'll try to get to the bottom of it and if I get any results I'll post what I did here for others (in case someone else has the same problem).
I would check the nvidia driver first (e.g. /lib/libGLX_nvidia.so.0).
Hello, having some trouble running this on Fedora 28. Tried both latest binary release and compiling from source. Both times the binary terminates with:
If relevant, here's some output from gdb (the binary release):
And when running the built from source:
It would seem something is wrong with dlopen or dynamic library loading.
In both the case of running the binary build and building from source I ran the SDL script (
install_32bit_sdl.sh
/build_deps.sh
respectively) as root.