Project

General

Profile

Bug #452

doomsday will not start on solaris

Added by skolnick about 15 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
-
Target version:
Start date:
2007-06-07
% Done:

100%


Description

Hi!

I have used doomsday since a long time on linux, and it simply rules. Good work . However, now I am using Solaris x86. I managed to compile SDL, and all of its partners (SDL_mixer, SDL_net, etc) and of course, I compiled doomsday 1.9.0 beta 5. But when I try to start it, I only get this:

Code:

[gpulido@deathstar doomsday]$ doomsday -nojoy -game jdoom -wad doom2.wad LoadPlugin: libdpmapload.so LoadPlugin: libdpdehread.so SDL Init Failed: SDL not built with joystick support [gpulido@deathstar doomsday]$ uname -a SunOS deathstar 5.11 snv_61 i86pc i386 i86pc [gpulido@deathstar doomsday]$

Notice that I even tried using the -nojoy switch, but it didn't work. Normally, I would recompile SDL with joystick support, but it just happens that solaris lacks joystick support, therefore there is no way to compile SDL with support for joystick. Any way to run doomsday without it? I can hack the code a bit if necessary (if you tell me what can i look for )

Thanks for any pointers on this issue.

Thread: http://forums.newdoom.com/showthread.php?t=33538

Labels: Startup

History

#1 Updated by yagisan about 15 years ago

Logged In: YES
user_id=1248824
Originator: NO

Assigned to myself. Its probably a matter of an ifdef conditional on being built on a solaris system. I'll set up a nexenta (slaris kernel, ubuntu userland) machine in qemu and see how the build system detects solaris, then ifdef the sdl init as needed.

Thanks for this report. Something fun for me to do :D

#2 Updated by skyjake about 15 years ago

Logged In: YES
user_id=717323
Originator: NO

One small thing one could try is to just not initialize SDL joystick support with -nojoy has been specified.

See dd_uinit.c line 300. It could be changed to something like:

if(SDL_InitSubSystem(SDL_INIT_VIDEO | (!ArgExists("-nojoy")? SDL_INIT_JOYSTICK : 0)))

#3 Updated by yagisan about 15 years ago

Logged In: YES
user_id=1248824
Originator: NO

could you post you cmake diagnostics to this bug - eg, on my linux box it looks like this:

cmake ../doomsday/
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for doxygen...
-- Looking for doxygen... - NOT found
-- Looking for dot tool...
-- Looking for dot tool... - NOT found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- * Doxygen not found. On Ubuntu install doxygen. On Mac OSX install FIXME. On Windows install FIXME.
-- *
Graphviz not found. On Ubuntu install graphviz. On Mac OSX install FIXME. On Windows install FIXME.
-- BUILDSCRIPTSDATE: $LastChangedDate: 2007-01-21 19:32:32 +1100 (Sun, 21 Jan 2007) $
-- CMAKE_SYSTEM: Linux-2.6.20-16-generic
-- CMAKE_SYSTEM_PROCESSOR: unknown
-- CMAKE_BUILD_TYPE:
-- CMAKE_C_FLAGS:
-- CMAKE_C_COMPILER: /usr/bin/gcc
-- CMAKE_SOURCE_DIR: /tmp/doomsday
-- CMAKE_BINARY_DIR: /tmp/thisone
-- BUILDJDOOM: ON
-- BUILDJHERETIC: ON
-- BUILDJHEXEN: ON
-- BUILDWOLFTC: OFF
-- BUILDDOOM64TC: OFF
-- BUILDJSTRIFE: OFF
-- BUILDOPENGL: ON
-- BUILDOPENAL: OFF
-- BUILDSDLMIXER: ON
-- BUILDDEDICATED: OFF
-- BUILDDOX: OFF
-- BUILDFIXEDASM: OFF
-- BUILDSYSTEM: UNIX
-- CMAKE_INSTALL_PREFIX /usr/local
-- DENG_BASE_DIR /usr/local/share/deng
-- DENG_LIBRARY_DIR /usr/local/lib
-- DENG_BINARY_DIR /usr/local/bin
-- DENG_ENGINE_DATA_DIR /usr/local/share/deng/data
-- DENG_JDOOM_DATA_DIR /usr/local/share/deng/data/jdoom
-- DENG_JHERETIC_DATA_DIR /usr/local/share/deng/data/jheretic
-- DENG_JHEXEN_DATA_DIR /usr/local/share/deng/data/jhexen
-- DENG_JSTRIFE_DATA_DIR /usr/local/share/deng/data/jstrife
-- DENG_WOLFTC_DATA_DIR /usr/local/share/deng/data/wolftc
-- DENG_DOOM64TC_DATA_DIR /usr/local/share/deng/data/doom64tc
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/thisone

