Author Topic: Building and install libvorbis, ogg, theora on Windows using MinGW and MSYS  (Read 7565 times)

0 Members and 1 Guest are viewing this topic.

Offline Nami

  • 24
Building and install libvorbis, ogg, theora on Windows using MinGW and MSYS
Hi.  I am trying to build FS2Open on Windows so that friends of mine that are stranded to said operating system can play the same version as me (I'm using Linux and will never go back if possible).  My issue is with attempting to install the dependencies (libogg, libvorbis, libtheora) under Windows using MSYS.  Here's what I've done so far:

* installed MingGW
* installed MSYS
* downloaded source versions of the three libraries I mentioned above

I then built libogg using Make, and attempted to run a 'make install'.  According to the output, there were no errors and all seemed to be well.

Then, upon running configure for libvorbis, I received this error at the end:
*** Could not run Ogg test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means Ogg was incorrectly installed
*** or that you have moved Ogg since it was installed.
configure: error: must have Ogg installed!

Now, I know I installed ogg using make install, but I should have known that when I thought MSYS would automagically use local system variables to find the proper location in the MinGW install, it was just wishful thinking.  I am still new to MSYS and relatively new to MinGW in general.  When I first started coding, prior to migrating to Linux, I used Visual Studio and the Microsoft compilers, although I'm trying to avoid that like the plague now, since the practices can't be replicated across platforms.  Obviously, this is only the first of my woes in attempting to build FS2 on Windows with MinGW, but it would be extremely helpful if someone who has had the experience building with those programs could tell me the proper directories to put everything.  I had sincerely hoped that the "make install" would just figure it out, but that was not the case.  Also, I know this is more of a question pertaining to these libraries and not SCP, but since these must be installed to build SCP, I consider it relevant.  I could not find a guide for compiling on Windows with MinGW.  Any help is truly appreciated! 
Nami aka Mirakus

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Building and install libvorbis, ogg, theora on Windows using MinGW and MSYS
Problem is, our Windows coders are using VS exclusively, so there is no institutional experience regarding compilation with MingW. One question does occur to me though, why can't your friends use nightly builds or the official 3.6.12 exes?
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Nami

  • 24
Re: Building and install libvorbis, ogg, theora on Windows using MinGW and MSYS
Problem is, our Windows coders are using VS exclusively, so there is no institutional experience regarding compilation with MingW. One question does occur to me though, why can't your friends use nightly builds or the official 3.6.12 exes?

Well, they probably could.  I guess it's just more of a pet-peeve I have that I must be able to build it myself on both platforms.  It may just be easier for me to bite the bullet and use VS, so I will probably go ahead and do that.  If I decide to play around with the MinGW lib locations and I get it to work, I will try to whip up a quick guide on building it like that.  Thanks!
Nami aka Mirakus

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Building and install libvorbis, ogg, theora on Windows using MinGW and MSYS
First of all, nightly builds are run quite often, you could just match your Linux build revision to a recent nightly and have them grab it, could you not?

I'll still see what I can do to help you out here.  Right now, there is no guide for building on MinGW because we don't support building with MinGW.  I think there was an attempt at one point to get it compiling with MinGW through Code::Blocks, but that hasn't been touched in years.

We do have pre-compiled versions of the libraries in SVN.  Can those .lib files not be linked with the MinGW build?

Anyway, at this point, it sounds like compiling issues related to ogg/vorbis in MinGW are really more in the ballpark of the Ogg community.  In fact, we don't really have much experience building those libs at all around here.  Many of the libs are a bit old, and only built once in a blue moon.  If they're not broke, we tend not to fix them.

Now, as to the specific error.  When ogg compiled, where did it install it?  Is the bin directory in your path?  The vorbis config is probably trying to execute the program without an absolute path, so if it can't find it, that would probably cause your error.  If it's not in your path, you'll need to add it and possibly reboot to take effect.

Hope there was some useful information here.

Edit:  Guess I can understand wanting to roll your own, but there is at least the free VS Express edition in that case, you won't have to shell out any money or pirate anything.

Edit2:  If you do stick with this route, could you please be sure to make some good notes?  If you can get it compiling with MinGW, I'm sure it would be nice to have added to our supported compilers.  We just haven't had anyone with the initiative to try in a while.  The biggest reason for using VS on Windows is the MFC, which is still required by FRED2.  You'll only be able to build the FS2 exe at best.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Building and install libvorbis, ogg, theora on Windows using MinGW and MSYS
I would also like to note that the makefile that we provide in our source does not support cross-compling (though because you mention MSYS once you might be doing it natively on windows anyway).  The other problem with our makefile is that it is very Debian (Ubuntu namely) specific and the problem with MSYS is that it is not really debian like.  This also means that the makefile also depends heavily on pkgcfg.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

  

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Building and install libvorbis, ogg, theora on Windows using MinGW and MSYS
MSYS, MinGW, yeah he's definitely doing the compiling on Windows.  However, our makefile does work on non-Debian based distros I believe, so I don't think that should be a huge problem.  But we can look at those specific issues when they arrive.  From the sound of it, he hasn't hit one of those problems yet.  I may try to follow along on my home PC too.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays