The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: pepsei on March 13, 2007, 05:23:03 pm



Title: MinGW compile problem
Post by: pepsei on March 13, 2007, 05:23:03 pm
see output below... am i missing something?  i'm running windows xp

$ ./build.sh uqm config
'echo -n' capable echo found.
Sed stream editor found.
tr found.
Make found.
build/unix/build.sh: libmikmod-config: command not found
build/unix/build.sh: libmikmod-config: command not found
build/unix/build.sh: libmikmod-config: command not found
GNU C compiler found.
We have a C preprocessor.
We have a C dependency generator.
We have a C compiler.
We have a linker.
windres found.
We have a Windows resource linker (windres).
Little-endian machine detected.
Simple DirectMedia Layer version 1.2.11 found.
SDL_image found.
Symbol 'readdir_r' not found.
Symbol 'setenv' not found.
Symbol 'strupr' found.
Symbol 'stricmp' found.
Symbol 'iswgraph' found.
Type 'wchar_t' found.
Type 'wint_t' found.
Symbol 'getopt_long' found.
Header 'regex.h' not found.


Title: Re: MinGW compile problem
Post by: Novus on March 13, 2007, 06:29:08 pm
see output below... am i missing something?  i'm running windows xp
Not really. UQM has a built-in copy of MikMod, so the lack of a system-wide one is not a problem, and the other missing functions and headers don't normally exist under MinGW, so they are not used. If UQM compiles, everything should be OK.


Title: Re: MinGW compile problem
Post by: pepsei on March 13, 2007, 06:33:29 pm
thanks for quick response... i try to compile it now and got the following, which i truncated to just the abnormal output

  CC       obj/release/src/sc2code/sis.c.o
src/sc2code/sis.c: In function `DrawStatusMessage':
src/sc2code/sis.c:384: warning: pointer type mismatch in conditional expression
  CC       obj/release/src/sc2code/libs/input/sdl/input.c.o
src/sc2code/libs/input/sdl/input.c: In function `InterrogateInputState':
src/sc2code/libs/input/sdl/input.c:393: warning: passing arg 1 of `VControl_StartIter' discards qualifiers from pointer target type
src/sc2code/libs/input/sdl/input.c: In function `RemoveInputState':
src/sc2code/libs/input/sdl/input.c:434: warning: passing arg 1 of `VControl_StartIter' discards qualifiers from pointer target type
src/sc2code/libs/input/sdl/input.c:442: warning: passing arg 2 of `VControl_RemoveGestureBinding' discards qualifiers from pointer target type
src/sc2code/libs/input/sdl/input.c: In function `RebindInputState':
src/sc2code/libs/input/sdl/input.c:465: warning: passing arg 2 of `VControl_AddBinding' discards qualifiers from pointer target type
  CC       obj/release/src/sc2code/libs/strings/unicode.c.o
src/sc2code/libs/strings/unicode.c: In function `getCharFromString':
src/sc2code/libs/strings/unicode.c:113: warning: comparison is always true due to limited range of data type
src/sc2code/libs/strings/unicode.c: In function `getStringFromChar':
src/sc2code/libs/strings/unicode.c:411: warning: large integer implicitly truncated to unsigned type
src/sc2code/libs/strings/unicode.c:412: warning: large integer implicitly truncated to unsigned type
src/sc2code/libs/strings/unicode.c:413: warning: large integer implicitly truncated to unsigned type
  CC       obj/release/src/regex/regex.c.o
src/regex/regex.c:32:1: warning: "alloca" redefined
In file included from src/port.h:132,
                 from src/regex/regex.c:25:
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/malloc.h:61:1: warning: this is the location of the previous definition
  LINK     uqm
obj/release/src/sc2code/melee.c.o:melee.c:(.text+0x310a): undefined reference to `DrawMeleeStatusMessage'
collect2: ld returned 1 exit status
make: *** [uqm] Error 1


Title: Re: MinGW compile problem
Post by: Novus on March 13, 2007, 06:51:19 pm
Looking at src/sc2code/melee.c, there may be some mistake as to which parts are to be left out when compiling without netplay. Try compiling with netplay support, or put a #ifdef NETPLAY [...] #endif pair around confirmationCancelled and connectionFeedback. I'll try to reproduce this and file a bug report if necessary.

Edit: Well, it compiles OK on my Linux box. As far as I can tell, it shouldn't. Maybe the linker is leaving out unreferenced functions?


Title: Re: MinGW compile problem
Post by: pepsei on March 13, 2007, 08:18:50 pm
 
ah ok, i ran clean, enabled netplay as follows

 -= Main menu =-
  1. Type of build                        Optimised release build
  2. OpenGL graphics support              Include OpenGL graphics support
  3. Sound backend                        Use MixSDL for sound (internal)
  4. Tracker music support                Included libmikmod
  5. Ogg Vorbis codec                     Xiph libogg + libvorbis
  6. Network Supermelee support           IPv4 and IPv6
  7. Joystick support                     enabled
  8. Supported file i/o methods           Direct & .zip file i/o
  9. Graphics/Sound optimizations         Platform acceleration (asm, etc.)

and compile... ended with

  CC       obj/release/src/getopt/getopt1.c.o
  LINK     uqm
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x289): undefined reference to `regexec'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x313): undefined reference to `regexec'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x429): undefined reference to `regerror'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x44d): undefined reference to `regerror'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x4e4): undefined reference to `regerror'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x50b): undefined reference to `regerror'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x54e): undefined reference to `regfree'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x5cd): undefined reference to `regfree'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x644): undefined reference to `regcomp'
obj/release/src/sc2code/libs/uio/match.c.o:match.c:(.text+0x70f): undefined reference to `regcomp'
collect2: ld returned 1 exit status
make: *** [uqm] Error 1


Title: Re: MinGW compile problem
Post by: meep-eep on March 13, 2007, 08:41:18 pm
The DrawMeleeStatusMessage bug was found shortly before we released 0.6.2. It was fixed in CVS, but only after we switched to SVN (oops). It was fixed in SVN too shortly after, but not before 0.6.2 was released.
There is no problem if you compile with netplay support. If you insist on compiling without netplay support, you should download the more recent source from SVN.

As for the regex problems. Your logs show that regex.c was compiled, so the resulting object file should be included in the build too. I don't know why this doesn't happen for you.
Did you change anything to try to work around that other problem?


Title: Re: MinGW compile problem
Post by: pepsei on March 13, 2007, 08:50:40 pm
ok, i did some minor changes.... so i undid the change.... i guess i should try to compile first without any changes first.

now, it got further.... with the same type of config.... (netplay enabled) i got the following

  CC       obj/release/src/regex/regex.c.o
src/regex/regex.c:32:1: warning: "alloca" redefined
In file included from src/port.h:132,
                 from src/regex/regex.c:25:
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/malloc.h:61:1: warning: this is the location of the previous definition
  LINK     uqm


Title: Re: MinGW compile problem
Post by: meep-eep on March 13, 2007, 09:58:08 pm
That's just a warning. You should have an executable now.


Title: Re: MinGW compile problem
Post by: pepsei on March 14, 2007, 03:52:14 pm
 :D  forgot to check for the .exe file.

now that i got everything in place and ran uqm, i'm getting a

Netplay protocol version 0.3 Requiring remote UQM version 0.5.4.
Fatle error: Could not find content

silly me, forgot to copy content...

so after that... all is well....

it runs perfectly... thanks for the guidence.   :)