#4 Updated by skolnick about 15 years ago

Logged In: YES
user_id=1097162
Originator: YES

Here's what you asked for, yagisan:

[root@deathstar build]# cmake ../
-- Looking for doxygen...
-- Looking for doxygen... - NOT found
-- Looking for dot tool...
-- Looking for dot tool... - NOT found
-- * Doxygen not found. On Ubuntu install doxygen. On Mac OSX install FIXME. On
Windows install FIXME.
-- *
Graphviz not found. On Ubuntu install graphviz. On Mac OSX install FIXME.
On Windows install FIXME.
-- BUILDSCRIPTSDATE: $LastChangedDate: 2007-01-08 10:34:20 +0200 (Mo
n, 08 Jan 2007) $
-- CMAKE_SYSTEM: SunOS-5.11
-- CMAKE_SYSTEM_PROCESSOR: i386
-- CMAKE_BUILD_TYPE:
-- CMAKE_C_FLAGS:
-- CMAKE_C_COMPILER: /usr/local/bin/gcc
-- CMAKE_SOURCE_DIR: /temp/deng-1.9.0-beta5/doomsday
-- CMAKE_BINARY_DIR: /temp/deng-1.9.0-beta5/doomsday/build
-- BUILDJDOOM: ON
-- BUILDJHERETIC: ON
-- BUILDJHEXEN: ON
-- BUILDWOLFTC: OFF
-- BUILDDOOM64TC: OFF
-- BUILDJSTRIFE: OFF
-- BUILDOPENGL: ON
-- BUILDOPENAL: OFF
-- BUILDSDLMIXER: ON
-- BUILDDEDICATED: OFF
-- BUILDDOX: OFF
-- BUILDFIXEDASM: OFF
-- BUILDSYSTEM: UNIX
-- CMAKE_INSTALL_PREFIX /usr/local
-- DENG_BASE_DIR /usr/local/share/deng
-- DENG_LIBRARY_DIR /usr/local/lib
-- DENG_BINARY_DIR /usr/local/bin
-- DENG_ENGINE_DATA_DIR /usr/local/share/deng/data
-- DENG_JDOOM_DATA_DIR /usr/local/share/deng/data/jdoom
-- DENG_JHERETIC_DATA_DIR /usr/local/share/deng/data/jheretic
-- DENG_JHEXEN_DATA_DIR /usr/local/share/deng/data/jhexen
-- DENG_JSTRIFE_DATA_DIR /usr/local/share/deng/data/jstrife
-- DENG_WOLFTC_DATA_DIR /usr/local/share/deng/data/wolftc
-- DENG_DOOM64TC_DATA_DIR /usr/local/share/deng/data/doom64tc
-- Configuring done
-- Generating done
-- Build files have been written to: /temp/deng-1.9.0-beta5/doomsday/build
[root@deathstar build]# pwd
/temp/deng-1.9.0-beta5/doomsday/build
[root@deathstar build]#

BTW: I had to patch the source code so it will compile on my system (had to rename some variables that conflict with others defined in the system includes, and an issue with solaris' dirent structure, which has no d_type entry nor DT_DIR defined. If you would like me to generate a patch for you, I'll be glad to do it. My system is solaris express NV61b, available at http://www.sun.com/software/solaris/solaris-express/get.jsp

Thanks.

#5 Updated by yagisan about 15 years ago

Logged In: YES
user_id=1248824
Originator: NO

help porting to solaris (including patches, buildslaves etc) is certainly welcome. My nexneta systems are not being co-operative right now, but I'll poke around more this weekend.

#6 Updated by skolnick about 15 years ago

Logged In: YES
user_id=1097162
Originator: YES

The workaround given by skyjake worked beautifully. Doomsday ran very good through doom2's first level. However, on exit it will always segfault (core dumped) but I cannot find the core file. I don't remember if it also segfaults on linux, but I think it doesn't.

Thanks!

#7 Updated by skolnick about 15 years ago

Logged In: YES
user_id=1097162
Originator: YES

Here's a diff of the original uncompressed release with the one I managed to compile and work successfully. Please also notice that besides this patches, I had to add -lm to the linking command (lines ~3398 and ~3677 in file doomsday/build/CMakeFiles/doomsday.dir/build.make) because without it, it will not find the math functions (cos,atan etc). I found no prettier way to add these parameters to the linking line. Thanks!

diff ur deng-1.9.0-beta5/doomsday/engine/unix/src/dd_uinit.c deng-1.9.0-beta5_old/doomsday/engine/unix/src/dd_uinit.c
--
deng-1.9.0-beta5/doomsday/engine/unix/src/dd_uinit.c Sun Sep 17 13:39:46 2006
+++ deng-1.9.0-beta5_old/doomsday/engine/unix/src/dd_uinit.c Fri Jun 8 11:57:45 2007
@ -294,7 +294,7 @
// run in dedicated mode.
if(!ArgExists("-dedicated")) {
- if(SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK))
+ if(SDL_InitSubSystem(SDL_INIT_VIDEO | (!ArgExists("-nojoy")?SDL_INIT_JOYSTICK : 0))) {
DD_ErrorBox(true, "SDL Init Failed: %s\n", SDL_GetError());
return 5;
diff ur deng-1.9.0-beta5/doomsday/engine/unix/src/sys_dylib.c deng-1.9.0-beta5_old/doomsday/engine/unix/src/sys_dylib.c
--
deng-1.9.0-beta5/doomsday/engine/unix/src/sys_dylib.c Thu Jan 4 00:02:11 2007
+++ deng-1.9.0-beta5_old/doomsday/engine/unix/src/sys_dylib.c Mon Jun 4 23:25:54 2007
@ -125,7 +125,10 @
while((entry = readdir(dir)) != NULL) {
#ifndef MACOSX
- if(entry->d_type != DT_DIR &&
+ DIR myHack;
+ myHack=opendir(entry->d_name);
+ if(!myHack &&
+ /*if(entry->d_type != DT_DIR &&
/
!strncmp(entry->d_name, "libdp", 5))
#endif
#ifdef MACOSX
diff ur deng-1.9.0-beta5/doomsday/plugins/common/src/g_game.c deng-1.9.0-beta5_old/doomsday/plugins/common/src/g_game.c
--
deng-1.9.0-beta5/doomsday/plugins/common/src/g_game.c Mon Jan 8 19:56:42 2007
++ deng-1.9.0-beta5_old/doomsday/plugins/common/src/g_game.c Mon Jun 4 23:54:45 2007
@ -2152,7 +2152,7 @
ok = false;
}
}
- else if(gamemode extended) // Extended version checks
else if(gamemode extendedNew) // Extended version checks {
if(*episode 6) {
diff ur deng-1.9.0-beta5/doomsday/plugins/common/src/mn_menu.c deng-1.9.0-beta5_old/doomsday/plugins/common/src/mn_menu.c
--
deng-1.9.0-beta5/doomsday/plugins/common/src/mn_menu.c Mon Jan 8 17:16:14 2007
+++ deng-1.9.0-beta5_old/doomsday/plugins/common/src/mn_menu.c Mon Jun 4 23:55:52 2007
@ -1536,7 +1536,7 @
#endif

#ifdef JHERETIC
- if(gamemode extended)
+ if(gamemode == extendedNew) { // Add episodes 4 and 5 to the menu
EpiDef.itemCount = EpiDef.numVisItems = 5;
EpiDef.y = 50 - ITEM_HEIGHT;
diff ur deng-1.9.0-beta5/doomsday/plugins/jdoom/src/wi_stuff.c deng-1.9.0-beta5_old/doomsday/plugins/jdoom/src/wi_stuff.c
--
deng-1.9.0-beta5/doomsday/plugins/jdoom/src/wi_stuff.c Tue Oct 31 21:49:40 2006
+++ deng-1.9.0-beta5_old/doomsday/plugins/jdoom/src/wi_stuff.c Mon Jun 4 23:42:20 2007
@ -347,7 +347,7 @
static dpatch_t frags;
// Time sucks.
-static dpatch_t time;
+static dpatch_t timeNew;
static dpatch_t par;
static dpatch_t sucks;

@ -1397,7 +1397,7 @
NULL, false, ALIGN_LEFT);
WI_drawPercent(SCREENWIDTH - SP_STATSX, SP_STATSY + 2 * lh, cnt_secret0);

- WI_DrawPatch(SP_TIMEX, SP_TIMEY, 1, 1, 1, 1, time.lump, NULL, false,
+ WI_DrawPatch(SP_TIMEX, SP_TIMEY, 1, 1, 1, 1, timeNew.lump, NULL, false,
ALIGN_LEFT);
WI_drawTime(SCREENWIDTH / 2 - SP_TIMEX, SP_TIMEY, cnt_time);

@ -1578,7 +1578,7 @
R_CachePatch(&colon, "WICOLON");

// "time" 
- R_CachePatch(&time, "WITIME");
+ R_CachePatch(&timeNew, "WITIME");
// "sucks" 
R_CachePatch(&sucks, "WISUCKS");
@ -1662,7 +1662,7 @
Z_ChangeTag(sp_secret.patch, PU_CACHE);
Z_ChangeTag(items.patch, PU_CACHE);
Z_ChangeTag(frags.patch, PU_CACHE);
- Z_ChangeTag(time.patch, PU_CACHE);
+ Z_ChangeTag(timeNew.patch, PU_CACHE);
Z_ChangeTag(sucks.patch, PU_CACHE);
Z_ChangeTag(par.patch, PU_CACHE);

diff ur deng-1.9.0-beta5/doomsday/plugins/jheretic/include/doomdef.h deng-1.9.0-beta5_old/doomsday/plugins/jheretic/include/doomdef.h
--
deng-1.9.0-beta5/doomsday/plugins/jheretic/include/doomdef.h Tue Oct 31 21:49:40 2006
++ deng-1.9.0-beta5_old/doomsday/plugins/jheretic/include/doomdef.h Mon Jun 4 23:46:55 2007
@ -92,7 +92,7 @
typedef enum {
shareware, // shareware, E1, M9
registered, // DOOM 1 registered, E3, M27
- extended, // episodes 4 and 5 present
extendedNew, // episodes 4 and 5 present
indetermined // Well, no IWAD found.
} GameMode_t;

diff ur deng-1.9.0-beta5/doomsday/plugins/jheretic/src/h_main.c deng-1.9.0-beta5_old/doomsday/plugins/jheretic/src/h_main.c
--
deng-1.9.0-beta5/doomsday/plugins/jheretic/src/h_main.c Tue Jan 9 06:57:18 2007
+++ deng-1.9.0-beta5_old/doomsday/plugins/jheretic/src/h_main.c Mon Jun 4 23:48:41 2007
@ -156,7 +156,7 @
gamemodebits = GM_REGISTERED;
break;

- case extended: // episodes 4 and 5 present
+ case extendedNew: // episodes 4 and 5 present
gamemodebits = GM_EXTENDED;
break;

@ -431,7 +431,7 @
D_SetGameMode(shareware);
else if(W_CheckNumForName("EXTENDED") != 1)
// Found extended lump, must be the extended WAD
D_SetGameMode(extended);
+ D_SetGameMode(extendedNew);
else
D_SetGameMode(registered);

diff ur deng-1.9.0-beta5/doomsday/plugins/jheretic/src/in_lude.c deng-1.9.0-beta5_old/doomsday/plugins/jheretic/src/in_lude.c
--
deng-1.9.0-beta5/doomsday/plugins/jheretic/src/in_lude.c Sun Sep 10 12:09:00 2006
+++ deng-1.9.0-beta5_old/doomsday/plugins/jheretic/src/in_lude.c Mon Jun 4 23:52:26 2007
@ -129,7 +129,7 @

static int cnt;

-static int time;
+static int timeNew;
static int hours;
static int minutes;
static int seconds;
@ -254,12 +254,12 @
}
}

- time = leveltime / 35;
- hours = time / 3600;
- time = hours * 3600;
minutes = time / 60;
- time = minutes * 60;
seconds = time;
+ timeNew = leveltime / 35;
+ hours = timeNew / 3600;
+ timeNew -= hours * 3600;
+ minutes = timeNew / 60;
+ timeNew -= minutes * 60;
+ seconds = timeNew;

#ifdef _DEBUG
Con_Printf("%i %i %i\n", hours, minutes, seconds);
@ -727,7 +727,7 @
sounds++;
}

- if(gamemode != extended || gameepisode < 4)
+ if(gamemode != extendedNew || gameepisode < 4) {
M_WriteText2(85, 160, "TIME", hu_font_b, deffontRGB0, deffontRGB1, deffontRGB2, 1);
IN_DrawTime(155, 160, hours, minutes, seconds, deffontRGB0, deffontRGB1, deffontRGB2, 1);
diff ur deng-1.9.0-beta5/doomsday/plugins/jhexen/include/h2def.h deng-1.9.0-beta5_old/doomsday/plugins/jhexen/include/h2def.h
--
deng-1.9.0-beta5/doomsday/plugins/jhexen/include/h2def.h Wed Jan 3 01:41:49 2007
++ deng-1.9.0-beta5_old/doomsday/plugins/jhexen/include/h2def.h Mon Jun 4 23:58:15 2007
@ -151,7 +151,7 @
typedef enum {
shareware, // 4 level demo
registered, // HEXEN registered
- extended, // DeathKings
extendedNew, // DeathKings
indetermined // Well, no IWAD found.
} GameMode_t;

diff ur deng-1.9.0-beta5/doomsday/plugins/jhexen/src/h2_main.c deng-1.9.0-beta5_old/doomsday/plugins/jhexen/src/h2_main.c
--
deng-1.9.0-beta5/doomsday/plugins/jhexen/src/h2_main.c Tue Jan 9 06:57:18 2007
+++ deng-1.9.0-beta5_old/doomsday/plugins/jhexen/src/h2_main.c Mon Jun 4 23:59:34 2007
@ -202,7 +202,7 @
gamemodebits = GM_REGISTERED;
break;

- case extended: // Deathkings
+ case extendedNew: // Deathkings
gamemodebits = GM_REGISTERED|GM_EXTENDED;
break;

@ -238,7 +238,7 @ {
// It must be Deathkings!
strcpy(gameModeString, "hexen-dk");
- D_SetGameMode(extended);
+ D_SetGameMode(extendedNew);
}
}

#8 Updated by yagisan about 15 years ago

Logged In: YES
user_id=1248824
Originator: NO

joystick issue fixed in svn. skyjakes patch applied, and future solaris builds won't even attempt to initialise it. see http://svn.sourceforge.net/deng/?rev=4766&view=rev

Regarding your patch, anything under doomsday/build/CMakeFiles/doomsday.dir/ is autogenerated at build time, and as such can not be included in a patch. A seperate bug that cmake can not find the math functions (cos,atan etc) on solaris should be filed for that, as I would forget it is here.

personally, I find anything touching deng-1.9.0-beta5_old/doomsday/engine/unix/src/sys_dylib.c to be a bit hairy - as that code already concerns me. (why aren't we using libtool again ??)

Why are so many variables renamed to oldnameNew ?

#9 Updated by yagisan over 14 years ago

Logged In: YES
user_id=1248824
Originator: NO

removing from self

Also available in: Atom PDF