Tremulous Forum

Mods => Modding Center => Topic started by: infestor1 on May 03, 2009, 04:35:22 am

Title: Compiling QVM
Post by: infestor1 on May 03, 2009, 04:35:22 am
Ok, I finally figured out all the hints you people have been giving me about making QVMS, but I need 1 last thing.

I edited tremulous.h and g_admin.c and all that crap, but now I want to compile. So, I believe MSYS isn't available for Mac. So, how can I compile my QVM on Mac?

Thanks in advance!

~Andrew
Title: Re: Compiling QVM
Post by: Archangel on May 03, 2009, 04:55:53 am
Code: [Select]
make
Title: Re: Compiling QVM
Post by: infestor1 on May 03, 2009, 06:02:27 am
So "make" compiles it? I thought it did something different.

EDIT: I tried it and I got this result:

Code: [Select]
Last login: Wed Apr 29 18:56:16 on ttyp1
Welcome to Darwin!
steve-pages-emac:~ stevepage$ cd tremulous-svn
steve-pages-emac:~/tremulous-svn stevepage$ make
/bin/sh: line 1: svnversion: command not found
/bin/sh: line 1: svnversion: command not found

Building Tremulous in build/release-darwin-ppc:
  PLATFORM: darwin
  ARCH: ppc
  VERSION: 1.1.0
  COMPILE_PLATFORM: darwin
  COMPILE_ARCH: ppc
  CC: cc

^[  CFLAGS:
    -MMD
    -Wall
    -Wimplicit
    -Wstrict-prototypes
    -faltivec
    -fno-strict-aliasing
    -DMACOS_X
    -fno-common
    -pipe
    -DUSE_OPENAL
    -DUSE_CURL
    -DUSE_CURL_DLOPEN
    -D_THREAD_SAFE=1
    -Isrc/SDL12/include
    -DUSE_MUMBLE
    -DUSE_VOIP
    -DFLOATING_POINT
    -DUSE_ALLOCA
    -Isrc/libspeex/include
    -DUSE_LOCAL_HEADERS
    -DPRODUCT_VERSION="1.1.0"
    -DNDEBUG
    -O3
    -ffast-math
    -falign-loops=16

  LDFLAGS:

  LIBS:

  Output:
    build/release-darwin-ppc/tremded.ppc
    build/release-darwin-ppc/tremulous.ppc
    build/release-darwin-ppc/tremulous-smp.ppc
    build/release-darwin-ppc/base/cgameppc.dylib
    build/release-darwin-ppc/base/gameppc.dylib
    build/release-darwin-ppc/base/uippc.dylib
    build/release-darwin-ppc/base/vm/cgame.qvm
    build/release-darwin-ppc/base/vm/game.qvm
    build/release-darwin-ppc/base/vm/ui.qvm

/bin/sh: line 1: svnversion: command not found
make[2]: `build/release-darwin-ppc/tremded.ppc' is up to date.
LD build/release-darwin-ppc/tremulous.ppc
/usr/bin/ld: Undefined symbols:
_alcCaptureCloseDevice
_alcCaptureOpenDevice
_alcCaptureSamples
_alcCaptureStart
_alcCaptureStop
collect2: ld returned 1 exit status
make[2]: *** [build/release-darwin-ppc/tremulous.ppc] Error 1
make[1]: *** [targets] Error 2
make: *** [release] Error 2
steve-pages-emac:~/tremulous-svn stevepage$
Title: Re: Compiling QVM
Post by: gimhael on May 03, 2009, 08:11:14 am
Your compiler can't find the OpenAL library.
Title: Re: Compiling QVM
Post by: Archangel on May 03, 2009, 08:20:08 am
disable client compilation
Title: Re: Compiling QVM
Post by: infestor1 on May 04, 2009, 12:20:50 am
disable client compilation
How do I do that?

Your compiler can't find the OpenAL library.
How do I make it find it?  ;D
Title: Re: Compiling QVM
Post by: David on May 04, 2009, 12:31:28 am
disable client compilation
How do I do that?
Make a file called "Makefile.local" in that same folder and put in it the folowing:
Code: [Select]
BUILD_CLIENT        =0
BUILD_CLIENT_SMP    =0
BUILD_SERVER        =0
BUILD_GAME_SO       =0
BUILD_GAME_QVM      =1
BUILD_MASTER_SERVER =0

Your compiler can't find the OpenAL library.
How do I make it find it?  ;D
You'd probably have to install it.  No idea how on a mac.
Title: Re: Compiling QVM
Post by: infestor1 on May 04, 2009, 02:41:30 am
Okay, now there's a new error:

Code: [Select]
cLast login: Sat May  2 22:02:50 on ttyp1
Welcome to Darwin!
steve-pages-emac:~ stevepage$ cd tremulous-svn
steve-pages-emac:~/tremulous-svn stevepage$ make
/bin/sh: line 1: svnversion: command not found
/bin/sh: line 1: svnversion: command not found

Building Tremulous in build/release-darwin-ppc:
  PLATFORM: darwin
  ARCH: ppc
  VERSION: 1.1.0
  COMPILE_PLATFORM: darwin
  COMPILE_ARCH: ppc
  CC: cc

  CFLAGS:
    -MMD
    -Wall
    -Wimplicit
    -Wstrict-prototypes
    -faltivec
    -fno-strict-aliasing
    -DMACOS_X
    -fno-common
    -pipe
    -DUSE_OPENAL
    -DUSE_CURL
    -DUSE_CURL_DLOPEN
    -D_THREAD_SAFE=1
    -Isrc/SDL12/include
    -DUSE_MUMBLE
    -DUSE_VOIP
    -DFLOATING_POINT
    -DUSE_ALLOCA
    -Isrc/libspeex/include
    -DUSE_LOCAL_HEADERS
    -DPRODUCT_VERSION="1.1.0"
    -DNDEBUG
    -O3
    -ffast-math
    -falign-loops=16

  LDFLAGS:

  LIBS:

  Output:
    build/release-darwin-ppc/base/vm/cgame.qvm
    build/release-darwin-ppc/base/vm/game.qvm
    build/release-darwin-ppc/base/vm/ui.qvm

/bin/sh: line 1: svnversion: command not found
TOOLS_CC src/tools/lcc/etc/lcc.c
TOOLS_CC src/tools/lcc/etc/bytecode.c
TOOLS_CC src/tools/lcc/src/alloc.c
TOOLS_CC src/tools/lcc/src/bind.c
TOOLS_CC src/tools/lcc/src/bytecode.c
TOOLS_CC src/tools/lcc/src/dag.c
TOOLS_CC src/tools/lcc/lburg/lburg.c
TOOLS_CC src/tools/lcc/lburg/gram.c
LD build/release-darwin-ppc/tools/lburg/lburg
LBURG src/tools/lcc/src/dagcheck.md
TOOLS_CC_DAGCHECK build/release-darwin-ppc/tools/rcc/dagcheck.c
TOOLS_CC src/tools/lcc/src/decl.c
TOOLS_CC src/tools/lcc/src/enode.c
TOOLS_CC src/tools/lcc/src/error.c
TOOLS_CC src/tools/lcc/src/event.c
TOOLS_CC src/tools/lcc/src/expr.c
TOOLS_CC src/tools/lcc/src/gen.c
TOOLS_CC src/tools/lcc/src/init.c
TOOLS_CC src/tools/lcc/src/inits.c
TOOLS_CC src/tools/lcc/src/input.c
TOOLS_CC src/tools/lcc/src/lex.c
TOOLS_CC src/tools/lcc/src/list.c
TOOLS_CC src/tools/lcc/src/main.c
TOOLS_CC src/tools/lcc/src/null.c
TOOLS_CC src/tools/lcc/src/output.c
TOOLS_CC src/tools/lcc/src/prof.c
TOOLS_CC src/tools/lcc/src/profio.c
TOOLS_CC src/tools/lcc/src/simp.c
TOOLS_CC src/tools/lcc/src/stmt.c
TOOLS_CC src/tools/lcc/src/string.c
TOOLS_CC src/tools/lcc/src/sym.c
TOOLS_CC src/tools/lcc/src/symbolic.c
TOOLS_CC src/tools/lcc/src/trace.c
TOOLS_CC src/tools/lcc/src/tree.c
TOOLS_CC src/tools/lcc/src/types.c
LD build/release-darwin-ppc/tools/q3rcc
TOOLS_CC src/tools/lcc/cpp/cpp.c
TOOLS_CC src/tools/lcc/cpp/lex.c
TOOLS_CC src/tools/lcc/cpp/nlist.c
TOOLS_CC src/tools/lcc/cpp/tokens.c
TOOLS_CC src/tools/lcc/cpp/macro.c
TOOLS_CC src/tools/lcc/cpp/eval.c
TOOLS_CC src/tools/lcc/cpp/include.c
TOOLS_CC src/tools/lcc/cpp/hideset.c
TOOLS_CC src/tools/lcc/cpp/getopt.c
TOOLS_CC src/tools/lcc/cpp/unix.c
LD build/release-darwin-ppc/tools/q3cpp
/usr/bin/ld: warning multiple definitions of symbol _memmove
build/release-darwin-ppc/tools/cpp/unix.o definition of _memmove in section (__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(bcopy.So) definition of _memmove
LD build/release-darwin-ppc/tools/q3lcc
CGAME_Q3LCC src/cgame/cg_main.c
CGAME_Q3LCC src/game/bg_misc.c
CGAME_Q3LCC src/game/bg_pmove.c
src/game/bg_pmove.c:946: `300f' is a preprocessing number but an invalid integer constant
src/game/bg_pmove.c:948: `300f' is a preprocessing number but an invalid integer constant
make[2]: *** [build/release-darwin-ppc/base/cgame/bg_pmove.asm] Error 1
make[1]: *** [targets] Error 2
make: *** [release] Error 2
steve-pages-emac:~/tremulous-svn stevepage$
Title: Re: Compiling QVM
Post by: Archangel on May 04, 2009, 06:33:37 am
did you modify src/game/bg_pmove.c? what patches have you applied?
Title: Re: Compiling QVM
Post by: rotacak on May 04, 2009, 03:25:44 pm
You should first compile tested svn revision and then, if no errors appear, start changing something.
Title: Re: Compiling QVM
Post by: David on May 04, 2009, 03:29:21 pm
Quote
src/game/bg_pmove.c:946: `300f' is a preprocessing number but an invalid integer constant
numbers ending in f are floats, so have to have a decimal part, eg 300.0f.

If you change things in bg then it can screw up without a matching cgame, esp. with pmove where it will result in prediction errors and people moving very jerky like.
Title: Re: Compiling QVM
Post by: infestor1 on May 05, 2009, 02:30:15 am
did you modify src/game/bg_pmove.c? what patches have you applied?

I didn't modify. I haven't applied any patches.

You should first compile tested svn revision and then, if no errors appear, start changing something.
How do I do that? Is that the normal tremulous src that you get from doing this:
http://tremulous.net/forum/index.php?topic=5007.0

should I re-download the thing from here (http://tremulous.net/forum/index.php?topic=5007.0)
?
Title: Re: Compiling QVM
Post by: cactusfrog on May 05, 2009, 04:45:00 am
can you just boot of an ubuntu disk and compile it on linux? :-X
Title: Re: Compiling QVM
Post by: Archangel on May 05, 2009, 05:25:11 am
shut up
Title: Re: Compiling QVM
Post by: infestor1 on May 10, 2009, 03:15:54 am
Well, this was forgotten for a bit.

Bump it up!  :D