Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000300 [ogre] Build/Compilation Errors minor have not tried 2010-03-10 13:36 2010-04-24 15:21
Reporter sinbad View Status public  
Assigned To CABAListic
Priority normal Resolution open  
Status assigned   Product Version
Summary 0000300: CMake picks up debug dependencies for release build if release versions are not available
Description http://www.ogre3d.org/forums/viewtopic.php?f=4&t=56168 [^]

Apparently on Windows if the user has only built the debug dependencies, CMake will pick those up for the release build too which causes errors at runtime. The dependencies affected are:

Dependencies\lib\debug\OIS_d.lib
Dependencies\lib\debug\freetype2311_D.lib
Dependencies\lib\debug\FreeImaged.lib
Dependencies\lib\debug\zziplibd.lib
Dependencies\lib\debug\zlibd.lib
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000498)
CABAListic (developer)
2010-03-25 11:11

Fixing this is unfortunately very non-trivial. We could have CMake generate errors if release libraries are not present, but this would completely stop the VS solution generation, so you couldn't even do a pure debug build.
The alternative is to not link release builds against the debug builds, but this means that you will get linking errors. That's only slightly better than a runtime error, particularly because it won't be quite clear that it's a case of missing libraries.
(0000499)
sinbad (administrator)
2010-03-25 11:23

I actually think stopping the generation process is the right action to take, since building everything like that will cause weird run-time errors.
(0000500)
CABAListic (developer)
2010-03-25 12:09

Perhaps, but as I said, stopping the generation process will make it impossible to do a debug build (which would be possible otherwise, after all the debug libraries are fine).

Even more so, the reverse case could also apply to Visual Studio (i. e. release libraries are present, but no debug libraries) as this might also mix up incompatible MSVC runtimes. This is, however, even worse to fix because different compilers often don't have separate runtimes and may not have dedicated debug versions of most libraries (particularly true on Unix). Therefore the behaviour to pickup release libraries for debug builds is actually correct and necessary.

I wonder if it might be preferable to only issue a warning in CMake if MSVC is used and if we didn't find both debug and release libraries for some dependencies. This may not be foolproof, but at least it doesn't break for people who might actually only be interested in one kind of build.
(0000501)
sinbad (administrator)
2010-03-25 13:12

Sure, but I can't imagine it being at all useful to just be able to build debug libraries, and for release libraries to randomly fail when you inevitably try to build them.

But I take your point about the reverse case. Maybe a warning if both aren't found for MSVC is a good enough solution as you suggest.

- Issue History
Date Modified Username Field Change
2010-03-10 13:36 sinbad New Issue
2010-03-25 11:11 CABAListic Note Added: 0000498
2010-03-25 11:23 sinbad Note Added: 0000499
2010-03-25 12:09 CABAListic Note Added: 0000500
2010-03-25 13:12 sinbad Note Added: 0000501
2010-04-24 15:21 sinbad Status new => assigned
2010-04-24 15:21 sinbad Assigned To => CABAListic


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker