Author Topic: Can't compile FSO anymore  (Read 3212 times)

0 Members and 1 Guest are viewing this topic.

Offline Yarn

  • 210
Can't compile FSO anymore
While working on a new branch of mine, I found that I wasn't able to compile it. My local copy of the main master branch compiled, though. I deleted that copy and cloned a new one to see whether it would fail to compile, and lo and behold, it did fail.

The following errors are generated whenever I try to compile:
Code: [Select]
Severity  Code     Description                        Project     File                                                                                Line
Error     RC2135   file not found: phrases.cfg        Freespace2  C:\Games\FreeSpace2\fs2_open\master\code\freespace2\freespace.rc                    451
Error     LNK1181  cannot open input file 'code.lib'  Fred2       C:\Games\FreeSpace2\fs2_open\master\projects\MSVC_2015\LINK                         1
Error     MSB6006  "cmd.exe" exited with code 9009.   code        C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets  171

I'm using Visual Studio Community 2015 Update 2, by the way.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline Yarn

  • 210
Re: Can't compile FSO anymore
I tracked down the culprit to commit f824df070b2c40e71c8959af6a0b903903c35424, which dates back to August 20, 2015! Either something's wrong with my Visual Studio installation, or no one has tried to check out a fresh copy of FSO's code since then.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Can't compile FSO anymore
that's confusing, I compiled a bunch of builds after August 2015 as part of my APNG work, and I was updating my branch with master throughout.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Yarn

  • 210
Re: Can't compile FSO anymore
What happens if you check out to a completely empty folder and compile that? That's what I had to do to get this problem.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Can't compile FSO anymore
Code: [Select]
Severity  Code     Description                        Project     File                                                                                Line
Error     RC2135   file not found: phrases.cfg        Freespace2  C:\Games\FreeSpace2\fs2_open\master\code\freespace2\freespace.rc                    451
So, why isn't phrases.cfg being generated?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline m!m

  • 211
Re: Can't compile FSO anymore
Appveyor compiles all the PR changes using VS 2015 and never failed so there must be something wrong with your Visual Studio installation.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Can't compile FSO anymore
I noticed something similar when I recently had occasion to reinstall my machine. My guess is that the speech API stuff isn't installed, since it doesn't come with VS anymore; you'll need to install the Speech SDK (I think it's this one? Gonna have to check that at home later).
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 m!m

  • 211
Re: Can't compile FSO anymore
That's odd. I thought the speech SDK was part of the standard Windows SDK. I got the SDK as part of my Visual Studio install (I think I have the Ultimate edition but I'm not sure) but maybe it isn't included in the community edition.

 
Re: Can't compile FSO anymore
I made a couple fresh FSO checkouts over the past few weeks, didn't have any compile errors :nervous: Using VS2015 Community on Windows 7

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Can't compile FSO anymore
Ok, that commit shouldn't matter whether you have the speech sdk or not.  My nightly build system is using VS 2015 Community now, and does an export of only tracked files from my repo, and of a specific hash.  It hasn't had issues building because of that commit.  I hadn't installed Update 2 yet though, doing that now.  I'll see if it causes any issues with building the nightlies from a clean export tomorrow since something was merged today.
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 Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Can't compile FSO anymore
To correct a few misconceptions:

1) The Speech API files were copied into the codebase a while back.  They are in the speech folder under the top-level directory.
2) The solution was designed to compile whether FS2_VOICER was defined or not (as chief1983 said).  If it was defined, grammar.h and phrases.cfg would be generated and built; if not, they wouldn't.

I don't see anything in that git change that should affect this unfortunately.  Yarn, is FS2_VOICER currently defined in the project that fails to compile?  Strike that, this is the problem:

In freespace.rc:
Code: [Select]
#ifdef FS2_VOICER
-IDR_CMD_CFG SRGRAMMAR DISCARDABLE "..\..\code\sound\phrases.cfg"
+IDR_CMD_CFG SRGRAMMAR DISCARDABLE "phrases.cfg"
#endif

In the custom build step:
Code: [Select]
gc /O "$(IntDir)voicer\%(Filename).cfg" /H "$(IntDir)voicer\grammar.h" "%(RootDir)%(Directory)%(Filename)"
It's a simple directory mismatch.  The generated files are being placed in $(IntDir)voicer whereas freespace.rc is looking for them in freespace2.  Additionally, any file that needs to #include grammar.h is probably not going to be able to find it.

Since $(IntDir) is a variable that's only available in the context of a build, and since both grammar.h and phrases.cfg need to be available in the context of compilation, I think PR #290 was a mistake and should be reverted.
« Last Edit: April 27, 2016, 01:39:35 pm by Goober5000 »

 

Offline m!m

  • 211
Re: Can't compile FSO anymore
The resource compilation uses the additional include directory "$(Configuration)\code\voicer\" which should contain the files generated by the gc execution. Is it possible to examine the command line of the resource compiler? Maybe the additional include path is wrong.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Can't compile FSO anymore
1) The Speech API files were copied into the codebase a while back.  They are in the speech folder under the top-level directory.
They're only used in the 2010 project files (because 2010 Express doesn't include SAPI); otherwise it uses SAPI's compiler, which is definitely included in the Community editions of 2013 and 2015 (if it wasn't, AppVeyor wouldn't work and also I wouldn't have been able to compile FSO with voice recognition after upgrading to Windows 10).

It's a simple directory mismatch.  The generated files are being placed in $(IntDir)voicer whereas freespace.rc is looking for them in freespace2.
No it isn't. I added the directory to the list of directories resources are searched in for.

The problem is not with the project files; they've been thoroughly tested by multiple people at this point. The problem is that Yarn's system is failing to compile phrases.cfg for some reason.


EDIT: Unless Update 2 took them out for some reason; I just tested it and "gc" is no longer recognized. Damn.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Yarn

  • 210
Re: Can't compile FSO anymore
The recent change by MageKing17 (I think that's AdmiralRalwood) solved the problem for me.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178