Author Topic: Issues Compiling SCP (via MinGW/MSYS)  (Read 4037 times)

0 Members and 1 Guest are viewing this topic.

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Issues Compiling SCP (via MinGW/MSYS)
I finally decided to start fooling around a bit with the source code, so I installed TortoiseCVS and checked out the 3.6.9 branch.  Since the only (and very very limited) programming experience I've had so far has been in a command-line setup, I decided to try playing around with Cygwin to see if I couldn't get something to compile.  However, when I attempted to follow along with the directions in the INSTALL file, I got pretty much nowhere.  ./autogen.sh generates a few lines of "command not found" and syntax errors.  I'm assuming that ./configure relies on that working, because just running ./configure generates a "no file/directory with that name found" error.  And make states, "No targets specified and no makefile found. Stop."  I'm just about certain I have the latest automake and autoconf packages installed.  I don't have a lot of experience with makefiles other than creating very basic ones, so I'm kind of just fumbling around in the dark.  Is there anyone experienced in this type of stuff who could give me a push in the right direction?
« Last Edit: October 01, 2007, 01:37:37 am by Mongoose »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Compiling SCP via Cygwin
First, since you're on windows, I would get a different compiler.  Either an IDE that supports MinGW or the Visual C++ Express Edition.  I can't say much other than that.  I have a feeling Cygwin _should_ be able to compile it, but I doubt it's a very supported method and probably a pain to set up.  If you want to try MinGW with an IDE I'd look at Code::Blocks or wxDev-Cpp.  Both are in active development.
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 Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Compiling SCP via Cygwin
Heh, so much for my comfort zone. :p

The thing is, in principle, I can't see any reason why using Cygwin wouln't work.  I've been able to throw a few simple C programs using it that run successfully in Windows.  Provided that FS2_Open is written in your regular ANSI C/C++, gcc should be able to handle it fine.  From the errors I've seen, I get the picture that it's just something about the semantics that I don't quite understand; I've definitely never had to work with a project even a tiny fraction of this size, and I don't really understand the exact configuration/make procedure that's going on here.  All of the coding I've done in college has been using emacs and gcc/g++ in a Unix environment, so I was hoping that, were I to start helping the SCP in some very small way, I'd be able to do so via the methods I was familiar with.  I'm going to do some more digging and see if I can't track down exactly what is going on.  Thanks for those other suggestions, though; I'll be sure to take a look at them if I can't get anywhere.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Compiling SCP via Cygwin
If I recall, the Cygwin compiler is what MinGW is based off of, and I've noticed that's not a complete gcc compiler.  I've yet to get FS2_Open to compile with MinGW.  Not saying others haven't had better luck than I have though, feel free to keep trying.
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 Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Compiling SCP via Cygwin
:lol:...well, I think I figured out why the whole process was standing still.  The exact error message I was getting when trying to run autogen.sh was something about the command '\r' not being found.  Apparently, that's the DOS-esque end line command, and so the Unix-esque environment was choking on it.  Flipping some setting when Cygwin is installed is supposed to eliminate this error.  It's always the simple things, isn't it?  Anyways, now that I know that, maybe I can get a little bit further with this.
« Last Edit: September 28, 2007, 05:51:14 pm by Mongoose »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Compiling SCP via Cygwin
Good call, stupid Notepad.
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 Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Compiling SCP via Cygwin
...well, seems that wasn't the only problem.  (Also, changing the setup flag now seems to be giving me all kinds of grief with not finding fonts, and the troubleshooting instructions in the Cygwin/X FAQ did absolutely nothing...I'm suddenly realizing why I've never tried playing around with Linux.)  I finally did get autogen.sh to run from the shell, and some ways into the autoconf procedure, I got some message about fs2_open not being compatible with i686-cygwin, and the whole thing shut down.  So, does this mean that I'm completely SOL?  And is there a particular reason for this incompatibility?

I think I need some words of wisdom from taylor here. :p
« Last Edit: September 29, 2007, 03:11:56 am by Mongoose »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Compiling SCP via Cygwin
Well for one, I doubt cygwin has the capability to access the 3d capabilities of your pc, but feel free to prove me wrong.  That would be a big reason right there.
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 Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Compiling SCP via Cygwin
Do you mean that in terms of compiling fs2_open or running it, though?  I'm certainly not looking to do the latter.  If it's something like missing libraries or some underlying fundamental compatibility problem, then I could understand it.  Guess I'll keep poking around to see if I can figure out what said compatibility issue is.

 

Offline Alpha0

  • 24
