Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: poffy on February 14, 2007, 10:28:33 am
-
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?
-
Oops! :D
Yeah, it's out of sync. I'll try and get the updated Frameworks.zip in CVS later today.
-
Will it be in HEAD or in fs2_open_3_6_9?
By the way, thanks for your help.
-
Will it be in HEAD or in fs2_open_3_6_9?
Both.
-
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
-
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
-
Hm. I wonder if compiling myself would allow fs2_open to work for me again...
*awaits update on this thread*
-
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:
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: :)
-
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.
-
I found some options here (http://lua-users.org/wiki/MacOsxLua), 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. :)
-
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.
-
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.
-
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.
-
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:
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. :)
-
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.
-
Okay. *waits*
-
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
-
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:
(http://scroll.hard-light.net/temp/oggplayer_theora.jpg)
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:
(http://scroll.hard-light.net/temp/theora_framework_added.jpg)
Does that help narrow down the problem?
-
*bump*
-
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.
-
Aha! Turns out I'd added the framework incorrectly. By default, Xcode selected "FS2_Open" to add the framework to, when it should have been "code" (I think), like so:
(http://scroll.hard-light.net/temp/adding_framework_to_code.jpg)
With this change it seems I am getting farther. Now things proceed on until I get some new errors. :) Looks like I need grzbuffer.cpp for something to be happy.
Tool:0: Command /usr/bin/gcc-4.0 failed with exit code 1
Tool:0: powerpc-apple-darwin8-gcc-4.0.1: no input files
Tool:0: powerpc-apple-darwin8-gcc-4.0.1: warning: '-x c++' after last input file has no effect
Tool:0: powerpc-apple-darwin8-gcc-4.0.1: /Users/jon/fs2source/fs2_open_3_6_9/projects/Xcode/../../code/graphics/grzbuffer.cpp: No such file or directory
-
grzbuffer.cpp was removed from the code tree, so just take it out of the project file.
-
Which reminds me, I ought to update the Xcode project files once CVS is back up.
-
grzbuffer.cpp was removed from the code tree, so just take it out of the project file.
*goes off to figure out how to do that* :)
Which reminds me, I ought to update the Xcode project files once CVS is back up.
:nod: I might be able to work on SA again at last if this works.
-
Which reminds me, I ought to update the Xcode project files once CVS is back up.
Crapf. I have no idea how to do this. Xcode project files are a lot stranger than MSVC project files or Makefiles. :(
-
Crapf. I have no idea how to do this. Xcode project files are a lot stranger than MSVC project files or Makefiles. :(
Yeah, I have to admit that I had a good laugh when you said that you'd fix it. ;)
I already took care of it though. Updating the Xcode stuff was about the only thing that I did in CVS during the mailing list outage. That's only for the 3.6.9 branch though, I'm still staying away from HEAD until 3.6.10 comes out.
-
K. :)
So if Sesq refreshes his CVS, he should be good to go? Do the Xcode projects include all the changes from this thread (http://www.hard-light.net/forums/index.php/topic,45302.0.html)?
-
Yep, he should be good to with just an update. I also modified the icon file, updated the frameworks, and made sure that CVS was set to preserve the binary status of those files (to avoid future corruption from Windows-user commits, like has happened in the past).
The changes in that thread don't really apply though. It's still only the 3.6.9 branch, the changes that apply to HEAD are going to have to wait. I don't have time to fix all of the problems that exist in HEAD right now in order to make sure it all works properly cross-platform (Linux had a ton of errors before, and still has a few issues that affect stability, and the Mac builds will need quite a few more code fixes before they are safe to use). The platform specific stuff, in either branch, is available to the project files but are part of any active builds, so changes related to those won't affect building in any way.