Pages: [1]
|
|
|
Author
|
Topic: Compilation warnings (Read 3369 times)
|
Eric Pierce
Guest
|
I get a couple of warnings during compilation. Don't know if these are related to the segfaults I'm getting when I run uqm, but they may need looking into.
The first, which is repeated often during compilation, is a warning about right-shifting by a negative value. Looking into the code, these seem to occur in any function which calls:
SET_GAME_STATE ( XXX, 1 );
Where XXX is various things like STARBASE_BULLETS0, STARBASE_VISITED, LIGHT_MINERAL_LOAD, etc. Presumably it is something amiss in the SET_GAME_STATE macro, in $SRCDIR/src/sc2code/globdata.h, or functions calling the macro with inappropriate values.
The other error only occurs when finishing up compilation and linking of all the .o files into the main executable, and is as follows:
obj/release/src/sc2code/libs/file/temp.o: In function `initTempDir': obj/release/src/sc2code/libs/file/temp.o(.text+0x17): the use of `tmpnam' is dangerous, better use `mkstemp'
Just for kicks, I tried changing the line in question as the compiler recommends, and instead of getting a segfault when I run uqm, I get some errors about "Cannot create tempfile - file does not exist."
Hope this helps!
|
|
|
Logged
|
|
|
|
|
Eric Pierce
Guest
|
I kind of figured that... guess I'll have to look elsewhere for the cause of the segfaults.
I'll try using gdb to see if that helps locate the cause. I might even be able to fix it myself
|
|
|
Logged
|
|
|
|
Eric Pierce
Guest
|
Ah!
Apparently the segfaults are related to not having permissions in the installation directory (I'm on Linux). Tried running the executable from the source directory (where I *do* have write permission) and it worked great!
Most of the sound works fine, except it does not play any of the .ogg files. Maybe I forgot some of the required libs...
Anyhow, kudos to everyone that is working on this! This was definitely one of my favorite games from the DOS days, and it's awesome to play it again.
|
|
|
Logged
|
|
|
|
|
Pages: [1]
|
|
|
|
|