Hi Alan
I have cured the actual link errors - I was trying to link 64 bit tcl libraries 
into 32 bit plplot examples - obviously it didn't work.

The only real issue left is the appended .lib outside the quotes. I can't find 
if that is something that we do or something that CMake does. I expected to 
find a TARGET_LINK_LIBRARIES call with either items from DRIVERS_LINK_FLAGS or 
ntk_LINK_FLAGS somewhere, but I can't find it.

Phil
 
 From: phil rosenberg <philip_rosenb...@yahoo.com>
To: Alan W. Irwin <ir...@beluga.phys.uvic.ca> 
Cc: PLplot development list <plplot-devel@lists.sourceforge.net> 
Sent: Friday, 29 August 2014, 0:18
Subject: Re: [Plplot-devel] tcl build problem
  


Hi Alan
I found the same location in the file you specified between checking emails. I 
have been through and added the \" where appropriate to the various (rpath, 
compile, linker) flags. This allows me to compile, but I am getting linker 
errors in the examples, because the linker flags are ending up as
"C:/Program Files/Tcl/lib/tcl86.lib".lib
I'm not sure where the extra .lib is appearing from. If I fix this manually I 
then get further linker errors which seem to be name decoration static vs 
dynamic library issues. I will have to figure those out on my system. 
 
 From: Alan W. Irwin <ir...@beluga.phys.uvic.ca>
To: Phil Rosenberg <philip_rosenb...@yahoo.com> 
Cc: PLplot development list <plplot-devel@lists.sourceforge.net> 
Sent: Thursday, 28 August 2014, 21:29
Subject: RE: [Plplot-devel] tcl build problem
  

On 2014-08-28 20:33+0100 Phil Rosenberg wrote:

> Hi Alan

> Given what you said I did a quick google for cmake paths spaces and
immediately found this post
http://stackoverflow.com/questions/9964775/using-cmakes-include-directories-command-with-white-spaces.
Seems the issue is the same there and is a result of the find modules
assuming no whitespace. I'll see if I can work out where the
 quotes
should go and if not then I'll uninstall and reinstall tcl I guess.

Hi Phil:

I mostly agree with everything I read at that stackoverflow site but
compile flags are a special case where the result must be a blank
delimited string (as opposed to a CMake list).

Looking further (in cmake/modules/tk.cmake) the culprit appears to be
the command

set(ntk_COMPILE_FLAGS "-I${TCL_INCLUDE_PATH} ${TKLIB_COMPILE_FLAGS}")

(where it just happens -I${TCL_INCLUDE_PATH} and
${TKLIB_COMPILE_FLAGS} refer to the same thing on your system, but on
other systems they can be different and the repeat duplicate -I
options should not be an issue on your system.

When faced with CMake logic issues, it is always a good
idea to make a few-line file to test out possibilities.

In this case my test file (test.cmake) reads

# Note the quotes which keep TCL_INCLUDE_PATH and TKLIB_COMPILE_FLAGS 
# from
 being lists.  I think these represent the CMake variables
# exactly on your system.
set(TCL_INCLUDE_PATH "C:/Program Files/Tcl/include")
set(TKLIB_COMPILE_FLAGS "-IC:/Program Files/Tcl/include")

#Wrong (as currently the case in cmake/modules/tk.cmake)
set(ntk_COMPILE_FLAGS "-I${TCL_INCLUDE_PATH} ${TKLIB_COMPILE_FLAGS}")
message(STATUS "wrong ntk_COMPILE_FLAGS = ${ntk_COMPILE_FLAGS}")
#Right (I hope)
set(ntk_COMPILE_FLAGS "\"-I${TCL_INCLUDE_PATH}\" \"${TKLIB_COMPILE_FLAGS}\"")
message(STATUS "right ntk_COMPILE_FLAGS = ${ntk_COMPILE_FLAGS}")

and you run it like this:

irwin@raven> cmake -P test.cmake
-- wrong ntk_COMPILE_FLAGS = -IC:/Program Files/Tcl/include -IC:/Program 
Files/Tcl/include
-- right ntk_COMPILE_FLAGS = "-IC:/Program Files/Tcl/include" "-IC:/Program 
Files/Tcl/include"

I suggest you change cmake/modules/tk.cmake to
 conform to the second
form, and then observe (via the VERBOSE=1 option on nmake) the
resulting build command.  My hope is that one string with
blank-separated entities that are themselves quoted using escaped
quotes (the "right" version above) will force CMake to generate
compile options of either

"-IC:/Program Files/Tcl/include" "-IC:/Program Files/Tcl/include"

or

-IC:/Program Files/Tcl/include -IC:/Program Files/Tcl/include

But let me know what the VERBOSE=1 nmake option tells you
about the actual build command that results from the above
change.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project
 (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to