How do I compile Ogg support on a Mac?
February 19, 2007 12:28 AM   Subscribe

How do I compile Ogg support under Mac OS X the hard way? There's way too much

I've just installed Frets on Fire (an open source replacement for the Guitar Hero games) on my 20" Intel iMac. It only comes with three tracks. However, it can import tracks from the original Guitar Hero discs for the Playstation 2. The importer needs oggenc to turn the Playstation data into .ogg files that Frets can play.

Getting this up and running on Windows seems to be pretty straightforward - track down a copy of oggenc.exe and stick it in the installation directory. Frets assumes Linux has full OGG support available.

Things don't seem so clear-cut on the Mac. I grabbed a precompiled Mac binary of oggenc from vorbis-tools-1.1.1. It runs fine at the command prompt, but no matter where I put it, Frets can't find it. I'm guessing I need to set up a Linux-like ogg environment in Darwin so that it's all-pervasive.

I've downloaded the CVS for libogg, libvorbis, libao and vorbis_tools. Apparently I stick these in a folder, open a terminal, change into each subfolder, and type:

./configure
make
sudo make install


The 'configure' command told me it couldn't find a C compiler. I threw in my OS X CD and installed gcc3 and gcc4, along with whatever's in developertools.pkg for good measure. Now 'configure' tells me my C compiler can't make executables, so that's as far as I get.

checking for C compiler default output file name... configure: error: C compiler cannot create executables

Do I need to install some other developer-type tools from my install CD to make this work? I tried installing OggDrop to see if it'd make some changes behind the scenes - no dice.
posted by obiwanwasabi to Computers & Internet (8 answers total) 1 user marked this as a favorite
 
The developer's tools include GCC 3 and 4, so I'm confused as to why or how you installed them separately.

There may also be other dependencies involved in compiling the ogg codec.

Can you post the full configure transcript?

Another thought is to find out where the OS X vorbis-tools-1.1.1 installer places the libraries (e.g., /usr/lib etc.).

If you know where the libraries are installed, and where they are placed in the filesystem under Linux, you might be able to set up soft symbolic links (ln -s) from the OS X location to the Linux location, to fake out Frets on Fire.
posted by Blazecock Pileon at 12:49 AM on February 19, 2007


is there a reason you want to do it the hard way? i find that fink is the way to go with this kind of thing. seriously, life is too short, man.
posted by sergeant sandwich at 12:58 AM on February 19, 2007 [1 favorite]


You sure your compiler's running with the right permissions?
posted by ikkyu2 at 1:10 AM on February 19, 2007


(and by my comment i don't mean that i think fink will solve your problem w.r.t. the fact that you can't compile anything. that is something screwed up in your developer tools installation.)

what you should do is:

a) go here and download the latest version of xcode tools,

b) install fink, run the setup and autoupdate stuff, and

c) do a "fink install vorbis-tools"
posted by sergeant sandwich at 1:15 AM on February 19, 2007


Make sure the directory containing your oggenc is in the path used by OS X GUI progams. By default, this is only /usr/bin/. There are instructions for adding extra directories here (bottom of page; "Putting Python on your command line path"). That example is for stuff in /usr/local/bin. You should substitute the directory where your oggenc is.

Just installing oggenc through fink etc may not help, because (IIRC) Fink doesn't add its special path (/sw/bin) to the GUI path; instead it just updates your .bashrc which isn't enough for GUI programs.
posted by beniamino at 1:47 AM on February 19, 2007


Response by poster: Thanks all!

The developer's tools include GCC 3 and 4

They do now that I've installed XcodeTools.mpkg instead of individual packages in the 'Packages' folder. Thanks for the tip - my compiler now works! Unfortunately, it barfed with a lot of errors during the configure / make / install process.

i find that fink is the way to go

Sweet - I'd never heard of fink. Downloading it right now!

By default, this is only /usr/bin/

And you, beniamino, win the grand prize. I popped the precompiled oggenc into /usr/bin, and Frets now works fine. I can't believe it was that easy!

Thanks everybody - thanks to Blazecock, my developer setup is now working; thanks to sgt sandwich I won't have to worry about this stuff in the future, and thanks to beniamino, I now have a completely new problem. Frets detects oggenc, lets me point it to the Guitar Hero disc, then complains that "no songs could be imported." Hey, it's progress!
posted by obiwanwasabi at 2:21 AM on February 19, 2007


An alternative to Fink is DarwinPorts.
posted by veedubya at 7:09 AM on February 19, 2007


If you're running it fine at the command line but fret can't find it, then this is probably a path problem. You shouldn't need to rebuild it unless it's not running at all, or unless fret needs some later version (and since oggenc releases are few and far between for the most part, I don't think the latter would be the issue).

Try what beniamino says for adding the path where oggenc is installed to the system path. You shouldn't need fink or the xcode tools at all.
posted by metajack at 9:06 AM on February 19, 2007


« Older Kill me, drug me, heal me, or fill me?   |   Help me stretch non hd channels on my wide screen... Newer »
This thread is closed to new comments.