Re: Compiling SCP via Cygwin
I don't know about the latest releases, but I can confirm that MinGW32 could definitely build versions 3.6.5 and 3.6.7. I recall it was hard work getting it set up, some of the biggest problems being D3DX8 and CRT debug support. Cygwin is using the same compiler as MinGW (i.e. gcc), so, provided that you have proper 3D API headers and libraries, being OGL or DX, theoretically it should be able to access your PC's 3D capabilities. The thing is, if you want to build on Windows, maybe MinGW/MSYS could be a better bet, IMHO.

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Compiling SCP via Cygwin
Well, now that I've finally ironed out this whole Cygwin-X mess I was having (which was caused by making the text file read change that allowed autogen.sh to run in the first place; I had to go back in and manually mount directories in the proper text mode), I do know what's making the setup process halt.  In the configure.ac file, there's a section that sets defines dependent upon the $host_os.  Since Cygwin reports itself as Cygwin, and since it's not listed among the supported OSes, the procedure stops there.  It looks like there's quite a bit later on that depends on $host_os, including various library dependencies.  Since the Win32 compilation is listed as being performed via MinGW, and since, like you said, MinGW also uses gcc, I wonder if there's some way of forcing Cygwin into displaying as Windows, or (more likely) of editing configure.ac to allow for compilation via Cygwin, provided I download the necessarily libraries.  If nothing else, I think I'm starting to learn more about how Unix/Linux handles things by doing this, so if worst comes to worst, I'll have that.  If I don't get anywhere, I guess I can just try MinGW/MSYS, or take the easy way out and see what Visual C++ is like.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Compiling SCP via Cygwin
Just to clarify, it's not that MinGW and Cygwin are using the same compiler (gcc), it's that MinGW _is_ Cygwin's version of gcc (and the rest of the toolchain) ported straight to Windows I believe.
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 Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Compiling SCP via Cygwin
Ah, gotcha.  I seriously doubt that any fooling around I'm able to do will get anything working, but I figure it might be fun to try anyway.

Edit: So, after discovering that, even if you install MinGW and re-define Cygwin's PATH file to point to it first, you still can't get around not being able to compile on the Cygwin OS, I decided to try the straight MinGW/MSYS route.  I seem to have gotten it all set up, and I was able to successfully generate a makefile, but when I ran make, I was assaulted by a wall of what looks like various warnings, and then the thing bombed out in the middle of what looks like aicode.cpp.  I'm hoping that this was a bug that someone inadvertently introduced with their last commit, or I'm going to have to start diving into this a lot sooner than I would have liked. :p

Edit 2:  Weird...apparently, it's choking on a redeclaration of int in the file psnet2.h.  Now what?

Edit 3:  Hmm, maybe I'd better re-name this thread in the hope of snagging one of the team members. :p
« Last Edit: October 01, 2007, 01:36:57 am by Mongoose »

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: Issues Compiling SCP (via MinGW/MSYS)
I have no idea what to do. I just use MSVC2005.
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline Alpha0

  • 24
Re: Issues Compiling SCP (via MinGW/MSYS)
It is not that simple getting MingW to compile the FS2 SCP package. Make sure that all dependency libraries (like theora, vorbis, OpenGL etc.) are set up correctly before you begin anything and don't assume that it will just build out of the box. I have not followed the development of the project for quite a while now, so I cannot offer specific help, but if you want PM me and I will send you the makefiles I was using back when version 3.6.7 was hot. Maybe with minimal modification, you could get it to run.

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Issues Compiling SCP (via MinGW/MSYS)
The Theora, Vorbis, OpenAL, and jpeg libraries are all included in the CVS checkout.  The only thing I'm not completely sure about is OpenGL, though nothing seemed to choke on that point during the setup process (and from what I can tell from its website, OpenGL 1.1 is included in Windows anyway).  I don't know what the project was like when you were following it, but the included configure.ac procedure seems to check for and set up all of the necessary libraries while creating the makefile.  The exact error message I'm getting doesn't seem dependent on any external libraries at all, but on a basic C++ feature, so that's what has me puzzled.

Edit:  Now this is interesting.  During the configuration process, "socklen_t" is being reported as not found.  The exact line of the .h file that's tripping up make reads: "typedef int socklen_t;"  So...anyone familiar with exactly what socklen_t is?
« Last Edit: October 01, 2007, 02:58:50 am by Mongoose »

  

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Issues Compiling SCP (via MinGW/MSYS)
Not to double-post or anything, but just as a final update, Turey helped me get MSVC++ 2005 up and running, so I'm all set.  Thanks to everyone who chipped in here.

(If I ever feel like torturing myself, I'll go back and try to get things running on MinGW too. :p)