hercules-390 / hyperion

Hercules 390
Other
252 stars 68 forks source link

Cannot build Hercules from within Visual Studio Community 2015 Update 1 or 2 IDE #105

Closed Fish-Git closed 8 years ago

Fish-Git commented 8 years ago

This GitHub Issue is a placeholder to document currently unresolved issues with Visual Studio Community 2015 (Update 1 and Update 2) that prevent successfully building Hercules (Hyperion) from within the Visual Studio IDE (Integrated Development Environment, i.e. from within Visual Studio itself).

Currently, as of Hyperion commit 91d24cf7e2c9142dd624d010ebde8f805f89e7fe, Hyperion can be successfully built from the command line using makefile.bat with either VS2015 Community Update 1 or Update 2.

However, due to unresolved bugs in each (Update 1 and Update 2), neither can be used to build Hercules from within the IDE itself (i.e. by opening the .sln Solution file with Visual Studio and selecting Clean, Build or Rebuild from the Build menu (or clicking the equivalent toolbar button)).

For VS2015 Update 1, makefile.bat hangs. Apparently VS2015 fails to create a proper environment within which batch files can be run, causing them to hang when invoking simple piped commands.

In VS2015 Update 2 this problem was thankfully resolved, but unfortunately introduced a new bug of its own: attempting a "Build" or "Rebuild" seems to always invoke an msbuild for a normal application project instead of invoking the project's defined NMake Command Line (which for Hercules is the makefile.bat batch file), resulting in a misleading msbuild error message about reference assemblies. ("Clean" works fine!.Doing a clean invokes makefile.bat just like it should. Only Build and Rebuild are broken!)

This bug in Update 2 has already been reported to Microsoft ("Build and Rebuild Solution fail to invoke defined makefile commands") but it is of course unknown how long it will be before it is fixed or even if it will be fixed.

Microsoft seems to be discouraging use of makefiles and nmake to build programs with, and due to nmake's peculiarities I can understand why. Hercules will need to be eventually converted into a non-makefile project. Until that occurs however, you will not be able to build Hercules (Hyperion) using the IDE.

Instead, open a command prompt rooted in the Hercules source code directory and use the Hercules provided makefile.bat command to build your desired Hercules configuration with (fortunately, that much still does work!).

If/when Microsoft ever comes out with a fix for the above Update 2 issue (presumably in an Update 3 or Update 4 release), I will update this GitHub Issue to keep the Hercules community informed.

That is all for now.

srorso commented 8 years ago

I am able to build Hercules with commits through c9993e ("Finish FixIgnore") inside the IDE on VS2015 32-bit. I don't know what is unique about my environment: Windows 10 32-bit version 1511 (March of 2016) on Intel i686. Visual Studio Update 2 with, among other things, Github.VisualStudio 1,0. The build result can be used to start Hercules and IPL an operating system

I was able to build inside the IDE on Update 1 as well.

I can provide build logs and/or Windows environment, most of which are in the build logs, if they have diagnostic value, and am willing to run test cases too; a build on my system takes about a minute and a half. (I really like my SSD.)

Fish-Git commented 8 years ago

Hmmm... Must be Windows 10 then. I installed both of them inside separate VMware virtual machines running stock Windows 7 x64 and had a lot of trouble getting either one to install cleanly OOTB (I used the .ISO; maybe that was my mistake?), so there's a chance by installation is slightly f**cked somehow.

When I'm in the mood I might try again using the web installer method to see whether it makes any difference.

Question: What options did you select when you installed it? When I did it I unselected everything except the C/C++ option. That was the only option I had selected. That might be something else that's "wrong". (I rarely accept default installation options when I install software since in 9 times out of 10 the default installs a bunch of crap I don't need or want. I prefer my systems to be as lean and mean (and clean!) as possible.)

Do you have a 64-bit Windows 7 system you can try it on?

Fish-Git commented 8 years ago

a build on my system takes about a minute and a half. (I really like my SSD.)

(Heh!) Got you beat by a country mile:  :)  

Solution Build begun at 4/28/2016 2:30:29 PM

1>------ Rebuild All started: Project: Hercules, Configuration: Debug x64 ------

<snip>

1>Build Time 0:27
1>Build log was saved at "file://C:\Users\Fish\Documents\Visual Studio 2008\Projects\Hercules\_GIT\_Enrico\hercules-0\BuildLog-x64-Debug.htm"
1>Hercules - 0 error(s), 1 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

1>Hercules - 0 error(s), 1 warning(s)

Solution Build ended at 4/28/2016 2:30:56 PM
Solution Build duration 00:00:27

  Of course that's for an unoptimized Debug build. Optimized Release builds take slightly longer as the optimizer has to spend time, well, optimizing:  

Solution Build begun at 4/28/2016 2:28:22 PM

1>------ Rebuild All started: Project: Hercules, Configuration: Release x64 ------

<snip>

1>Build Time 1:00
1>Build log was saved at "file://C:\Users\Fish\Documents\Visual Studio 2008\Projects\Hercules\_GIT\_Enrico\hercules-0\BuildLog-x64-Release.htm"
1>Hercules - 0 error(s), 1 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

1>Hercules - 0 error(s), 1 warning(s)

Solution Build ended at 4/28/2016 2:29:22 PM
Solution Build duration 00:01:00

  Specs: Dual quad-core (8-way) 3.0 GHz x5570 Intel Xeon with 16GB Dual channel ECC DDR3 memory.

Of course this is using VS2008, not VS2015 too. But as I recall (too lazy to check right now) they take about the same length of time using VS2015 inside my virtual machines too.

Fish-Git commented 8 years ago

(OOPS!) Sorry for the off-topic comment! I'm breaking my own rule. (Bad Fish! Naughty Fish!)

Fish-Git commented 8 years ago

It is interesting that you were able to successfully Build/Rebuild from the IDE with Update 1 and 2. I don't know why I can't.

I have updated my Microsoft Problem Report with additional information.

When I get time I will try to completely uninstall VS2015 from both systems and try again using the web installer this time.

I will post more information when it becomes available.

srorso commented 8 years ago

I don't have access to any 64-bit systems. If I were working my work system would be Win10 64,but I shuffled off the employment coil some years back.

My Win-10 (Home license) system was built as the free Microsoft upgrade from a clean install from real CD of Dell OEM Windows 7. Nothing was installed between the Win-7 install and the Win10 upgrade... (By the way, hearing about your setup has given me system envy...)

We are of similar minds re installation options, but I did install a few more things because I thought it might be fun to play with them.

Looking at your MS problem report, I'm going to swing for the fence and suggest that installation of the ASP .NET stuff might help. These are, I think, installed by the "Microsoft Web Developer Tools" checkbox in VS2015.

I've posted screenshots of my VS2015 installation options to Hercules-devel shared file space.

Help - About returns the following. I've removed some of the descriptive stuff, but the item list is correct:

Installed Version: Community Visual Basic 2015 00322-20000-00000-AA050 Visual C# 2015 00322-20000-00000-AA050 Visual C++ 2015 00322-20000-00000-AA050 Application Insights Tools for Visual Studio Package 5.2.60328.3 ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11106.0 ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0 ASP.NET Web Frameworks and Tools 2013 5.2.40314.0 Common Azure Tools 1.7 GitHub.VisualStudio 1.0 JavaScript Language Service 2.0 JavaScript Project System 2.0 Microsoft Azure Mobile Services Tools 1.4 NuGet Package Manager 3.4.0 PreEmptive Analytics Visualizer 1.2 SQL Server Data Tools 14.0.60311.1 TypeScript 1.8.30.0 Visual Studio Tools for Universal Windows Apps 14.0.24720.00

Fish-Git commented 8 years ago

Thanks.

I'll try my install again (but a web install this time) accepting the deafults but adding "Common Tools for Visual C++ 2015" too when I get time. I'd like to try and take care of Ken Symth's "SCSI error HHC00205E for each SCSI drive" issue first.

Fish-Git commented 8 years ago

Issue being closed as "Invalid". The described problem does not occur when you install VS2015 "correctly" (where "correctly" means, with the "Microsoft Web Developer Tools" option also selected).

Please refer to the updated comments in my previously mentioned Problem Report to Microsoft for details.

My apologies for false alarm folks. (I hate it when I do that!)

Fish-Git commented 8 years ago

FYI: this issue is related to issue #102

srorso commented 8 years ago

Fish:

My apologies for false alarm folks. (I hate it when I do that!)

Don't beat yourself up. I don't recall seeing anything in the installation process that said one needed to install Web Developer Tools to build a C application in the VS2015 IDE using make. Nor did that easy response come from Microsoft on your (or any other) problem report.

...I'm going to swing for the fence and suggest...

I am glad I did not mention that when sides were picked for baseball in school, I usually got picked to play Left Out.