CVS in OSX Tiger

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Lonestar
Bounty Hunter
Bounty Hunter
Posts: 150
Joined: Wed Dec 15, 2004 8:18 pm
Location: Ohio
Contact:

Post by Lonestar »

Are there any different instructions on building? Or just run bootstrap and then the regulars? Also, just out of curiosity, does --enable-macosx-bundle still work?
==========
Lonestar
==========
"Not if we jam it! Down scope!"
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Major changes to the build system

Post by klauss »

balloyd1 wrote:After all, the Windows devs (ie klauss) are great at breaking the build. :wink:
Me? I wasn't breaking... I was testing. :lol:

jk
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Lonestar
Bounty Hunter
Bounty Hunter
Posts: 150
Joined: Wed Dec 15, 2004 8:18 pm
Location: Ohio
Contact:

Post by Lonestar »

Ok... just downloaded the latest source. First, I still had to change all of the 10.2.8 references in configure.ac to 10.4.0 and add the fink locations for libpng, expat, etc:
if test "x$is_macosx" = "xyes" ; then
CXXFLAGS="$CXXFLAGS -I/Developer/SDKs/MacOSX10.4.0sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes"
CPPFLAGS="$CPPFLAGS -Wno-long-double"
VS_LIBS="$VS_LIBS -F/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks -framework OpenGL -framework GLUT -framework CoreAudio"
with_gl_inc=/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes
with_gl_libs=/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenGL.framework/Libraries
with_al_inc="/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenAL.framework/Headers -I/sw/include"
with_al_libs="/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenAL.framework/ -L/sw/lib"
with_expat_libs=/sw/lib
with_png_libs=/sw/lib
with_jpeg_libs=/sw/lib
with_jpeg_inc=/sw/include
with_expat_inc=/sw/include
with_png_inc=/sw/include
with_vorbis_libs=/sw/lib
with_vorbis_inc=/sw/include
PYTHON_LDOPTS="-L/Library/Frameworks/Python.framework"
with_python_inc=/Library/Frameworks/Python.framework/Headers
VS_LIBS="$VS_LIBS -lobjc"
else
VS_LIBS="$VS_LIBS -lutil"
fi
Otherwise, configure fails at each of those. And now, for some reason, it is saying that my glext.h is too old and that I should download a new copy. I did so (and even tried replacing the copies in my opengl framework dirs [with appropriate backups, of course]), but it is still reporting that I am using an old one. I have replaced every glext.h on my system (and there are a few, between x and sdks for each version of tiger and fink, etc.) and it still dies there.

I'll try deleting the code that checks my glext.h version (or at least the part that errors it out when it doesn't like it) for now.
==========
Lonestar
==========
"Not if we jam it! Down scope!"
Lonestar
Bounty Hunter
Bounty Hunter
Posts: 150
Joined: Wed Dec 15, 2004 8:18 pm
Location: Ohio
Contact:

Post by Lonestar »

Ok, here is where I got to:
make all-am
depbase=`echo src/networking/lowlevel/vsnet_dloadmgr.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I./boost/1_33 -Wno-long-double -I/sw/include -DWITH_MACOSX_BUNDLE=1 -DHAVE_SDL=1 -DSDL_WINDOWING=1 -I/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes -I/sw/include -I/sw/include -I/sw/include -DJPEG_SUPPORT -DHAVE_AL=1 -I/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenAL.framework/Headers -I/sw/include -I/sw/include -DHAVE_OGG -I/sw/include/python2.4 -DHAVE_PYTHON=1 -I./src -g -O2 -I/Developer/SDKs/MacOSX10.4.0sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/sw/include/SDL -D_THREAD_SAFE -D_REENTRANT -pipe -MT src/networking/lowlevel/vsnet_dloadmgr.o -MD -MP -MF "$depbase.Tpo" -c -o src/networking/lowlevel/vsnet_dloadmgr.o src/networking/lowlevel/vsnet_dloadmgr.cpp; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
In file included from src/networking/lowlevel/vsnet_debug.h:4,
from src/networking/lowlevel/vsnet_dloadmgr.h:19,
from src/networking/lowlevel/vsnet_dloadmgr.cpp:6:
config.h:5:1: warning: "BSD" redefined
In file included from /usr/include/arpa/inet.h:93,
from src/networking/lowlevel/vsnet_headers.h:14,
from src/networking/lowlevel/vsnet_dloadmgr.h:18,
from src/networking/lowlevel/vsnet_dloadmgr.cpp:6:
/usr/include/sys/param.h:66:1: warning: this is the location of the previous definition
src/networking/lowlevel/vsnet_dloadmgr.cpp:40: error: redefinition of `struct
stat'
/usr/include/sys/stat.h:168: error: previous definition of `struct stat'
src/networking/lowlevel/vsnet_dloadmgr.cpp: In function `int lstat(const char*,
stat*)':
src/networking/lowlevel/vsnet_dloadmgr.cpp:936: error: `OpenFile' undeclared in
namespace `VSFileSystem'
src/networking/lowlevel/vsnet_dloadmgr.cpp:940: error: `Fseek' undeclared in
namespace `VSFileSystem'
src/networking/lowlevel/vsnet_dloadmgr.cpp:942: error: `Ftell' undeclared in
namespace `VSFileSystem'
src/networking/lowlevel/vsnet_dloadmgr.cpp:945: error: `Close' undeclared in
namespace `VSFileSystem'
src/cmd/collection.h: At global scope:
src/cmd/collection.h:54: warning: inline function `void
UnitCollection::UnitIterator::GetNextValidUnit()' used but never defined
make[1]: *** [src/networking/lowlevel/vsnet_dloadmgr.o] Error 1
make: *** [all] Error 2
==========
Lonestar
==========
"Not if we jam it! Down scope!"
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Re: Major changes to the build system

Post by JunkDNA »

balloyd1 wrote:For those using Mac OS/X to build VegaStrike, there has been a major overhaul of the build system. If you could pull fresh copies and attempt to build it using gcc 3.3 and gcc 4.X, I would appreciate it.
Well, not a major problem this one, more of a nuisance...

As things stand the configure system seems to require a fink install of python, even if it finds the python executable and the python includes/libs are installed (as is the case for OSX 10.3 & 10.4). As far as I can tell this is because the test in m4scripts/VS_CHECK_PYTHON.m4 only looks for libpython2.x.so or libpython2.x.a and not libpython2.x.dylib (or a Framework for that matter). I've been messing around with the m4 file but apparently, I am rubbish a shell syntax :oops: .
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

For what it's worth, I managed to modify VS_CHECK_PYTHON.m4 so that the configure script picks up on Python.framework in OS X 10.4. The CXXFLAGS seems to be OK - the python headers are found in any case. I don't know whether the CPPFLAGS results in correct linking as I'm having similar compile errors to Lonestar at the start of this thread:
source='src/gfx/mesh_bxm.cpp' object='src/gfx/mesh_bxm.o' libtool=no \
depfile='src/gfx/.deps/mesh_bxm.Po' tmpdepfile='src/gfx/.deps/mesh_bxm.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I. -I./boost/1_33 -Wno-long-double -I/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes -I/opt/local/include -I/opt/local/include -I/opt/local/include -DJPEG_SUPPORT -I/Developer/SDKs/MacOSX10.4.0.sdk/Library/Frameworks/OpenAL.framework/Headers -I/sw/include -F/Library/Frameworks/Python.framwork -framework Python -I/Library/Frameworks/Python.framework/Headers -DHAVE_PYTHON=1 -I./src -g -O2 -I/Developer/SDKs/MacOSX10.4.0sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -D_REENTRANT -pipe -c -o src/gfx/mesh_bxm.o `test -f 'src/gfx/mesh_bxm.cpp' || echo './'`src/gfx/mesh_bxm.cpp
src/gfx/aux_texture.h:36: error: expected class-name before '{' token
src/gfx/aux_texture.h:56: error: 'VSImageMode' does not name a type
src/gfx/aux_texture.h: In member function 'void Texture::InitTexture()':
src/gfx/aux_texture.h:76: error: 'palette' was not declared in this scope
make[1]: *** [src/gfx/mesh_bxm.o] Error 1
make: *** [all] Error 2
Edit: Removed the attachment - it wouldn't have worked anyway
Last edited by JunkDNA on Sun Feb 19, 2006 11:47 am, edited 1 time in total.
Lonestar
Bounty Hunter
Bounty Hunter
Posts: 150
Joined: Wed Dec 15, 2004 8:18 pm
Location: Ohio
Contact:

Post by Lonestar »

I ran into that same error with gcc 4.0.2. It just has some quirks that I haven't been able to find a way around in OSX. Try it with 3.3.
==========
Lonestar
==========
"Not if we jam it! Down scope!"
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

Thanks Lonestar.

I've been trying with gcc 3.3 and getting a whole slew of different errors. Several seem to be related to not finding an SDL install (even when configuring with --disable-sdl). I have SDL installed as a framework, but I don't use fink so it seems to be similar to the python issue. I'm more puzzled by this one:

Code: Select all

depmode=gcc3 /bin/sh ./depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.   -I./boost/1_33  -Wno-long-double   -I/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes  -I/opt/local/include -I/opt/local/include -I/opt/local/include -DJPEG_SUPPORT -I/Developer/SDKs/MacOSX10.4.0.sdk/Library/Frameworks/OpenAL.framework/Headers -I/sw/include -F/Library/Frameworks/Python.framwork -framework Python -I/Library/Frameworks/Python.framework/Headers -DHAVE_PYTHON=1   -I./src  -DBISON -g -O2 -I/Developer/SDKs/MacOSX10.4.0sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes -I/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/GLUT.framework/Headers -I/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenGL.framework/Headers -pipe  -falign-loops=2 -falign-jumps=2 -falign-functions=2  -D_REENTRANT -pipe -c -o src/vegastrike-savegame.o `test -f 'src/savegame.cpp' || echo './'`src/savegame.cpp
src/savegame.cpp: In member function `void SaveGame::SetPlayerLocation(const 
   QVector&)':
src/savegame.cpp:223: error: `finite' undeclared (first use this function)
src/savegame.cpp:223: error: (Each undeclared identifier is reported only once 
   for each function it appears in.)
Anyone have any thoughts?
Lonestar
Bounty Hunter
Bounty Hunter
Posts: 150
Joined: Wed Dec 15, 2004 8:18 pm
Location: Ohio
Contact:

Post by Lonestar »

Haven't seen that one before. What does the osx-specific portion of your configure.ac look like?
==========
Lonestar
==========
"Not if we jam it! Down scope!"
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

Heh, a bit of a mess to honest :) . I've been messing around with things in there as problems have come up and not been entirely diligent in keeping track of what I changed and why.
if test "x$is_macosx" = "xyes" ; then
CXXFLAGS="$CXXFLAGS -I/Developer/SDKs/MacOSX10.4.0sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes -I/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/GLUT.framework/Headers -I/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenGL.framework/Headers"
CPPFLAGS="$CPPFLAGS -Wno-long-double"
dnl GL_CPPFLAGS="$GL_CPPFLAGS -framework OpenGL"
dnl GLUT_CPPFLAGS="$GLUT_CPPFLAGS -framework GLUT"
VS_LIBS="$VS_LIBS -F/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks -framework OpenGL -framework GLUT -framework CoreAudio"
with_gl_inc=/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes
with_gl_libs=/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenGL.framework/Libraries
with_al_inc="/Developer/SDKs/MacOSX10.4.0.sdk/Library/Frameworks/OpenAL.framework/Headers -I/sw/include"
with_al_libs="/Developer/SDKs/MacOSX10.4.0.sdk/Library/Frameworks/OpenAL.framework/ -L/sw/lib"
PYTHON_LDOPTS="-L/System/Library/Frameworks/Python.framework"
with_python_inc=/System/Library/Frameworks/Python.framework/Headers
VS_LIBS="$VS_LIBS -lobjc"
else
VS_LIBS="$VS_LIBS -lutil"
fi
I'm considering starting over from a clean configure.ac
Lonestar
Bounty Hunter
Bounty Hunter
Posts: 150
Joined: Wed Dec 15, 2004 8:18 pm
Location: Ohio
Contact:

Post by Lonestar »

Here is the configure.ac I have been using with gcc3.3. It assumes you have the fink libs for the game.

Code: Select all

if test "x$is_macosx" = "xyes" ; then
	CXXFLAGS="$CXXFLAGS -I/Developer/SDKs/MacOSX10.4.0sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes"
	CPPFLAGS="$CPPFLAGS -Wno-long-double"
	VS_LIBS="$VS_LIBS -F/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks  -framework OpenGL -framework GLUT -framework CoreAudio"
	with_gl_inc=/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/Carbon.framework/Libraries/CIncludes
	with_gl_libs=/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenGL.framework/Libraries
	with_al_inc="/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenAL.framework/Headers -I/sw/include"
	with_al_libs="/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks/OpenAL.framework/ -L/sw/lib"
	with_expat_libs=/sw/lib
	with_png_libs=/sw/lib
	with_jpeg_libs=/sw/lib
	with_jpeg_inc=/sw/include
	with_expat_inc=/sw/include
	with_png_inc=/sw/include
	with_vorbis_libs=/sw/lib
	with_vorbis_inc=/sw/include
	PYTHON_LDOPTS="-L/System/Library/Frameworks/Python.framework"
	with_python_inc=/System/Library/Frameworks/Python.framework/Headers
	VS_LIBS="$VS_LIBS -lobjc"
else
	VS_LIBS="$VS_LIBS -lutil"
fi
And I've generally been just running configure with --with-boost=1.28 (we had a LOT of problems with later versions) and maybe -O3, but nothing else. OSX just seems a bit touchy on a lot of those flags.
==========
Lonestar
==========
"Not if we jam it! Down scope!"
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

Thanks,

I might do some tinkering since I use darwinports rather than fink but if that doesn't work, I'll give fink a shot.
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

Hurrah, success :D .

After installing fink versions of the various libs, applied Lonestar's changes to configure.ac, and made the changes to various source files suggested by klauss and dandandaman in this thread and switched over to gcc 3.3 I now have a shiny new binary!

Interestingly, after a make clean, it also builds OK with boost 1.33 enabled.
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

In case anyone is interested, I've got vegastrike to build using the python framework that ships with OS X 10.4 (/System/Library/Frameworks/Python.framework) rather than needing to install a second copy of python via fink. I just inserted the following into m4scripts/VS_CHECK_PYTHON.m4 after line 127 (i.e. the part that searches for libpython):

Code: Select all

if test "x${FOUND_LIBPYTHON_SO}" = "xno";
then
  if test "x$is_macosx" = "xyes" ; then
    PYTHON_framework="/System/Library/Frameworks /Library/Frameworks"
    for i in ${PYTHON_framework};
      do
        if test -d $i/Python.framework;
          then
            echo "$i/Python.framework yes"
            PYTHON_CXXFLAGS="-I${i}/Python.framework/Headers"
            PYTHON_LIBS="-framework Python"
            FOUND_LIBPYTHON_SO=yes
            break
          fi
      done
  fi
fi
However, if python is installed via fink, the fink version will be used instead.
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

Cheers JunkDNA :-)

When Brian gets back I'll see that this is put in nice and proper ... or who knows, I might eventually have enough time to suss out teh python m4 file :-)

Dan
"Computers are useless. They can only give you answers."
-- Pablo Picasso
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

You're welcome, I'm glad I could post something slightly useful for a change :D.

Whilst I think of it, I've been running into a minor thing when compiling with SDL disabled - I still have to link against libSDL at the end, even after ace123's recent change to Makefile.ac. As far as I can tell, the culprit is src/rendertext.cpp. It's not a big deal, but I thought I'd flag it up.
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

When I get mine building to that stage, I'll see if I get that error too (didn't have it before...)

Dan
"Computers are useless. They can only give you answers."
-- Pablo Picasso
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

I already fixed rendertext - there were missing #ifdefs.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

easy then :-)
"Computers are useless. They can only give you answers."
-- Pablo Picasso
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

I just updated from svn to and removed src/vegastrike-rendertext.o to make sure I hadn't missed klauss' update then recompiled. I'm still hitting the same problem. here's what gcc has to say for itself:

Code: Select all

ld: warning multiple definitions of symbol _access
libnetlowlevel.a(vsnet_dloadmgr.o) definition of _access in section (__TEXT,__text)
/usr/lib/libSystem.dylib(access.So) definition of _access
ld: Undefined symbols:
_SDL_CreateMutex
_SDL_DestroyMutex
_SDL_mutexP
_SDL_mutexV
make: *** [vegastrike] Error 1
It's not a huge deal - vegastrike runs fine if I copy/paste the linking command and add in linking to libSDL
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

Don't think he's uploaded the changes yet :-)

Dan
"Computers are useless. They can only give you answers."
-- Pablo Picasso
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Yes, sorry... I used unhappy phrasing on the post, out of lazyness.
I hadn't commited yet, and found some trouble when I wanted to commit (could not make sure it built with the changes, and it's not a good idea to commit things without checking first).

It is there now, so you should be able to build out-of-the-box.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
JunkDNA
Merchant
Merchant
Posts: 51
Joined: Tue Oct 26, 2004 9:30 pm
Location: Iowa

Post by JunkDNA »

That's got it! Thanks klauss, you're a champ
Post Reply