[2.2] Unable to compile Ogre due to compiler crashing when compiling FreeImage

Problems building or running the engine, queries about how to use features etc.
Post Reply
Somtin
Gnoblar
Posts: 10
Joined: Thu Nov 03, 2016 6:57 am
x 1

[2.2] Unable to compile Ogre due to compiler crashing when compiling FreeImage

Post by Somtin »

Hi,

I'm having an issue when compiling Ogre, that it attempts to compile the FreeImage project in Release mode and fails due to a compiler crash.

ogre rev: 14132
ogredeps rev: 132

I've raised an ticket with MS, and am investigating further to find a solution to the crash, but I'm a bit confused about a few things:
  • Why would FreeImage be compiled at all in the Ogre solution? It seems to be getting compiled in ogredeps...?
  • And speaking of, FreeImage seems to be building fine in release mode in ogredeps!
Wondering if anyone else has seen something like this? Or maybe I should be ditching VS2017 and going to an older version?
Somtin
Gnoblar
Posts: 10
Joined: Thu Nov 03, 2016 6:57 am
x 1

Re: [2.2] Unable to compile Ogre due to compiler crashing when compiling FreeImage

Post by Somtin »

The error I'm getting is:

Code: Select all

1>f:\thealmightychin\documents\projects\ogre\dependencies\src\freeimage\source\librawlite\internal\dcraw_common.cpp(4509): fatal error C1001: An internal error has occurred in the compiler.
When building the FreeImage project in Release in the OGRE.sln solution.
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 156

Re: [2.2] Unable to compile Ogre due to compiler crashing when compiling FreeImage

Post by sercero »

That's very strange, what version of Vistual Studio are you using?

Do you have all the patches installed?

If you have the latest patches then the best course of action is what you already did: open a ticket with MS.

Also check the MD5 or SHA1 signatures of the files you downloaded, perhaps something is corrupt in the freeimage source file.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: [2.2] Unable to compile Ogre due to compiler crashing when compiling FreeImage

Post by dark_sylinc »

Have you tried to recreate the build folder? (i.e. delete the build folder, run the CMake steps again).

Sometimes an obj file gets corrupted (rare compiler bug? RAM error? HDD error? CPU error? bus error? OS error?) causing a crash, and now when you try to build again it re-reads the corrupted intermediate files from the first time, causing a crash again; and the best course of action is to just wipe the corrupted files and start over.

I'm trying to see if there is a quick way to disable libraw but it doesn't look like there is. Raw file formats are rare, thus replacing that file with stub empty function definitions could work.

Alternatively do not compile FreeImage, and instruct Ogre to use stbimage instead (by setting OGRE_CONFIG_ENABLE_STBI to on).
Somtin wrote: Tue Apr 09, 2019 9:31 am ogre rev: 14132
ogredeps rev: 132
Please post the hashes of the commits, not their revision numbers because sadly those numbers are specific to your repo copy (honestly I think TortoiseHg makes a disservice by showing the rev numbers on their UI)
Somtin
Gnoblar
Posts: 10
Joined: Thu Nov 03, 2016 6:57 am
x 1

Re: [2.2] Unable to compile Ogre due to compiler crashing when compiling FreeImage

Post by Somtin »

dark_sylinc wrote: Wed Apr 10, 2019 4:02 pm Have you tried to recreate the build folder? (i.e. delete the build folder, run the CMake steps again).
Yes, tried that. I just tried to completely clean out both ogre and Dependencies repos and rebuild from that, and it seemed to work. There's no longer a FreeImage project in the Ogre solution, and so it seems it should work as that was the project that was failing! Debug succeeded so far, Release underway.

Dunno how that happened, cheers for the hints.
Post Reply