You are not logged in.

#1 2012-03-07 20:25:22

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

[Solved] Problem running Return to Castle Wolfenstein

I just installed RTCW via AUR (wolf) and copied all the appropriate files from the CDs into the appropriate directory.

When I try and run it I get the following error:

[paul@kirstine ~]$ wolfsp
Wolf 1.41 linux-i386 Dec  4 2002
----- FS_Startup -----          
Current search path:            
/home/paul/.wolf/main           
/opt/wolf/main/sp_pak4.pk3 (21 files)
/opt/wolf/main/sp_pak3.pk3 (14 files)
/opt/wolf/main/sp_pak2.pk3 (232 files)
/opt/wolf/main/sp_pak1.pk3 (1342 files)
/opt/wolf/main/pak0.pk3 (4775 files)
/opt/wolf/main                  
                                
----------------------          
6384 files in pk3 files         
execing default.cfg             
couldn't exec language.cfg      
couldn't exec wolfconfig.cfg    
couldn't exec autoexec.cfg      
Hunk_Clear: reset the hunk ok   
Bypassing CD checks             
----- Client Initialization -----
Cmd_AddCommand: map_restart already defined
----- Initializing Renderer ----
------------------------------- 
----- Client Initialization Complete -----
----- R_Init -----              
...loading libGL.so.1: Initializing OpenGL display
...setting mode 3: 640 480      
Using XFree86-VidModeExtension Version 2.2
XF86DGA Mouse (Version 2.0) initialized
XFree86-VidModeExtension Activated at 640x480
Couldn't get a visual
...WARNING: could not set the given mode (3)
----- CL_Shutdown -----
RE_Shutdown( 1 )
-----------------------
----- CL_Shutdown -----
-----------------------
Sys_Error: GLimp_Init() - could not load OpenGL subsystem

My video card is an onboard Nvidia one.

Any ideas?

Last edited by phunni (2012-03-20 15:20:15)

Offline

#2 2012-03-07 21:41:35

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 943

Re: [Solved] Problem running Return to Castle Wolfenstein

Eh... Are you running x86_64? Do you have the appropriate lib32 packages? Try installing Wolfenstein via wine, funny enough all the "native" linux games always run easier (and better - no sound/alt tabbing issues) under wine


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#3 2012-03-08 09:40:37

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

Re: [Solved] Problem running Return to Castle Wolfenstein

I am running on x86_64. After installing the lib32 version of nvidia utils I now get a different error:

[paul@kirstine ~]$ wolfsp
Wolf 1.41 linux-i386 Dec  4 2002
----- FS_Startup -----
Current search path:
/home/paul/.wolf/main
/opt/wolf/main/sp_pak4.pk3 (21 files)
/opt/wolf/main/sp_pak3.pk3 (14 files)
/opt/wolf/main/sp_pak2.pk3 (232 files)
/opt/wolf/main/sp_pak1.pk3 (1342 files)
/opt/wolf/main/pak0.pk3 (4775 files)
/opt/wolf/main

----------------------
6384 files in pk3 files
execing default.cfg
couldn't exec language.cfg
couldn't exec wolfconfig.cfg
couldn't exec autoexec.cfg
Hunk_Clear: reset the hunk ok
Bypassing CD checks
----- Client Initialization -----
Cmd_AddCommand: map_restart already defined
----- Initializing Renderer ----
-------------------------------
----- Client Initialization Complete -----
----- R_Init -----
...loading libGL.so.1: Initializing OpenGL display
...setting mode 3: 640 480
Using XFree86-VidModeExtension Version 2.2
XF86DGA Mouse (Version 2.0) initialized
XFree86-VidModeExtension Activated at 640x480
Using 8/8/8 Color bits, 24 depth, 0 stencil display.
GL_RENDERER: GeForce 7025 / nForce 630a/integrated/SSE2
Initializing OpenGL extensions
...using GL_S3_s3tc
...ignoring GL_EXT_texture_env_add
...using GL_ARB_multitexture
...using GL_EXT_compiled_vertex_array
...using GL_NV_fog_distance
XF86 Gamma extension initialized

GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 7025 / nForce 630a/integrated/SSE2
GL_VERSION: 2.1.2 NVIDIA 295.20
GL_EXTENSIONS: GL_ARB_color_buffer_float GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_copy_buffer GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_get_program_binary GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_internalformat_query GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_provoking_vertex GL_ARB_robustness GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shading_language_420pack GL_ARB_shading_language_include GL_ARB_shadow GL_ARB_sync GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transpose_matrix GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_direct_state_access GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_shader_objects GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_storage GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_EXT_x11_sync_object GL_EXT_import_sync_object GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_alpha_test GL_NV_blend_minmax GL_NV_blend_square GL_NV_complex_primitives GL_NV_copy_depth_to_color GL_NV_depth_clamp GL_NV_fbo_color_attachments GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragdepth GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_framebuffer_multisample_coverage GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_barrier GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_lod_clamp GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NVX_conditional_render GL_OES_depth24 GL_OES_depth32 GL_OES_depth_texture GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_deriva
Received signal 11, exiting...

I appreciate that I can always install via wine - and will if I can't get this working, but would like ot try and get it running natively first.  I've had it running natively before flawlessly, and would just prefer that route. If It can get it working...

Offline

#4 2012-03-09 04:13:05

smudge
Member
Registered: 2011-03-20
Posts: 135

Re: [Solved] Problem running Return to Castle Wolfenstein

A comment on wolfs AUR page looks like it might be what you need:

Comment by: zebulon on Thu, 27 Jan 2011 07:50:14 +0000
    Note to NVIDIA users: you'll need to use this command to truncate the GL_EXTENSIONS string that can lead to a segfault at start:
    __GL_ExtensionStringVersion=17700 wolfsp

Offline

#5 2012-03-12 12:07:13

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

Hi, even with this, you won't be able to make the Id binary on x86_64 due to a new compatibility problem with the new x86_64 glibc (menddef.h issue). The way forward is to recompile iortcw from source, after applying a few patches. Furthermore, to enable sound, linux_snd.c has to be replaced with a sdl-based sound processing code. This works perfectly on my machine, and am able to compile (and make it work) with a minimal patch set. I shall create a PKGBUILD soon, as soon as I decide on a repository to store the code. Besides, I love RTCW!

Offline

#6 2012-03-17 11:50:07

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

Re: [Solved] Problem running Return to Castle Wolfenstein

zebulon - glad to hear you're planning on doing a PKGBUILD for this - please let us know when you have!

I'm keen to get this working.  I even went against my gut and tried to install it via crossover games, but that didn't work either.  Would be much happier with a native install.

Offline

#7 2012-03-18 17:32:26

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

Hi Phunni. I will let you know. I try to get access to the original repository (rtcw-sp) but it seems nobody really administrates it. Alternativelyy, I have to open a new repository somewhere (sourceforge, github, bitbicket?) like many others and provide a working version.

If you want to try for yourself, the procedure is easy, as long as you are familiar with compilation:

0) Install:

gcc-multilib
lib32sdl
lib32-glibc
lib32-libstdc++5
lib32-gcc-libs
mesa
nasm
lib32-libX11
lib32-libxext
lib32-libxxf86dga
lib32-libxxf86vm

You'll need your video drivers (I use nvidia, I cannot give any advice for the other cards). They may replace the mesa package listed above, I think this is normal.

1) clone the rtcw-sp repository from http://hg.ioquake.org/

hg clone http://hg.ioquake.org/rtcw-sp

2) in the src directory of rtcw-sp, add a directory named "sdl", and within this directory the sdl_snd.c file from https://raw.github.com/cbxbiker61/wolfs … /sdl_snd.c, but change the code at the beginning. Replace:

#ifdef USE_LOCAL_HEADERS
#	include "SDL.h"
#else
#	include <SDL.h>
#endif

with:

#include "/usr/include/SDL/SDL.h"

3) copy this patch in a file named patch.txt:

diff -Nur rtcw-sp/src/botlib/l_precomp.c rtcw-sp-sdl-64/src/botlib/l_precomp.c
--- rtcw-sp/src/botlib/l_precomp.c	2012-03-20 11:10:14.891479570 +0000
+++ rtcw-sp-sdl-64/src/botlib/l_precomp.c	2012-03-20 10:55:12.327462172 +0000
@@ -925,7 +925,8 @@
 	{
 		if ( ( *ptr == '\\' || *ptr == '/' ) &&
 			 ( *( ptr + 1 ) == '\\' || *( ptr + 1 ) == '/' ) ) {
-			strcpy( ptr, ptr + 1 );
+		  //			strcpy( ptr, ptr + 1 );
+		  memmove( ptr, ptr + 1, strlen(ptr) );
 		} //end if
 		else
 		{
diff -Nur rtcw-sp/src/botlib/l_script.c rtcw-sp-sdl-64/src/botlib/l_script.c
--- rtcw-sp/src/botlib/l_script.c	2012-03-20 11:10:14.891479570 +0000
+++ rtcw-sp-sdl-64/src/botlib/l_script.c	2012-03-20 10:56:32.491892437 +0000
@@ -1152,7 +1152,8 @@
 //============================================================================
 void StripDoubleQuotes( char *string ) {
 	if ( *string == '\"' ) {
-		strcpy( string, string + 1 );
+	  //		strcpy( string, string + 1 );
+	  memmove( string, string + 1, strlen(string) );
 	} //end if
 	if ( string[strlen( string ) - 1] == '\"' ) {
 		string[strlen( string ) - 1] = '\0';
@@ -1166,7 +1167,8 @@
 //============================================================================
 void StripSingleQuotes( char *string ) {
 	if ( *string == '\'' ) {
-		strcpy( string, string + 1 );
+	  //		strcpy( string, string + 1 );
+	  memmove( string, string + 1, strlen(string) );
 	} //end if
 	if ( string[strlen( string ) - 1] == '\'' ) {
 		string[strlen( string ) - 1] = '\0';
diff -Nur rtcw-sp/src/renderer/tr_init.c rtcw-sp-sdl-64/src/renderer/tr_init.c
--- rtcw-sp/src/renderer/tr_init.c	2012-03-20 11:10:15.095440099 +0000
+++ rtcw-sp-sdl-64/src/renderer/tr_init.c	2012-03-20 10:57:15.859445086 +0000
@@ -844,7 +844,7 @@
 	ri.Printf( PRINT_ALL, "\nGL_VENDOR: %s\n", glConfig.vendor_string );
 	ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glConfig.renderer_string );
 	ri.Printf( PRINT_ALL, "GL_VERSION: %s\n", glConfig.version_string );
-	ri.Printf( PRINT_ALL, "GL_EXTENSIONS: %s\n", glConfig.extensions_string );
+	//	ri.Printf( PRINT_ALL, "GL_EXTENSIONS: %s\n", glConfig.extensions_string );
 	ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %d\n", glConfig.maxTextureSize );
 	ri.Printf( PRINT_ALL, "GL_MAX_ACTIVE_TEXTURES_ARB: %d\n", glConfig.maxActiveTextures );
 	ri.Printf( PRINT_ALL, "\nPIXELFORMAT: color(%d-bits) Z(%d-bit) stencil(%d-bits)\n", glConfig.colorBits, glConfig.depthBits, glConfig.stencilBits );
diff -Nur rtcw-sp/src/unix/Conscript-client rtcw-sp-sdl-64/src/unix/Conscript-client
--- rtcw-sp/src/unix/Conscript-client	2012-03-20 11:10:15.123944280 +0000
+++ rtcw-sp-sdl-64/src/unix/Conscript-client	2012-03-20 10:58:27.639781516 +0000
@@ -151,7 +151,7 @@
   . $BUILD_DIR . '/unix/jpeglib.a '
   . $BUILD_DIR . '/unix/asmlib.a '
   . $BUILD_DIR . '/unix/inlinelib.a '
-  . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -ldl -lm'
+  . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -ldl -lm -lSDL'
 );
 
 @RENDERER_FILES = qw(
@@ -231,7 +231,7 @@
   ../unix/linux_qgl.c   
   ../unix/linux_glimp.c   
   ../unix/linux_joystick.c  
-  ../unix/linux_snd.c 
+  ../sdl/sdl_snd.c 
   );
 $UNIX_REF = \@UNIX_FILES;
 

4) Apply the patch:

cd rtcw-sp
patch -p1 < /path/to/patch.txt

5) in src/unix, compile RTCW by executing this command

./cons -- release

That's it! a working RTCW is available in src/unix/release-x86-Linux-2.1/out/

You need to copy the pk3 in main of course, like before.

Last edited by zebulon (2012-03-20 12:09:37)

Offline

#8 2012-03-19 09:29:13

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

Re: [Solved] Problem running Return to Castle Wolfenstein

First patch is consistently failing with

Hunk #1 FAILED at 31.
1 out of 1 hunk FAILED -- saving rejects to file sdl_snd.c.out.rej

I've tried patching using

patch < patchfile

&

patch -p1 < patchfile

and

 patch -i patchfile -o outputfile

Offline

#9 2012-03-19 10:59:32

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

Hi Phunni,

The first patch consists in replacing the line:

#include "../SDL12/include/SDL.h"

with

#include "/usr/include/SDL/SDL.h"

so that you link to the Arch SDL libraries.

You may do it manually if patch fails, it is possible that the line numbers slightly differ in the file you downloaded. the second patch should work fine.

Offline

#10 2012-03-20 10:07:19

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

Re: [Solved] Problem running Return to Castle Wolfenstein

Second patch also fails - and the include line in the first file is now completely different, although I managed to get it to compile.

I think, perhaps, I'll just wait for the PKGBUILD...

Offline

#11 2012-03-20 10:22:14

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

You're right, my mistake. You need to replace:

	
#ifdef USE_LOCAL_HEADERS
#       include "SDL.h"
#else
#       include <SDL.h>
#endif

with

#include "/usr/include/SDL/SDL.h"

Now for the second patch, I am puzzled. It is done on the original rtcw-sp repository. You could go through every file of the second patch and do the change yourself, manually. I'll provide a PKGBUILD when I am not too busy with work...

Offline

#12 2012-03-20 10:35:11

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

I am going to revise my instructions and will try them myself.

Last edited by zebulon (2012-03-20 10:42:51)

Offline

#13 2012-03-20 10:37:38

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

Re: [Solved] Problem running Return to Castle Wolfenstein

Failed again with this:

[paul@kirstine rtcw-sp]$ patch -p1 < patch
patching file src/botlib/l_precomp.c
Hunk #1 FAILED at 925.
1 out of 1 hunk FAILED -- saving rejects to file src/botlib/l_precomp.c.rej
patching file src/botlib/l_script.c
Hunk #1 FAILED at 1152.
Hunk #2 FAILED at 1166.
2 out of 2 hunks FAILED -- saving rejects to file src/botlib/l_script.c.rej
patching file src/renderer/tr_init.c
Hunk #1 FAILED at 844.
1 out of 1 hunk FAILED -- saving rejects to file src/renderer/tr_init.c.rej
patching file src/unix/Conscript-client
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n]               
Skipping patch.                 
2 out of 2 hunks ignored -- saving rejects to file src/unix/Conscript-client.rej

Offline

#14 2012-03-20 10:43:23

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

OK, I am going to revise the instructions. Will let you know when this works.

Offline

#15 2012-03-20 11:27:26

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

Re: [Solved] Problem running Return to Castle Wolfenstein

OK - thanks :-)

Offline

#16 2012-03-20 12:08:59

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

I have rewritten the procedure entirely, and it seems to work on my machine. Could you please try it? Note I have changed many steps and I recommend to restart from scratch (I changed the sdl_snd.c file source for instance).

Offline

#17 2012-03-20 14:34:12

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

Re: [Solved] Problem running Return to Castle Wolfenstein

That appears to have worked perfectly - am I copying the pak files now, so I'll let you know for sure whether it works after I'm sone copying.

I'd like to tidy things up and just have the compiled binaries now - is the root directory the "out" one, or the "release-x86-Linux-2.1" one?

Offline

#18 2012-03-20 14:58:52

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

If we compare with the original wolfsp binaries, I would say it is the "out" directory.

Offline

#19 2012-03-20 15:00:22

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

Note that rtcw-mp would certainly require the same patches, but that Punkbuster would not work with those binaries, as their checksums are modified. I do not know if that is a problem though. Happy gaming!

Offline

#20 2012-03-20 15:19:59

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 669

Re: [Solved] Problem running Return to Castle Wolfenstein

It works perfectly - thanks for all the help :-)

Offline

#21 2012-03-20 16:48:18

zebulon
Member
Registered: 2008-10-20
Posts: 235

Re: [Solved] Problem running Return to Castle Wolfenstein

Great. Anyway, I'll have to provide a PKGBUILD smile

Offline

#22 2013-02-17 21:49:58

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 314

Re: [Solved] Problem running Return to Castle Wolfenstein

zebulon wrote:

Great. Anyway, I'll have to provide a PKGBUILD smile

What about that idea?

By the way: I have a 32-bit system, but I get similar errors. What to do in that case?

Last edited by Thorsten Reinbold (2013-02-17 22:01:25)

Offline

Board footer

Powered by FluxBB