Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through Paypal, Flattr and Liberapay!
  Go to:
Soldier of Fortune OpenGL error
Hamish commented on 9 September 2017 at 4:13 pm UTC

ageresThere is a Linux port of Soldier of Fortune. Why don't you use it?
You try finding a boxed Loki Software copy of it though, to be fair. It is not exactly up on Steam or GOG.com for sale at the moment.

Your current issue megalanya seems to relate to the game wanting to use a 16 bit colour mode. Some quick research indicates that setting Wine to emulate a virtual desktop through winecfg may help. You should also probably set the game to use Windows 98 compatibility wile you are there to.

Hamish commented on 9 September 2017 at 4:37 pm UTC

I will also point out that for the Windows version of Solider of Fortune you can apparently download a patched DLL that will permanently resolve the extension problem for you:
https://pcgamingwiki.com/wiki/Soldier_of_Fortune#Crashes_on_graphics_drivers_with_long_GL_EXTENSIONS_string

PCGamingWiki is your friend.

megalanya commented on 9 September 2017 at 5:09 pm UTC

ageresThere is a Linux port of Soldier of Fortune. Why don't you use it?

Because Loki Entertainment defunct in 2001. GNU/Linux version of this game is not available.

Hamish
ageresThere is a Linux port of Soldier of Fortune. Why don't you use it?
You try finding a boxed Loki Software copy of it though, to be fair. It is not exactly up on Steam or GOG.com for sale at the moment.

Your current issue megalanya seems to relate to the game wanting to use a 16 bit colour mode. Some quick research indicates that setting Wine to emulate a virtual desktop through winecfg may help. You should also probably set the game to use Windows 98 compatibility wile you are there to.

HamishI will also point out that for the Windows version of Solider of Fortune you can apparently download a patched DLL that will permanently resolve the extension problem for you:
https://pcgamingwiki.com/wiki/Soldier_of_Fortune#Crashes_on_graphics_drivers_with_long_GL_EXTENSIONS_string

PCGamingWiki is your friend.

I have tried the suggestions you mentioned and many other suggestions already. But it didn't work, unfortunately. Discussion is here:

http://www.sof1.org/viewtopic.php?t=4311

New "ref_gl.dll" have already been made in "Soldier of Fortune Community Edition". It does not work.

I see you use an AMD card and an open source driver like myself.

"Soldier of Fortune: Community Edition" is available here:

http://www.sof1.org/sofdownload.php

If want to try, you can download it here.

whizse commented on 22 February 2018 at 6:27 pm UTC

FWIW, it is possible to get the native linux port running somewhat:

* Install the Windows version of the game with Wine.
* Grab the modified installer for the Loki port (under beta) and extract it with unzip.
* Extract the resulting tar file for the linux port binaries.
* Grab game data files from Wine install.
* Symlink /usr/lib/i386-linux-gnu/libGL.so.1 (or wherever it lives on your system) to libGL.so in game dir.
* Start with ./sof +set gl_driver libGL.so

The game runs and is playable, the big gotcha is that sound doesn't work. Launching it with pasuspender results in a segfault here:
#0 0xf6d3f4f2 in sl_add () from /lib/i386-linux-gnu/libbsd.so.0
No symbol table info available.
#1 0xee110386 in _S_StartSound () from ./liboasnd.so

whizse commented on 22 February 2018 at 8:58 pm UTC

Gave it a try with Wine 3.1, using the platinum version of the game.

Seems to be working fine with MESA_EXTENSION_MAX_YEAR=2000 and gl_gentextures_broken "1" in config.cfg.

rea987 commented on 27 May 2018 at 7:19 pm UTC

whizseThe game runs and is playable, the big gotcha is that sound doesn't work. Launching it with pasuspender results in a segfault here:
#0 0xf6d3f4f2 in sl_add () from /lib/i386-linux-gnu/libbsd.so.0
No symbol table info available.
#1 0xee110386 in _S_StartSound () from ./liboasnd.so

The game used to run natively by using OSSPD just fine on Linux Mint 18.3 (Ubuntu 16.04 based). However, starting with Ubuntu 17.10, OpenAL compatibility seems to be messed up. As the game uses a custom libopenal-0.0.so and liboasnd.so libraries, the game crashes if executed with an OSS emulator that was not a case with Ubuntu releases prior to 17.10. As I tried renaming libopenal-0.0.so and linking system's own OpenAL library to game's directory as libopenal-0.0.so; it returns no sound. I will contact with Alan Swanson who seems to be the owner of Loki Compatibility Libraries.

dusted commented on 9 August 2018 at 9:06 am UTC

