The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
February 17, 2020, 08:18:51 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Trying to build uqm under qnx ;D
« previous next »
Pages: [1] 2 Print
Author Topic: Trying to build uqm under qnx ;D  (Read 6386 times)
Ilyak
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


I love YaBB 1G - SP1!


View Profile
Trying to build uqm under qnx ;D
« on: June 08, 2003, 04:45:17 am »

I'm curreently planning to build uqm under qnx 6.2.1...

what problems would i face?

currently, stuck with libogg/libvorbis/libvorbisfile...

but, going to resolve them...
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Trying to build uqm under qnx ;D
« Reply #1 on: June 08, 2003, 05:50:24 am »

I've got no experience with QNX, but if it's pretty much POSIX-compliant, the I'd expect few problems. SDL lists QNX as one of the supported platforms (though I doubt it's as well maintained as some of the others); if that works ok, I suspect so will UQM.
Please let me know how it works out.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Ilyak
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


I love YaBB 1G - SP1!


View Profile
Re: Trying to build uqm under qnx ;D
« Reply #2 on: June 08, 2003, 11:42:57 pm »

Yay! I'm really cool.
After 2 hours of lib(SDL*,ogg,vorbis*) fucking, after 3 hours of
unresolved symbols, brain dead build scripts, absent -l and -D, less'ing and grep'ing code, after 50'th attempt of "./build.sh uqm", i have finally got the binary! And it worked FLAWLESS!

i have tried some melee only...
but i will try to test it so in 0.3 alpha there will be full QNX support, i hope...

now, developers, are u here? there will be some minor kicks in the butt for u...

1) build scripts are... they simply does not work

i had to put -lvorbisfile -DSDL_<someshit> and so to build.vars manually. i had to change some @shit@ to #define shit in config.h using my hands.
i will post what problems did i found...

also, they forget to rebuild objects after build.vars changed, which is bad thing, i suggest...

2) i might be wrong
"Damn it, Jim! I'm a doctor, not a programmer!" (c) linux kernel panic.
but somewhere in code there is:
==
static shit wait, signal;
==
which is redefinition; fixed after s/static/extern/
am i wrong or?
Logged
Ilyak
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


I love YaBB 1G - SP1!


View Profile
Re: Trying to build uqm under qnx ;D
« Reply #3 on: June 09, 2003, 02:47:59 am »

oh, i was wrong ;( it's not so stable: got core dump ;(
_GetMusicData(): loading ipanims/orbit5.mod
   decoder: MikMod, rate 44100 format 170202
       'urquan.con' -- 155 bytes
       'lbm/player.fon' -- 1 bytes
       'comm/urquan/urquan.ani' -- 1207 bytes
       'comm/urquan/urquan.fon' -- 1 bytes
       'comm/urquan/urquan.txt' -- 14565 bytes
Found timestamp file: comm/urquan/urquan.ts
       'comm/urquan/urquan.mod' -- 75885 bytes
_GetMusicData(): loading comm/urquan/urquan.mod
   decoder: MikMod, rate 44100 format 170202
SpliceTrack(): loading comm/urquan/urqua027.ogg
       'comandr.con' -- 223 bytes
       'lbm/player.fon' -- 1 bytes
       'comm/comandr/comandr.ani' -- 2731 bytes
       'comm/comandr/comandr.fon' -- 1 bytes
       'comm/comandr/comandr.ct' -- 292 bytes
       'comm/comandr/comandr.mod' -- 67076 bytes
_GetMusicData(): loading comm/comandr/comandr.mod
   decoder: MikMod, rate 44100 format 170202
       'comm/comandr/comandr.txt' -- 15788 bytes
Found timestamp file: comm/comandr/comandr.ts
SpliceTrack(): loading comm/comandr/coman003.ogg
Memory fault (core dumped)

When arriving at starbase... but my gdb and ddd are with me... I'll find clue.
Also, one time i had problems with sound...
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Trying to build uqm under qnx ;D
« Reply #4 on: June 09, 2003, 04:50:25 am »

Quote

1) build scripts are... they simply does not work

i had to put -lvorbisfile -DSDL_<someshit> and so to build.vars manually. i had to change some @shit@ to #define shit in config.h using my hands.
i will post what problems did i found...

also, they forget to rebuild objects after build.vars changed, which is bad thing, i suggest...

The build scripts will be made more intelligent somewhere in the future.
But I'd like to know exactly what you had to change to make this work on QNX.

Quote

static shit wait, signal;

This stuff is already gone in the cvs version. I suggest you use that one for your own compiles. It might also solve the crash you had. 0.2 had some stability problems.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Ilyak
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


I love YaBB 1G - SP1!


View Profile
Re: Trying to build uqm under qnx ;D
« Reply #5 on: June 09, 2003, 10:05:38 am »

I might be very stupid, but how can i get everything but 'content'
(or but *.ogg) form cvs? Almost no experience with it...
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Trying to build uqm under qnx ;D
« Reply #6 on: June 09, 2003, 06:33:28 pm »

The standard cvs client can't do it, it seems.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Trying to build uqm under qnx ;D
« Reply #7 on: June 09, 2003, 07:23:38 pm »

Using command line CVS, you can download one directory at a time either with or without subdirectories. Thus, to get UQM without the content files, use:

Code:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sc2 login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sc2 co -l sc2
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sc2 co sc2/build
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sc2 co sc2/doc
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sc2 co sc2/src

Updating this partial checkout is left as an exercise for the student. Grin
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Nic.
Guest


Email
Re: Trying to build uqm under qnx ;D
« Reply #8 on: June 09, 2003, 07:30:37 pm »

It might make a certain amount sense to move the content into a seperate repository, and people can checkout/update the two halves seperately (and for those who like it the way it works now, you can checkout the content volume inside the source volume, and updates will look like they're working identically to the way they work now)

But if the new resource system is almost here, the bulk of the content files are going to get attic'ed anyways, which should drastically reduce update times (and possibly checkout times) since there will be thousands of fewer files to check, so this may all be very moot quite soon.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Trying to build uqm under qnx ;D
« Reply #9 on: June 09, 2003, 08:57:00 pm »

Quote
It might make a certain amount sense to move the content into a seperate repository, and people can checkout/update the two halves seperately (and for those who like it the way it works now, you can checkout the content volume inside the source volume, and updates will look like they're working identically to the way they work now)

But if the new resource system is almost here, the bulk of the content files are going to get attic'ed anyways, which should drastically reduce update times (and possibly checkout times) since there will be thousands of fewer files to check, so this may all be very moot quite soon.

The thoughts have crossed our minds.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Ilyak
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


I love YaBB 1G - SP1!


View Profile
Re: Trying to build uqm under qnx ;D
« Reply #10 on: June 09, 2003, 11:18:44 pm »

thx, got it...
so, there it goes:
let's continue our... er...
first, let's change:
config_progname:
==
case "$OSNAME" in
     FreeBSD|OpenBSD)
           LIB_vorbisfile_CFLAGS="-I/usr/local/include"
           LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis"
           ;;
     *)
           LIB_vorbisfile_CFLAGS=""
           LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis"
           ;;
esac
==
or:
==
/x86/usr/lib/libvorbis.so: undefined reference to `sqrt'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_stream_pagein'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_writealign'
/x86/usr/lib/libvorbis.so: undefined reference to `_Sin'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_sync_wrote'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_sync_reset'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_page_granulepos'
/x86/usr/lib/libvorbis.so: undefined reference to `ceil'
/x86/usr/lib/libvorbis.so: undefined reference to `floor'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_sync_pageseek'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_page_continued'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_stream_reset_serialno'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_writeinit'
/x86/usr/lib/libvorbis.so: undefined reference to `ldexp'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_stream_clear'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_look'
/x86/usr/lib/libvorbis.so: undefined reference to `rint'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_stream_packetout'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_page_eos'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_sync_init'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_bytes'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_writeclear'
/x86/usr/lib/libvorbis.so: undefined reference to `pow'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_adv'
/x86/usr/lib/libvorbis.so: undefined reference to `_Log'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_stream_packetpeek'
/x86/usr/lib/libvorbis.so: undefined reference to `exp'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_stream_init'
/x86/usr/lib/libvorbis.so: undefined reference to `atan'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_get_buffer'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_sync_clear'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_readinit'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_page_serialno'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_read'
/x86/usr/lib/libvorbis.so: undefined reference to `ogg_sync_buffer'
/x86/usr/lib/libvorbis.so: undefined reference to `acos'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_reset'
/x86/usr/lib/libvorbis.so: undefined reference to `frexp'
/x86/usr/lib/libvorbis.so: undefined reference to `oggpack_write'
collect2: ld returned 1 exit status
==
so:
+
     QNX)
           LIB_vorbisfile_CFLAGS="-I/usr/local/include"
           LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis -logg -lm"
           ;;
+
or maybe, something else?

we get:
build.vars:
==
COMPILE=gcc
MKDEPEND="gcc -MM"
MAKE="make"
uqm_CFLAGS=" -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wall -DDEBUG_TRACK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include"
uqm_LDFLAGS=" -L/opt/lib -lSDL -L/opt/lib -lSDL -lSDL_image -O0 -L/usr/local/lib -lvorbisfile -lvorbis -logg -lm"
DEBUG="1"
uqm_INSTALL_BINDIR="/usr/local/games/bin/"
uqm_INSTALL_LIBDIR="/usr/local/games/lib/"

