Project

General

Profile

MSVC 2003 internal compiler error

Added by Fulvio Senore almost 11 years ago

I use Visual Studio 2003 and I have a program that uses exiv2 v0.19 without problems.

Today I decided to test v0.21 and I was unable to build it. I get 3 error like the following:

e:\C_Prg\exiv2-0.21\src\value.hpp(1234) : fatal error C1001: INTERNAL COMPILER ERROR

when I compile exiv2lib. Moreover I had to define SUPPRESS_WARNINGS to avoid a lot of errors in TIFF handling files.

Do you think that it will be possible to build exiv2 with VS 2003 again?

Thanks in advance.

Fulvio Senore


Replies (12)

RE: MSVC 2003 internal compiler error - Added by Robin Mills almost 11 years ago

Fulvio

You're right. VS2003 dies on the code. How odd. Here's the message:

c:\gnu.master\exiv2\src\value.hpp(1234) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information

I've recently created the directory msvc64 which contains the build environment for VS2005/08/10 and builds for both 32bit and 64bit. Microsoft provide a free "Express" edition of Dev Studio. Can you use msvc64+Express instead of VS2003 to build exiv2lib? You should be able to build exiv2 with "Express" and link the binaries with VS2003 for your application development.

Robin

RE: MSVC 2003 internal compiler error - Added by Andreas Huggel almost 11 years ago

I have to admit that I didn't test with VS2003 before releasing 0.21. Will see if I can revive my old laptop and find out what's wrong.

Andreas

RE: MSVC 2003 internal compiler error - Added by Robin Mills almost 11 years ago

Andreas: Please don't spend time on this. I downloaded the free "Express" edition of DevStudio 2010 yesterday and built the libraries. I updated exiv2\msvc64\ReadMe.txt approporiately. Of course these notes are in SVN and not (yet) in the download.

Fulvio: Are you happy?

RE: MSVC 2003 internal compiler error - Added by Fulvio Senore almost 11 years ago

Robin: I can build exiv2 with a newer version of the compiler, but I suppose that from VS2003 I will only be able to link to a DLL version of the library.
I don't think that it will be possible to link exiv2 statically, am I right? This means that I would have to ship a dll together with the program: not a big problem, but I'd rather link everything statically to have a single executable.

I should have upgraded my copy of Visual Studio, but it looks like it is too late: I think that now it is only possible to buy VS 2010, but it creates programs that require at least Windows XP SP3. I'd rather create programs that run on older version of Windows. I should have bought VS 2008 when it was still available.

I don't know what causes VS 2003 to fail, but if it were easy to fix I think that it would be nice to do it. Another advantage of VS 2003 shows up if you need to build the release version with the default setting that requires runtime DLLs. VS 2003 is the last version that does not require the Visual C++ redistributable to be installed to run the program. With VS 2003 it is enough to have the runtime DLLs in the same folder as the program.
This is useful for a program that you run from a memory stick on many computers, for example: those programs are not installed so you cannot be sure that the host computers have the runtime installed.
There are hacks to circumvent this problem, but they are hacks.

Once I had the same problem in a program that uses boost smart pointers. I was able to solve it by splitting the source file in two different ones. It looks like VS 2003 cannot handle very complex situations when using templates, and splitting the file reduced the complexity of the compilation.

Anyway, I realize that you probably do not have much free time so it is probably best to use it for other purposes.

Fulvio

RE: MSVC 2003 internal compiler error - Added by Robin Mills almost 11 years ago

I think you'll be able to compile static libraries with VS2010 and link them from your VS2003 application. Have you tried this?

RE: MSVC 2003 internal compiler error - Added by Fulvio Senore almost 11 years ago

That would surprise me. Compiled code calls a lot of helper functions in the C++ runtime code, and that code is likely to have changed from version to version.

Anyway, I will try and I will report the result of the test.

Fulvio

RE: MSVC 2003 internal compiler error - Added by Andreas Huggel almost 11 years ago

Can you try to pinpoint exactly where the errors occur for each type of problem (that within SUPPRESS_WARNINGS is probably always the same)? For starters list the line for each problem, like in the first post above.
Some changes in the code between 0.20 (which I believe had been tested with VS2003) and 0.21 apparently trigger these. We may be able to find workarounds for this code, that has happened before.

Andreas

RE: MSVC 2003 internal compiler error - Added by Fulvio Senore almost 11 years ago

I installed an old VS 2008 trial and I built the library, then I linked that library to a VS 2003 program: the result was a lot of linker errors so mixing Visual Studio versions does not work for static linking.

I downloaded version 0.20 and I can confirm that it compiles OK with VS 2003.

Here is the full list of compilation errors, just let me know if you need more information or testing:

value.cpp
e:\C_Prg\exiv2-0.21\src\value.hpp(1234) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2708)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
tiffvisitor.cpp
\C_Prg\exiv2-0.21\src\tiffvisitor.cpp(1348) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffvisitor.cpp(1358) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffvisitor.cpp(1374) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffvisitor.cpp(1469) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffvisitor.cpp(1481) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffvisitor.cpp(1498) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffvisitor.cpp(1512) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
tiffcomposite.cpp
\C_Prg\exiv2-0.21\src\tiffcomposite.cpp(402) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffcomposite.cpp(411) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffcomposite.cpp(420) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffcomposite.cpp(439) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffcomposite.cpp(450) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffcomposite.cpp(469) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffcomposite.cpp(478) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
\C_Prg\exiv2-0.21\src\tiffcomposite.cpp(495) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'Exiv2::LogMsg' (or there is no acceptable conversion)
exif.cpp
e:\C_Prg\exiv2-0.21\src\value.hpp(1234) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2708)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
crwimage.cpp
e:\C_Prg\exiv2-0.21\src\value.hpp(1234) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2708)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information

RE: MSVC 2003 internal compiler error - Added by Andreas Huggel almost 11 years ago

Added a simple workaround for the internal compiler issue with r2414. The other one is a bit more tricky...

Andreas

RE: MSVC 2003 internal compiler error - Added by Fulvio Senore almost 11 years ago

I checked out SVN trunk and I have been able to compile the library after defining SUPPRESS_WARNINGS.

Thank you!

Fulvio

RE: MSVC 2003 internal compiler error - Added by Andreas Huggel almost 11 years ago

Good! r2415 also makes changes to the logging class, I believe it is more portable now but haven't tried with MSVC 2003 yet.
Can you please svn update and try once more without SUPPRESS_WARNINGS?

Andreas

RE: MSVC 2003 internal compiler error - Added by Fulvio Senore almost 11 years ago

I updated with svn and now I can compile without SUPPRESS_WARNING.

Thank you for your quick help!

Fulvio

    (1-12/12)