Sorry to resurrect, but this seems like the latest thread.. Found this while working on getting SoF running on my new system..

I wrote a resolution hack, and that still works. I updated the page with additional information on how to fix a segmentation fault that occurs because of a too long extension list (what whizse suggest seems reasonable, but didn't work for me on Linux, so I found another way as detailed on the resolution hack page).

I'm having the same trouble as you, getting it to work with padsp.. Someone gives sl_add a bad parameter, probably _S_StartSound.. Now, I've not found the source for libaosnd.so (which provides _S_StartSound) but I've managed to get the modified alsa version from the Loki CD to build and that actually kinda works.. It will play ONE sound, after playback, it crashes, as described by rea987.

I wonder if the problem is that the poor _S_StartSound function ALSO gets unexpected data, in that case, it would get it from the alsa lib, which it loads. If that is the case, we may be able to modify the alsa lib to provide the expected parameters to _S_StartSound..

Anyone got updated info on this ? I'm very interested in knowing if rea987 were able to get hold of Alan and maybe obtain the source for the liboasnd ?

adamhm commented on 24 March 2019 at 12:13 am UTC

I decided to try SoF in Wine while it's on sale at GOG, and it looks like the error in the OP may be due to an issue with Mesa. On my main system (see profile) I get the same error and nothing I've tried has been able to resolve it. However on my old system which uses an Nvidia GPU this error does not occur - no tweaks are required to get the game to start (old system is still running Mint 18 though so that might also be a factor)

Running the game with "+set logfile 2 +set gl_log", the ref_gl section of the log looks like this on my main system:

Quote------- Loading ref_gl.dll -------
ref_gl version: GL 0.01
Initializing OpenGL display
...setting mode 3: 640 480 FS
...attempting fullscreen
...using desktop display depth of 32
...calling CDS: ok
...registering window class: ok
GLimp_Init() - no hardware acceleration detected
VID_CreateWindow() - GLimp_InitGL failed
Initializing OpenGL display
...setting mode 3: 640 480 FS
...attempting fullscreen
...using gl_bitdepth of 16
...calling CDS: ok
...registering window class: ok
GLimp_Init() - no hardware acceleration detected
VID_CreateWindow() - GLimp_InitGL failed
ref_gl::R_SetMode() - 16bit unavailable in this mode
ref_gl::R_SetMode() - invalid mode
ref_gl::R_Init() - could not R_SetMode()
ref_gl::R_Init() - could not load "opengl"
Initializing OpenGL display
...setting mode 3: 640 480 FS
...attempting fullscreen
...using desktop display depth of 32
...calling CDS: ok
...registering window class: ok
GLimp_Init() - no hardware acceleration detected
VID_CreateWindow() - GLimp_InitGL failed
Initializing OpenGL display
...setting mode 3: 640 480 FS
...attempting fullscreen
...using gl_bitdepth of 16
...calling CDS: ok
...registering window class: ok
GLimp_Init() - no hardware acceleration detected
VID_CreateWindow() - GLimp_InitGL failed
ref_gl::R_SetMode() - 16bit unavailable in this mode
ref_gl::R_SetMode() - invalid mode
ref_gl::R_Init() - could not R_SetMode()
ref_gl::R_Init() - could not load "3dfxvgl"
ref_gl::R_Init() - could not load "3dfxogl"
Cmd_RemoveCommand: avi not added
R_Shutdown() - Shutting down
************************************************************
ERROR: Could not initialize OpenGL rendering environment!

Make sure you have the latest drivers installed (GLSetup is recommended)
Make sure your desktop has more than 256 colors


************************************************************

However on my old system it looks like this:

Quote------- Loading ref_gl.dll -------
ref_gl version: GL 0.01
Initializing OpenGL display
...setting mode 3: 640 480 FS
...attempting fullscreen
...using desktop display depth of 32
...calling CDS: ok
...registering window class: ok
GL_PFD: color(24-bits) Z(24-bit)
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce GTX 750 Ti/PCIe/SSE2
GL_VERSION: 4.6.0 NVIDIA 415.27
GL_MAX_TEXTURE_SIZE: 16384
...allowing CDS
...enabling WGL_EXT_swap_control
...using GL_ARB_multitexture (4 TMUs)
...GL_EXT_texture_filter_anisotropic available
...using GL_EXT_texture_filter_anisotropic
...using GL_S3_s3tc
------------------------------------

  Go to:

Due to spam you need to Register and Login to comment.


Or login with...

Livestreams & Videos
Community Livestreams
See more!
Popular this week
View by Category
Contact
Latest Comments
Latest Forum Posts