Skip to content

cannot create game server on linux #294

Closed
aaptel opened this issue Sep 27, 2017 · 5 comments
Closed

cannot create game server on linux #294

aaptel opened this issue Sep 27, 2017 · 5 comments

Comments

@aaptel
Copy link

aaptel commented Sep 27, 2017

Hi,

I've managed to build xash3d (master bcd55ee ) in 32bit under a 64bit Linux system (openSUSE 42.2)
but I was getting errors with some system calls. The directory entry written
by readdir() assumed large file support (file size >2GB) and so would
fail everytime xash3d called it, effectively making listdirectory()
silently always return 0 entries. I had to set CFLAGS to

-D_FILE_OFFSET_BITS=64

To work around this. Final build command was:

mkdir build
cd build
cmake -DHL_SDK_DIR=../hlsdk -DXASH_SDL=yes -DXASH_VGUI=yes \
           -DCMAKE_C_FLAGS="-m32 -D_FILE_OFFSET_BITS=64" \
           -DCMAKE_CXX_FLAGS="-m32 -D_FILE_OFFSET_BITS=64" \
           -DCMAKE_EXE_LINKER_FLAGS="-m32" ../
make

and it built properly.

mkdir ~/xash3d
cp engine/libxash.so \
   game_launch/xash3d \
   mainui/libxashmenu.so \
   ../hlsdk/linux/vgui.so \
   vgui_support/libvgui_support.so \
   ../xash3d.sh \
   ~/xash3d

I have installed and run at least once counter-strike on both linux
(native steam provided by valve) and windows and so I have a copy of
the Half-life valve & cstrike folder for both versions.

I've tried copying them over ~/xash3d

#
# clear, copy linux steam files, and see what dll&so we have
#
cd ~/xash3d
rm -rf valve cstrike && cp -r hl-steam-linux/{valve,cstrike} .
find valve cstrike -iname '*.so*' -or -iname '*.dll*'

Returns this:

valve/cl_dlls/particleman.so
valve/cl_dlls/gameui.so
cstrike/cl_dlls/client.dll
cstrike/cl_dlls/client.so
cstrike/dlls/cs.so
cstrike/dlls/cs_amd64.so
cstrike/dlls/mp.dll

Now if I run the game I have a popup with these errors:

cl_dlls/client.so: cannot open shared object file: No such file or directory
libtier0.so: cannot open shared object file: No such file or directory
client.so: cannot open shared object file: No such file or directory

I can click OK and it continues to load and run. The game opens, I can
go in LAN and Create a game but the screen doesnt change when I create
the game. Full log:

./xash3d.sh -game cstrike -dev 100

[20:04:14] /home/aaptel/x is working directory now
================================================================================
        Xash3D FWGS (build 910, Linux-i386) started at Sep27 2017 [20:04.14]
================================================================================
[20:04:14] Console initialized
[20:04:14] FS_AddGameDirectory( ./, 0 )
[20:04:14] FS_Init: done
[20:04:14] FS_LoadGameInfo( cstrike )
[20:04:14] FS_Rescan( Counter-Strike )
[20:04:14] 0 cstrike valve
[20:04:14] 1 valve valve
[20:04:14] FS_AddGameDirectory( valve/, 0 )
[20:04:14] Adding wadfile valve/cached.wad (2 files)
...(wad files)...
[20:04:14] Adding wadfile valve/xeno.wad (264 files)
[20:04:14] FS_AddGameDirectory( cstrike/downloaded/, 10 )
[20:04:14] FS_AddGameDirectory( cstrike/, 4 )
[20:04:14] Adding wadfile cstrike/ajawad.wad (1 files)
...(more wad files)...
[20:04:14] Adding wadfile cstrike/tswad.wad (29 files)
[20:04:14] FS_AddGameDirectory( cstrike/custom/, 10 )
[20:04:14] InitDecals: 225 decals
[20:04:14] Joystick: SDL
[20:04:14] No joystick found.
[20:04:14] NET_Init()
[20:04:14] Console initialized.
[20:04:14] couldn't exec video.cfg
[20:04:14] couldn't exec opengl.cfg
[20:04:14] Set: [1920x1080]
[20:04:14] Got closest display mode: 1920x1080@60
[20:04:14] VID_StartupGamma: validate screen gamma - ok
[20:04:14] GL_CheckExtension: OpenGL 1.1.0 - enabled
[20:04:14] Video: Mesa DRI Intel(R) Haswell Desktop x86/MMX/SSE2
[20:04:14] GL_CheckExtension: glDrawRangeElements - enabled
...(GL stuff)...
[20:04:14] GL_Upload: *vsdct s&3 [1 x 1]
[20:04:14] SCR_Init()
[20:04:14] AVI: Not supported
[20:04:14] UI_SetColors: colors.lst not found
[20:04:14] UI_LoadBmpButtons: btns_main.bmp not found
[20:04:14] Using SDL audio driver: pulseaudio @ 44100 Hz
[20:04:14] IN_TouchInit()
[20:04:29] Sys_Warn: Could not load client library:
cl_dlls/client.so: cannot open shared object file: No such file or directory
libtier0.so: cannot open shared object file: No such file or directory
client.so: cannot open shared object file: No such file or directory

