MantisBT - CMake
View Issue Details
0006303CMakeModulespublic2008-02-05 13:212010-05-10 19:56
jlblanco 
Miguel Figueroa 
normalmajorhave not tried
closedunable to reproduce 
 
 
0006303: Wrong generation of linker LIBs with FindwxWidgets in Windows
It seems that the string with the list of libraries to be linked is not well-formed. I attach two examples of what is obtained in two Windows machines, with wxWidgets downloaded and compiled from the sources, and using the same CMake project files.

In the example #1, the full paths appear in the list (e.g. \wxWidgets\lib\vc_lib\wxbase28.lib), where in the example 0000002 it appears "debug.lib" (which is not a library, probably a keyword in the list of wxwidgets libraries??) and next both "wxbase28d.lib" and "wxbase28.lib"...


The version of CMake are in both cases the latest binary build for windows available in the CMake page.


Thanks!

========================================================
LIST OF LIBRARIES IN PROJECT PROPERTIES->LINKER->INPUT:
 (IN MACHINE #1)
========================================================
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
\wxWidgets\lib\vc_lib\wxbase28.lib
\wxWidgets\lib\vc_lib\wxmsw28_core.lib
\wxWidgets\lib\vc_lib\wxpng.lib
\wxWidgets\lib\vc_lib\wxtiff.lib
\wxWidgets\lib\vc_lib\wxjpeg.lib
\wxWidgets\lib\vc_lib\wxzlib.lib
\wxWidgets\lib\vc_lib\wxregex.lib
\wxWidgets\lib\vc_lib\wxexpat.lib
winmm.lib
comctl32.lib
rpcrt4.lib
wsock32.lib
/wxWidgets/lib/vc_lib/wxbase28.lib.lib
\wxWidgets\lib\vc_lib\wxmsw28_gl.lib
opengl32.lib
glu32.lib


========================================================
LIST OF LIBRARIES IN PROJECT PROPERTIES->LINKER->INPUT:
 (IN MACHINE 0000002)
========================================================
$(NOINHERIT) kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib wxbase28.lib wxmsw28_core.lib wxpng.lib wxtiff.lib wxjpeg.lib wxzlib.lib wxregex.lib wxexpat.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib ***debug.lib*** wxbase28d.lib wxbase28.lib wxmsw28_core.lib wxmsw28_gl.lib wxpng.lib wxtiff.lib wxjpeg.lib wxzlib.lib wxregex.lib wxexpat.lib opengl32.lib glu32.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib


No tags attached.
txt libs.txt (2,492) 2008-02-07 11:12
https://public.kitware.com/Bug/file/1302/libs.txt
Issue History
2008-02-05 13:21jlblancoNew Issue
2008-02-06 10:20Bill HoffmanStatusnew => assigned
2008-02-06 10:20Bill HoffmanAssigned To => Miguel Figueroa
2008-02-06 22:00Miguel FigueroaNote Added: 0010408
2008-02-07 11:12jlblancoFile Added: libs.txt
2008-02-07 11:12jlblancoNote Added: 0010422
2008-12-24 01:54Miguel FigueroaNote Added: 0014433
2009-04-07 10:19Miguel FigueroaNote Added: 0015952
2009-04-07 10:19Miguel FigueroaStatusassigned => feedback
2009-04-08 12:40jlblancoNote Added: 0015965
2010-05-10 19:56Miguel FigueroaStatusfeedback => closed
2010-05-10 19:56Miguel FigueroaResolutionopen => unable to reproduce

Notes
(0010408)
Miguel Figueroa   
2008-02-06 22:00   
jlblanco,

Did you by any chance upgrade the CMake version and didn't start to in a clean directory at machine 2?

I don't see why it would be different if the machines have the same specs... Unless there was garbage in one of the build directories and not the other.

Try to start in a empty directory and let me know if it works.

--Miguel
(0010422)
jlblanco   
2008-02-07 11:12   
Hello Miguel,

I attach a file (libs.txt) with the contents of both debug/release libraries generated by CMake after removing all old files, CMakeCache.txt, etc... Still different outputs are obtained for each Windows machine.

In both machines wxWidgets has been compiled from the sources in Debug and Release configurations. The only difference I've found is a different version of CMake: 2.5-20070907 & 2.5-20080130. However, both generate wrong library lists.

Tell me if we can provide you more information.

PS: In Linux everything is generated OK
(0014433)
Miguel Figueroa   
2008-12-24 01:54   
jlblanco,

Has this been solved for newer versions of CMake?

If not, could you update your Modules and remove the comments in the debugging macros at the top of the FindwxWidgets.cmake module:

MACRO(DBG_MSG _MSG)
  MESSAGE(STATUS
    "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
ENDMACRO(DBG_MSG)
MACRO(DBG_MSG_V _MSG)
  MESSAGE(STATUS
    "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
ENDMACRO(DBG_MSG_V)

Then run cmake on your project and post the output here.

--Miguel
(0015952)
Miguel Figueroa   
2009-04-07 10:19   
Will close this soon if I can't reproduce it. Please, provide the feedback requested, so that I can debug this issue.
(0015965)
jlblanco   
2009-04-08 12:40   
Dear Miguel,

It works nicely since a few cmake versions ago, sorry for keeping this open, and thanks a lot for maintaining the module.

Gracias!