# Exported variables are available from all the Makeinfo files
# Non-exported files only where build.vars is explicitely included.
uqm_SOUNDMODULE="mixsdl"
uqm_HAVE_OPENGL="0"
WINDRES=""
export uqm_SOUNDMODULE uqm_HAVE_OPENGL WINDRES
==
became A LOT better compared to 0.2 (when it "forgot" to put in -L/usr/local/lib -lvorbisfile -lvorbis -logg -lm and -DGFXMODULE_SDL -DSOUNDMODULE_SDL

so, we do config?
==
localhost% ./build.sh uqm config
Sed stream editor found.
tr found.
Make found.
GNU C compiler found.
Little-endian machine.
Simple DirectMedia Layer version 1.2.5 found.
SDL_image found.
Vorbisfile found.
Symbol 'strupr' found.
Symbol 'stricmp' found.
Header 'getopt.h' not found.
/usr/bin/ntox86-ld: cannot find -lGL
collect2: ld returned 1 exit status
OpenGL not found.

 -= Main menu =-
 1. Include debugging information        Debugging information
 2. OpenGL graphics support              Don't include OpenGL graphics support
 3. Sound backend                        Use MixSDL for sound
 4. Installation paths                   [...]

Press a number plus <ENTER> if you want to change something,
or just <ENTER> if everything is ok: 1

 -= Include debugging information =-

invalid format string

invalid format string

invalid format string

Select the option you want by typing a number plus <ENTER>
or just <ENTER> if everything is ok:


 -= Main menu =-
 1. Include debugging information        Debugging information
 2. OpenGL graphics support              Don't include OpenGL graphics support
 3. Sound backend                        Use MixSDL for sound
 4. Installation paths                   [...]

Press a number plus <ENTER> if you want to change something,
or just <ENTER> if everything is ok:

Saving choices...
Configuration complete.
==
emm? What strings and what format?

ok; trying to compile?
==
gcc -o obj/debug/./src/options.o -c  -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wall -DDEBUG_TRACK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include -I src -I src/sc2code -I src/sc2code/libs src/options.c
In file included from src/sc2code/starcon.h:44,
                from src/sc2code/libs/graphics/gfx_common.h:25,
                from src/options.c:25:
src/config.h:35: parse error before `@'
make: *** [obj/debug/./src/options.o] Error 1
==
why?
config.h:
==
/* Defined if your system has strupr of its own */
@HAVE_STRUPR@

/* Defined if your system has stricmp of its own */
@HAVE_STRICMP@

/* Defined if your system has getopt.h */
@HAVE_GETOPT_H@

#endif  /* _CONFIG_H */
==
even after ./build.sh uqm config...
ok, changed:


compiling:
==
gcc -o obj/debug/./src/sc2code/velocity.o -c  -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wall -DDEBUG_T
RACK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include -I src -I src/sc2code -I src/sc2code/libs src
/sc2code/velocity.c
gcc -o obj/debug/./src/sc2code/weapon.o -c  -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wall -DDEBUG_TRA
CK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include -I src -I src/sc2code -I src/sc2code/libs src/s
c2code/weapon.c
mkdir: obj/debug/./src/sc2code/comm/arilou/: File exists
make: *** [obj/debug/./src/sc2code/comm/arilou/arilouc.o] Error 1
==
it always says mkdir: obj/debug/./src/sc2code/foo/bar: File exists
and dies when changes dir to existing. should not it check if exist?

ok,
==
==
gcc -o obj/debug/./src/sc2code/comm/yehat/yehatc.o -c  -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wall
-DDEBUG_TRACK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include -I src -I src/sc2code -I src/sc2code
/libs src/sc2code/comm/yehat/yehatc.c
src/sc2code/comm/yehat/yehatc.c:113: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:113: warning: (near initialization for `yehat_desc.AlienAmbientArray[8].Block
Mask')
src/sc2code/comm/yehat/yehatc.c:120: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:120: warning: (near initialization for `yehat_desc.AlienAmbientArray[9].Block
Mask')
src/sc2code/comm/yehat/yehatc.c:127: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:127: warning: (near initialization for `yehat_desc.AlienAmbientArray[10].Bloc
kMask')
src/sc2code/comm/yehat/yehatc.c:134: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:134: warning: (near initialization for `yehat_desc.AlienAmbientArray[11].Bloc
kMask')
src/sc2code/comm/yehat/yehatc.c:141: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:141: warning: (near initialization for `yehat_desc.AlienAmbientArray[12].Bloc
kMask')
src/sc2code/comm/yehat/yehatc.c:148: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:148: warning: (near initialization for `yehat_desc.AlienAmbientArray[13].Bloc
kMask')
src/sc2code/comm/yehat/yehatc.c:165: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:165: warning: (near initialization for `yehat_desc.AlienTransitionDesc.BlockM
ask')
src/sc2code/comm/yehat/yehatc.c:172: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:172: warning: (near initialization for `yehat_desc.AlienTalkDesc.BlockMask')
src/sc2code/comm/yehat/yehatc.c:174: warning: missing initializer
src/sc2code/comm/yehat/yehatc.c:174: warning: (near initialization for `yehat_desc.AlienTextTemplate')
gcc -o obj/debug/./src/sc2code/comm/zoqfot/zoqfotc.o -c  -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wal
l -DDEBUG_TRACK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include -I src -I src/sc2code -I src/sc2co
de/libs src/sc2code/comm/zoqfot/zoqfotc.c
src/sc2code/comm/zoqfot/zoqfotc.c:62: warning: missing initializer
src/sc2code/comm/zoqfot/zoqfotc.c:62: warning: (near initialization for `zoqfot_desc.AlienAmbientArray[0].Blo
ckMask')
src/sc2code/comm/zoqfot/zoqfotc.c:69: warning: missing initializer
src/sc2code/comm/zoqfot/zoqfotc.c:69: warning: (near initialization for `zoqfot_desc.AlienAmbientArray[1].Blo
ckMask')
src/sc2code/comm/zoqfot/zoqfotc.c:76: warning: missing initializer
src/sc2code/comm/zoqfot/zoqfotc.c:76: warning: (near initialization for `zoqfot_desc.AlienAmbientArray[2].Blo
ckMask')
src/sc2code/comm/zoqfot/zoqfotc.c:84: warning: missing initializer
src/sc2code/comm/zoqfot/zoqfotc.c:84: warning: (near initialization for `zoqfot_desc.AlienTransitionDesc.Bloc
kMask')
src/sc2code/comm/zoqfot/zoqfotc.c:91: warning: missing initializer
src/sc2code/comm/zoqfot/zoqfotc.c:91: warning: (near initialization for `zoqfot_desc.AlienTalkDesc.BlockMask'
)
src/sc2code/comm/zoqfot/zoqfotc.c:93: warning: missing initializer
src/sc2code/comm/zoqfot/zoqfotc.c:93: warning: (near initialization for `zoqfot_desc.AlienTextTemplate')
src/sc2code/comm/zoqfot/zoqfotc.c:124: warning: `SelectAlienFOT' defined but not used
mkdir: obj/debug/./src/sc2code/libs/decomp/: File exists
make: *** [obj/debug/./src/sc2code/libs/decomp/lzdecode.o] Error 1
==
warnings? What warnings?
there was no warnings in 0.2. so?

ok,
==
gcc -o obj/debug/./src/sc2code/planets/solarsys.o -c  -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wall -
DDEBUG_TRACK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include -I src -I src/sc2code -I src/sc2code/
libs src/sc2code/planets/solarsys.c
src/sc2code/planets/solarsys.c: In function `ExploreSolarSys':
src/sc2code/planets/solarsys.c:1896: warning: empty body in an if-statement
gcc -o obj/debug/./src/sc2code/planets/surface.o -c  -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wall -D
DEBUG_TRACK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include -I src -I src/sc2code -I src/sc2code/l
ibs src/sc2code/planets/surface.c
mkdir: obj/debug/./src/sc2code/ships/androsyn/: File exists
make: *** [obj/debug/./src/sc2code/ships/androsyn/androsyn.o] Error 1
==
same shit.

ok, we built uqm[-debug] binary! gratz to us! ;p

ok, we can even run it and play some melee...
==
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
==
what the hell is that? Was no in 0.2. doesn do anything bad, but spams a lot.

but, if you try to play game and enter starbase...
==
SoundDecoder_Decode(): looping ipanims/space.mod
Warning: Couldn't find thread to signal!
Freeing Clock Semaphore in 'Starcon2Main' set by thread 'flash solar system menu'!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
       'urquan.con' -- 155 bytes
       'lbm/player.fon' -- 1 bytes
       'comm/urquan/urquan.ani' -- 1207 bytes
       'comm/urquan/urquan.fon' -- 1 bytes
       'comm/urquan/urquan.txt' -- 14565 bytes
Found timestamp file: comm/urquan/urquan.ts
       'comm/urquan/urquan.mod' -- 75885 bytes
_GetMusicData(): loading comm/urquan/urquan.mod
   decoder: MikMod, rate 44100 format 170202
SpliceTrack(): loading comm/urquan/urqua027.ogg
Warning: Couldn't find thread to signal!
Warning: Couldn't find thread to signal!
       'comandr.con' -- 223 bytes
       'lbm/player.fon' -- 1 bytes
       'comm/comandr/comandr.ani' -- 2731 bytes
       'comm/comandr/comandr.fon' -- 1 bytes
       'comm/comandr/comandr.ct' -- 292 bytes
       'comm/comandr/comandr.mod' -- 67076 bytes
_GetMusicData(): loading comm/comandr/comandr.mod
   decoder: MikMod, rate 44100 format 170202
       'comm/comandr/comandr.txt' -- 15788 bytes
Found timestamp file: comm/comandr/comandr.ts
SpliceTrack(): loading comm/comandr/coman003.ogg
zsh: segmentation fault (core dumped)  ./uqm-debug
==
SIGSEGV. why?

==
(gdb)
582                     ClearSemaphore (_MemorySem);
(gdb)

Program received signal SIGTRAP, Trace/breakpoint trap.
ClearSemaphore (sem=0x8401650) at src/sc2code/libs/threads/thrcommon.c:548
548             char *sem_name = NULL;
(gdb)
550             for (i = 0; i < numSems; i++)
(gdb)
551                     if (SemMon.Sem == sem)
(gdb)
550             for (i = 0; i < numSems; i++)
(gdb)
551                     if (SemMon.Sem == sem)
(gdb)
553                             sem_name = SemMon.Name;
(gdb)
554                             if (SemMon.Thread && SemMon.Thread != NativeThreadID ())
(gdb)
568                             SemMon.ThreadName[0] = 0;
(gdb)
573                             SemMon.Thread = 0;
(gdb)
574                             break;
(gdb)
576             if (semval != 0)
(gdb)
579             NativeClearSemaphore ((NativeSemaphore) sem);
(gdb)
580     }
(gdb)
mem_simple_unaccess (h=3356) at src/sc2code/libs/memory/w_memlib.c:583
583                     return (1);
(gdb)
0x080c7cbc      588     }
(gdb)
GetStringAddress (String=3738908) at src/sc2code/libs/strings/strings.c:241
241             return (StringAddr);
(gdb)
0x080ed030      242     }
(gdb)
construct_response (buf=0x8337ec0 "No, this is the starship ", R=58) at src/sc2code/commglue.c:265
265                     len = wstrlen (buf);
(gdb)
269                     buf += len;
(gdb)
274                     name = va_arg (vlist, UNICODE *);
(gdb)
279                     if (name)
(gdb)
294                             len = wstrlen (name);
(gdb)

Program received signal SIGSEGV, Segmentation fault.
==
Breakpoint 1, construct_response (buf=0x8337ec0 "", R=58) at src/sc2code/commglue.c:242
242             va_start (vlist, R);
(gdb) next
253                     S = SetAbsStringTableIndex (CommData.ConversationPhrases, R - 1);
(gdb) print R
$1 = 58
(gdb) print name
$2 = (UNICODE *) 0x807e464 "U\211+?\203+?\030+?+-y+¬\203+?oj"
(gdb) next
260                     wstrcpy (buf, (UNICODE *)GetStringAddress (S));
(gdb) next
265                     len = wstrlen (buf);
(gdb) next
269                     buf += len;
(gdb) print len
$3 = 25
(gdb) print buf
$4 = (UNICODE *) 0x8337ec0 "No, this is the starship "
(gdb) next
274                     name = va_arg (vlist, UNICODE *);
(gdb) next
279                     if (name)
(gdb) print name
$5 = (UNICODE *) 0x775007f8 <Address 0x775007f8 out of bounds>
==
looks like construct_response gets shit instead of *"Vindicator" as its n-th param. clues? going do gdb it.

Ttthatts all folks!

Err... Should not we go to... err... some *place* with our developer talks?
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Trying to build uqm under qnx ;D
« Reply #11 on: June 10, 2003, 03:22:09 am »

Quote

     QNX)
           LIB_vorbisfile_CFLAGS="-I/usr/local/include"
           LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis -logg -lm"
           ;;
+
or maybe, something else?

Hmm... on other platforms you don't have to specify the libraries that are indirectly used. Strange really. What does 'ldd /x11/usr/lib/libvorbis.so' say?

Quote

/usr/bin/ntox86-ld: cannot find -lGL
collect2: ld returned 1 exit status
OpenGL not found.

This is not serious. It's testing for what's available. The game will work without OpenGL. But I wonder why it's printing the ld error message. That should have been redirected to /dev/null.

Quote

invalid format string

Hmm... this is a serious problem. It looks like this message comes from sed. That would explain the '@BLA@' stuff in your config.h. I think it doesn't accept '@' in the format string. I'd need some more information on what sed your system has.

Quote

gcc -o obj/debug/./src/sc2code/weapon.o -c  -I/opt/include/SDL -I/opt/include/SDL -g -O0 -W -Wall -DDEBUG_TRA
CK_SEM -DGFXMODULE_SDL -DSOUNDMODULE_SDL -I/usr/local/include -I src -I src/sc2code -I src/sc2code/libs src/s
c2code/weapon.c
mkdir: obj/debug/./src/sc2code/comm/arilou/: File exists
make: *** [obj/debug/./src/sc2code/comm/arilou/arilouc.o] Error 1
==
it always says mkdir: obj/debug/./src/sc2code/foo/bar: File exists
and dies when changes dir to existing. should not it check if exist?

Well, it *is* checking whether the dir exists (see Makefile.build). Maybe your 'mkdir' handles '-p' strangely? Or maybe your 'test' has problems? Could you investigate?

Quote

warnings? What warnings?
there was no warnings in 0.2. so?

No, there were a LOT of warnings in 0.2. Only they weren't shown by default. In the cvs build, gcc compiles with '-W -Wall' if you make a debugging compile. You can even choose more strict checking in the config menu. Anyhow, this is just a fraction of the warnings that 0.2 generated. We'll get to 0 warnings yet.

Quote

ok, we built uqm[-debug] binary! gratz to us! ;p

This went rather smoothly compared to the first MacOS compiles, really.

Quote

Warning: Couldn't find thread to signal!
==
what the hell is that? Was no in 0.2. doesn do anything bad, but spams a lot.

This is actually new code. I'm not so sure if this warning is serious. McMartin will know.

Quote

but, if you try to play game and enter starbase...
==
zsh: segmentation fault (core dumped)  ./uqm-debug
==
SIGSEGV. why?

Because of a bug, I guess.
Unfortunately, the gdb info you sent doesn't help much.

Quote

going do gdb it.

Ah, cool. It's hard to do anything about from just the info you showed (though a stack trace wouldn't hurt).

Quote

Err... Should not we go to... err... some *place* with our developer talks?

#sc2 on irc.freenode.net is where the developers hang out. We've also got a bugzilla bug database (http://uqm.stack.nl/cgi-bin/bugs/index.cgi) set up. And there's also a mailing list at 'sc2-devel at lists.sourceforge.net', but it's rarely used (though we'll read it if you send mail there).
As for the building problems, you might as well send them directly to me (svdb at stack.nl). I'm the one who made the unix build scripts.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Ilyak
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


I love YaBB 1G - SP1!


View Profile
Re: Trying to build uqm under qnx ;D
« Reply #12 on: June 10, 2003, 09:35:03 pm »

Hmm... on other platforms you don't have to specify the libraries that
are indirectly used. Strange really. What does 'ldd
/x11/usr/lib/libvorbis.so' say?
==
That's a good question with a very interesting answer!

localhost% ldd /x86/usr/lib/libvorbis.so
zsh: command not found: ldd

i'll try to obtain it (unsure:where) and will try again...

==
Hmm... this is a serious problem. It looks like this message comes from
sed.
==
i guess, it comes from printf:
                       if menu_have_choice "$MENU" "$OPTION"; then
                               printf "  %*i. %s %s\n" "${#NUM_OPTIONS}" "$I" \
                                               "$SELECTED" "$TEMP_TITLE"
                       else
                               printf "  %-*s  %s (N/A) %s\n" "${#NUM_OPTIONS}"
"-" \
                                               "$SELECTED" "$TEMP_TITLE"
                       fi
and i can understand him: i failed to understand, what this format should do, even after 10 minutes of meditating on it...

==
That would explain the '@BLA@' stuff in your config.h. I think it
doesn't accept '@' in the format string. I'd need some more information
on what sed your system has.
==

ok, messing with scripts:
should not string
           VALUE=$(echo "$VALUE" | sed 's,\([\&/]\),\\\1,g')
have s/sed/$SED/? ;p

ok, now:
config.h.*.sed:)
s/@WORDS_BIGENDIAN@/#undef WORDS_BIGENDIAN/g
s/@HAVE_strupr@/#define HAVE_strupr/g
s/@HAVE_stricmp@/#define HAVE_stricmp/g
s/@HAVE_getopt_h@/#undef HAVE_getopt_h/g
s/@CONTENTDIR@/\/usr\/local\/games\/lib\/uqm\/content/g
funny?

so, we may consider, that _tr_ is not always brain alive and do s/tr a-z A-Z/tr '[a-z]' '[A-Z]'/

and my system do have GNU sed, as i c.

==
Well, it *is* checking whether the dir exists (see Makefile.build).
Maybe your 'mkdir' handles '-p' strangely? Or maybe your 'test' has
problems? Could you investigate?
==
i failed to reproduce it form commandline
it really never screams when with -p and really Makefiles do contain -p and really it still screams when building... ;(
4 times - for each uqm_SRCDIR's in src/sc2code/Makeinfo

sadly, i cant gdb sh-scripts and make files... ;(

==
This went rather smoothly compared to the first MacOS compiles, really.
==
i guess. but do someone really still uses it? Non-X MacOS?

i will think about bug - later...
Logged
Ilyak
Zebranky food
*
Offline Offline

Gender: Male
Posts: 9


I love YaBB 1G - SP1!


View Profile
Re: Trying to build uqm under qnx ;D
« Reply #13 on: June 11, 2003, 12:07:41 am »

251                     fprintf(stderr, "DEBUG: len = %d\n",len);
253                     S = SetAbsStringTableIndex (CommData.ConversationPhrases, R - 1);
255                     fprintf(stderr, "DEBUG: Returned from call to SetAbsStringTableIndex\n");
256                     fprintf(stderr, "DEBUG: GetStringAddress(S) = %s\n",(UNICODE *)GetStringAddress(S));
257                     fprintf(stderr, "DEBUG: buf = '%s' (%d) \n", buf, *buf);
258                     fprintf(stderr, "DEBUG: strlen(buf) = %d\n", strlen(buf));
260                     wstrcpy (buf, (UNICODE *)GetStringAddress (S));
262                     fprintf(stderr, "DEBUG: buf = '%s' (%d) \n", buf, *buf);
263                     fprintf(stderr, "DEBUG: strlen(buf) = %d\n", strlen(buf));
265                     len = wstrlen (buf);
267                     fprintf(stderr, "DEBUG: len = %d\n",len);
269                     buf += len;
271                     fprintf(stderr, "DEBUG: buf = '%s' (%d) \n", buf, *buf);
272                     fprintf(stderr, "DEBUG: strlen(buf) = %d\n", strlen(buf));
274                     name = va_arg (vlist, UNICODE *);
276                     fprintf(stderr, "DEBUG: returned from va_arg call\n");
277                     fprintf(stderr, "DEBUG: name = %s\n",name);

Program received signal SIGSEGV, Segmentation fault.
0xb03396c2 in ?? ()
(gdb) print name
No symbol "name" in current context.
(gdb) stack
Undefined command: "stack".  Try "help".
(gdb) bt
#0  0xb03396c2 in ?? ()
#1  0xb033919a in ?? ()
#2  0xb03352fe in ?? ()
#3  0x08053df8 in construct_response (buf=0x83384f9 "", R=58)
   at src/sc2code/commglue.c:277
#4  0x08087ad0 in Intro () at src/sc2code/comm/comandr/comandr.c:633
#5  0x08052906 in HailAlien () at src/sc2code/comm.c:2044
#6  0x08052d26 in InitCommunication (which_comm=350231303)
   at src/sc2code/comm.c:2162
#7  0x0807cd78 in VisitStarBase () at src/sc2code/starbase.c:441
#8  0x0807e94d in Starcon2Main (blah=0x8337510) at src/sc2code/starcon.c:926
#9  0x080edcf3 in ThreadHelper (startInfo=0x8401e64)
   at src/sc2code/libs/threads/thrcommon.c:196
#10 0xb823088f in ?? ()
#11 0xb8230a7e in ?? ()

that looks like some Arilou abduction ;(
cause:
                       construct_response (
                                       shared_phrase_buf,
                                       no_but_well_help0,
                                       GLOBAL_SIS (ShipName),
                                       no_but_well_help1,
                                       0
                                       );
yes, GLOBAL_SIS (ShipName)==GlobData.SIS_state.ShipName IS "Vindicator\0\0\0\0\0"...
why may va_arg fail?

==
Intro () at src/sc2code/comm/comandr/comandr.c:626
626                     SET_GAME_STATE (STARBASE_VISITED, 1);
628                     NPCPhrase (ARE_YOU_SUPPLY_SHIP);
629                     if (GLOBAL_SIS (ElementAmounts[RADIOACTIVE]))
633                             construct_response (
(gdb) print GlobData.SIS_state.ShipName
$1 = "Vindicator\0\0\0\0\0"
(gdb) print &GlobData.SIS_state.ShipName
$3 = (UNICODE (*)[16]) 0x833880a
(gdb) step
construct_response (buf=0x83384e0 "", R=58) at src/sc2code/commglue.c:240
240             fprintf(stderr, "DEBUG: We've entered into construct_response!\n");
242             va_start (vlist, R);
244             fprintf(stderr, "DEBUG: R = %d\n", R);
251                     fprintf(stderr, "DEBUG: len = %d\n",len);
253                     S = SetAbsStringTableIndex (CommData.ConversationPhrases, R - 1);
255                     fprintf(stderr, "DEBUG: Returned from call to SetAbsStringTableIndex\n");
256                     fprintf(stderr, "DEBUG: GetStringAddress(S) = %s\n",(UNICODE *)GetStringAddress(S));
257                     fprintf(stderr, "DEBUG: buf = '%s' (%d) \n", buf, *buf);
258                     fprintf(stderr, "DEBUG: strlen(buf) = %d\n", strlen(buf));
260                     wstrcpy (buf, (UNICODE *)GetStringAddress (S));
262                     fprintf(stderr, "DEBUG: buf = '%s' (%d) \n", buf, *buf);
263                     fprintf(stderr, "DEBUG: strlen(buf) = %d\n", strlen(buf));
265                     len = wstrlen (buf);
267                     fprintf(stderr, "DEBUG: len = %d\n",len);
269                     buf += len;
271                     fprintf(stderr, "DEBUG: buf = '%s' (%d) \n", buf, *buf);
272                     fprintf(stderr, "DEBUG: strlen(buf) = %d\n", strlen(buf));
274                     name = va_arg (vlist, UNICODE *);
276                     fprintf(stderr, "DEBUG: returned from va_arg call\n");
(gdb) print name
$4 = (UNICODE *) 0x7ad007f8 <Address 0x7ad007f8 out of bounds>
(gdb) print &name
$5 = (UNICODE **) 0x7f84ae4
==


==
(gdb) bt
#0  construct_response (buf=0x8338531 "", R=2056) at src/sc2code/commglue.c:276
#1  0x08087ad0 in Intro () at src/sc2code/comm/comandr/comandr.c:633
#2  0x08052906 in HailAlien () at src/sc2code/comm.c:2044
#3  0x08052d26 in InitCommunication (which_comm=350231303) at src/sc2code/comm.c:2162
#4  0x0807cd78 in VisitStarBase () at src/sc2code/starbase.c:441
#5  0x0807e94d in Starcon2Main (blah=0x8337510) at src/sc2code/starcon.c:926
#6  0x080edcf3 in ThreadHelper (startInfo=0x8401e64) at src/sc2code/libs/threads/thrcommon.c:196
#7  0xb823088f in ?? ()
#8  0xb8230a7e in ?? ()
==


i may even 'set variable name' in gdb:
==
DEBUG: buf = 'No, this is the starship ' (78)
DEBUG: strlen(buf) = 25
DEBUG: len = 25
DEBUG: buf = '' (0)
DEBUG: strlen(buf) = 0
DEBUG: returned from va_arg call
DEBUG: name = Vindicator
DEBUG: ------------------------------------
DEBUG: We are in the special va_args loop!
DEBUG: Current critical variables read:
DEBUG: ------------------------------------
DEBUG: name = Vindicator
DEBUG: buf = '' (0)
DEBUG: len = 25
DEBUG: strlen(name) = 10
DEBUG: strlen(buf) = 0
DEBUG: ---- continuing ----
DEBUG: len = 10
DEBUG: buf = 'Vindicator' (86)
DEBUG: strlen(buf) = 10
DEBUG: buf = '' (0)
DEBUG: Calling va_arg
DEBUG: Return from call to va_arg
DEBUG: R = 2056
DEBUG: name = Vindicator
DEBUG: len = 10
DEBUG: Returned from call to SetAbsStringTableIndex
DEBUG: GetStringAddress(S) = Uh, I meant a different red thing. Never mind.
DEBUG: buf = '' (0)
DEBUG: strlen(buf) = 0
DEBUG: buf = 'Uh, I meant a different red thing. Never mind.' (85)
DEBUG: strlen(buf) = 46
DEBUG: len = 46
DEBUG: buf = '' (0)
DEBUG: strlen(buf) = 0
DEBUG: returned from va_arg call
DEBUG: name =
[1]  + segmentation fault (core dumped)  ./uqm-debug
==

ok, i can even get fwiffo, fly to mercury and get some radioactives, but:
==
DEBUG: We've entered into construct_response!
DEBUG: R = 64
DEBUG: len = 0
DEBUG: Returned from call to SetAbsStringTableIndex
DEBUG: GetStringAddress(S) = I am Captain
DEBUG: buf = '' (0)
DEBUG: strlen(buf) = 0
DEBUG: buf = 'I am Captain ' (73)
DEBUG: strlen(buf) = 13
DEBUG: len = 13
DEBUG: buf = '' (0)
DEBUG: strlen(buf) = 0
DEBUG: returned from va_arg call
DEBUG: name =
[1]  + segmentation fault (core dumped)  ./uqm-debug
==
on the second phrase...

ok, what do work wrong in our commglue? or their va_*?
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Trying to build uqm under qnx ;D
« Reply #14 on: June 12, 2003, 06:29:05 pm »

Quote

localhost% ldd /x86/usr/lib/libvorbis.so
zsh: command not found: ldd

i'll try to obtain it (unsure:where) and will try again...

If you don't have it, then QNX probably does things differently. I'd need to know how though.

Quote

i guess, it comes from printf:
                       if menu_have_choice "$MENU" "$OPTION"; then
                               printf "  %*i. %s %s\n" "${#NUM_OPTIONS}" "$I" \
                                               "$SELECTED" "$TEMP_TITLE"
                       else
                               printf "  %-*s  %s (N/A) %s\n" "${#NUM_OPTIONS}"
"-" \
                                               "$SELECTED" "$TEMP_TITLE"
                       fi
and i can understand him: i failed to understand, what this format should do, even after 10 minutes of meditating on it...

It's all in the manual page. printf works like the libc printf() function. The first argument is the format string specifying how to interpret the rest of the options.
But you're right. It does look like this is what generated the 'format errors', not sed. Why it only does that for the debug menu, I don't know.
What would be helpful would be if you set the environment variable 'SH' to 'sh -x', and then rerun the config script. The debug output that it generates then will be very useful to me. It would be very long, so you shouldn't post that here, but instead mail it to me directly.

Quote

ok, messing with scripts:
should not string
           VALUE=$(echo "$VALUE" | sed 's,\([\&/]\),\\\1,g')
have s/sed/$SED/? ;p

You're right. It's corrected in CVS now.

Quote

config.h.*.sed:)
s/@HAVE_strupr@/#define HAVE_strupr/g

so, we may consider, that _tr_ is not always brain alive and do s/tr a-z A-Z/tr '[a-z]' '[A-Z]'/

I see. Appearantly, [a-z] is the System V way, and a-z is the original BSD way, which is now part of the POSIX standard (though BSD and GNU tr also support [a-z]. I suspect [:lower:] is the most portable, so I've changed the line to
tr "[:lower:]" "[:upper:]"

Quote

sadly, i cant gdb sh-scripts and make files... ;(

For sh-scripts, setting SH to "sh -x" in your environment will help.

Quote

This went rather smoothly compared to the first MacOS compiles, really.
==
i guess. but do someone really still uses it? Non-X MacOS?

Well, I was talking about MacOS X.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Pages: [1] 2 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!