[20:04:29] Reading config script file settings.scr
[20:04:29] Reading config script file user.scr
[20:04:29] execing config.cfg
[20:04:29] couldn't exec userconfig.cfg
[20:04:29] execing valve.rc
[20:04:29] execing language.cfg
[20:04:29] couldn't exec joystick.cfg
[20:04:29] execing autoexec.cfg
[20:04:29] execing violence.cfg
[20:04:29] execing config.cfg
[20:04:29] couldn't exec userconfig.cfg
[20:04:29] execing game.cfg
[20:04:29] execing touch.cfg
[20:04:29] FS_OpenStream: couldn't open "media/gamestartup"
[20:04:29] FS_OpenStream: couldn't open "gamestartup"
[20:04:29] Warning: FS_LoadSound: couldn't load "media/launch_upmenu1"
[20:04:29] Set: [1920x1080]
[20:04:29] Got closest display mode: 1920x1080@60

After I create the game I can see in the log the models are loaded and
everything but my screen is still in the "create server" menu, where I
can navigate but not play!

[20:08:01] Server IP address: (null)
[20:08:02] maps.lst found: basedir
[20:08:06] SV_LoadProgs: initailized Server Blending interface ver. 1
[20:08:06] Dll loaded for mod Counter-Strike
[20:08:06] SV: hull0, player_mins: -16 -16 -36, player_maxs: 16 16 36
[20:08:06] SV: hull1, player_mins: -16 -16 -18, player_maxs: 16 16 18
[20:08:06] SV: hull2, player_mins: 0 0 0, player_maxs: 0 0 0
[20:08:06] Reading config script file user.scr
[20:08:06] Reading config script file settings.scr
[20:08:06] execing listenserver.cfg
[20:08:06] Spawn Server: cs_office
[20:08:06] Mod_LoadModel: maps/cs_office.bsp
[20:08:06] SV_SpawnEntities( cs_office )
[20:08:06] execing game.cfg
[20:08:06] Mod_LoadModel: sprites/voiceicon.spr
[20:08:06] server: GAME SKILL LEVEL:1
[20:08:06] server: Executing listen server config file
[20:08:06] Mod_LoadModel: models/w_kevlar.mdl
....(model loading)....
[20:08:06] Mod_LoadModel: models/fleshgibs.mdl
[20:08:06] SV_LoadFromFile: 0 entities inhibited
[20:08:06] Total 252 entities spawned
[20:08:06] Mod_LoadModel: sprites/muzzleflash.spr
...(more model loading)...
[20:08:06] Mod_LoadModel: sprites/richo1.spr
[20:08:06] 8 player server started
[20:08:06] execing listenserver.cfg
[20:08:06] execing listenserver.cfg

If run click on "create server" again it says one is already running
and saying OK will stop that one to create a new. OK again will do
what is said, but same result: I'm still in the menu. There is written
"Dedicated Server" at the bottom but I see no checkbox or anything
that indicates if this option is on or off :/

Any ideas?

@a1batross
Copy link
Member

You can't run client library from CS 1.6.

You should build Xash Dedicated Server(Pass -DXASH_DEDICATED=1 to cmake).

@aaptel
Copy link
Author

aaptel commented Sep 28, 2017

I think I explained myself wrong. I just want to play CS 1.6 on LAN from linux and I'm not able to. This is supposed to be possible right? I'm not interested in a dedicated server, just want to create a LAN game, play and have other xash3d CS players join from my LAN.

Right now when I create a multiplayer game from the menu I never leave the menu.

@a1batross
Copy link
Member

a1batross commented Sep 28, 2017 via email

@aaptel
Copy link
Author

aaptel commented Sep 28, 2017 via email

@a1batross
Copy link
Member

It's not hard. Mostly it even works(on my dev machine).
But I'm just not interested in this and even keeping cs16client open source too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants