Author Topic: OSX compiling problems  (Read 7236 times)

0 Members and 1 Guest are viewing this topic.

Offline poffy

  • 21
OSX compiling problems
Hello,

I've recently download FS2_Open 3.6.9 from CVS. But, when I try to compile it in Xcode, I get:

../../code/cutscene/oggplayer.h:23:27: error: theora/theora.h: No such file or directory
../../code/cutscene/oggplayer.h:41: error: 'theora_info' does not name a type
../../code/cutscene/oggplayer.h:42: error: 'theora_comment' does not name a type
../../code/cutscene/oggplayer.h:43: error: 'theora_state' does not name a type

I did unzip that Frameworks zip in the Xcode project folder, but I don't have a Theora framework anywhere.
I noticed that the 3.6.9 OSX builds do have the Theora framework. Is CVS out of sync with the Mac OSX build stuff?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: OSX compiling problems
Oops!  :D

Yeah, it's out of sync.  I'll try and get the updated Frameworks.zip in CVS later today.

 

Offline poffy

  • 21
Re: OSX compiling problems
Will it be in HEAD or in fs2_open_3_6_9?

By the way, thanks for your help.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: OSX compiling problems
Will it be in HEAD or in fs2_open_3_6_9?
Both.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: OSX compiling problems
Has this been done yet? Poffy's too polite to prod you himself but seeing as how he's interested in coding for BtRL I'm not. :p
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: OSX compiling problems
Nope, not done yet.  I'm working on all of it now though, trying to get all of my current set of fixes ready for CVS.  Hopefully I'll have enough time to get it all in CVS before the night is over.

But in the meantime, here is the current frameworks tarball: http://icculus.org/~taylor/fso/misc/Frameworks.tar.gz

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: OSX compiling problems
Hm.  I wonder if compiling myself would allow fs2_open to work for me again...

*awaits update on this thread*
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: OSX compiling problems
Hi taylor

Okay, so I am a complete newb in programming, as is already known, and don't really know what I am doing. :)

I've checked out the cvs module for fs2_open, trashed the frameworks.tgz file in fs2_open/projects/xcode/, and then unarchived the .tar you posted above into fs2_open/projects/xcode/ instead.  Then I opened FS2_Open.xcodeproj, and clicked Build.  It gave me the following errors and failed to build:

Code: [Select]
cfilearchive.cpp:121: error: luaconf.h: No such file or directory
cfilearchive.cpp:332: error: 'LUA_NUMBER_SCAN' was not declared in this scope

What should I do?  :confused: :)
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 
Re: OSX compiling problems
You appear to be missing the LUA package, or whatever OSX calls those things. Look around on Mac sites on how to install a LUA dev package, or wait for Taylor to explain it properly.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: OSX compiling problems
I found some options here, but I don't know which to choose, or what I should do with them, so I guess I'll wait for taylor's wisdom. :)
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: OSX compiling problems
LUA is built as a static lib which is then included during the link process.  In other words, you don't need to provide it separately.  I'm not quite sure whether you are building with the stable branch or with HEAD though.  The LUA stuff is different between the two and I haven't updated the HEAD project file to deal with the differences yet.  Let me know which branch you are using, and/or which you really want to use, and we'll go from there.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: OSX compiling problems
Erm, well, I checked out the fs2_open module using :pserver:[email protected]:/home/fs2source/cvsroot (as opposed to freespace2_public or fs2_icculus, which were the other seemingly relevant options).  I don't know whether that is the stable or the HEAD branch. :)

For my purposes, I'd be fine getting the stable branch to compile.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: OSX compiling problems
Yep, that's HEAD. :)

You can convert your existing checkout to the stable branch by using the "fs2_open_3_6_9" tag.  I'm not sure if you are doing this from a terminal or not, but in a terminal just go to the directory of your existing checkout and do "cvs -z3 co -P -r fs2_open_3_6_9" in order to convert to the stable branch.  It will remember from then on that you want the stable branch, so you can just update as normal (from the terminal, through Xcode, etc.) and it will get the right thing.

If you want to keep up with both branches then go one directory down and do something like "cvs -d`cat fs2_open/CVS/Root` -z3 co -P -r fs2_open_3_6_9 -d fs2_open_3_6_9 fs2_open".  That will get a fresh checkout of just the stable branch, but keep it in a new directory called "fs2_open_3_6_9", and that lets you keep track of both branches easily.  It also has the benefit of letting you know very easily that it's the stable branch or not with only a quick look at the directory name.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: OSX compiling problems
Okay, so I followed your second option, and now have two versions of the code in different directories, fs2_open and fs2_open_3_6_9.  I tried building in fs2_open_3_6_9.  The good news is that I get no more errors about Lua. :)  The bad news is that using both the supplied Frameworks and the set you posted here, I get the following errors when I try to build:
Code: [Select]
oggplayer.h:23: error: theora/theora.h: No such file or directory
oggplayer.h:41: error: 'theora_info' does not name a type
oggplayer.h:42: error: 'theora_comment' does not name a type
oggplayer.h:43: error: 'theora_state' does not name a type

This seems odd, since fs2_open_3_6_9/projects/Xcode/Frameworks/Theora.framework/Versions/A/Headers/theora/theora.h exists when I use the posted frameworks set.  :confused:

Thanks for helping the clueless. :)
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: OSX compiling problems
Uhh, hmm.  I had that same problem, but I don't remember exactly what mojo I used to get around it.  I never really did figure out the exact cause either.  I'll have to check my OS X box tomorrow (today, whatever) to figure out what I did and get back to you on that.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: OSX compiling problems
Okay.  *waits*
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: OSX compiling problems
Well, can't figure out what all I did exactly.  ::) I diff'd my 3.6.9-final tree to see the differences, but there wasn't that much different.  I can only assume that all of the trouble I had with it was fixed before I did the final release (but I don't remember, a lot was going on at that point).

Going over the project file diff, then only things that I see are that Theora.frameworks is added to the frameworks list and copy-files set, and I added "./Frameworks/Theora.framework/Headers" to the header search paths, immediately after the Vorbis include of the same thing, for release and debug configurations.  Beyond that there are various other project file cleanup stuff, but nothing directly related to Theora.

If that doesn't work then just try that same project file that I used for the final release.  No promises that it will work 100%, since I have somewhat abused it over time, but it's something to try:  http://icculus.org/~taylor/fso/misc/project.pbxproj.gz

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: OSX compiling problems
Hm.  I tried your posted project file, but no go.

I started poking around in Xcode after that to see what I could see.  I discovered that theora.framework, though it existed in the directory tree, was not listed in the Xcode project.  I added it like so:


Nevertheless, I got the same errors.  It seems they come from oggvorbis.h.  In this shot I've selected the offending four lines of code that correspond to the error messages:


Does that help narrow down the problem?
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Re: OSX compiling problems
*bump*
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: OSX compiling problems
The only other thing that I can think of is to copy the frameworks (or at least Theora.framework) to /Library/Frameworks and see if that makes a difference.