[vtkusers] VTK-6.1 and Visual Studio 2013 on VirtualBox

David Gobbi david.gobbi at gmail.com
Thu Apr 2 19:16:54 EDT 2015


Hi Philippe,

I suppose my advantage is that I've used cmake enough that I trust it, so
when I get a massive build failure, I suspect the compiler ;)  For example,
I've run into situations very similar to yours on linux because I forgot to
install some devel package.

No, cmake doesn't check anything except whether the TryCompile failed
or succeeded (unfortunately).  I can see that if it fails for silly reasons
like
path length, it would be nice if it said so!

As an aside, I've switched to using ninja for all my MSVC builds, because
it really cuts down on the build time.  Especially for my Win7 machine,
which
is just an old VM on a really, really old linux box.

 - David


On Thu, Apr 2, 2015 at 4:50 PM, Philippe Bouttefroy <pbouttefroy at nvidia.com>
wrote:

>  Hi David,
>
>
>
> Thank you so much! This put me on the right track. So, here we go - don't
> laugh ;) because I've spend about 2 days trying to figure out what's going
> on (and I could have spent more time without your help):
>
>
>
> C:\Program Files
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(308,5):
> error MSB3491: Could not write lines to file
> "cmTryCompileExec1051036387.dir\Debug\cmTryCom.F2889911.tlog\cmTryCompileExec1051036387.lastbuildstate".
> The specified path, file name, or both are too long. The fully qualified
> file name must be less than 260 characters, and the directory name must be
> less than 248 characters.
>
>
>
> This had nothing to do with my VM at all. I was thinking: is there a way
> to detect this kind of issues in CMake? But I assume that CMake only gets
> the result of compilation, and does not care too much about the cause.
>
>
>
> In any case, thank you so much!
>
>
>
> Best,
>
> Philippe
>
>
>
> *From:* David Gobbi [mailto:david.gobbi at gmail.com]
> *Sent:* Thursday, April 02, 2015 2:35 PM
> *To:* Philippe Bouttefroy
> *Cc:* vtkusers at vtk.org
>
> *Subject:* Re: [vtkusers] VTK-6.1 and Visual Studio 2013 on VirtualBox
>
>
>
> This might be a silly question, but has this VS2013 installation built
> anything
>
> other than VTK?  Check the file CMakeFiles/CMakeError.log, it might provide
>
> some clues (e.g. maybe a TryCompile failed when it shouldn't have.)
>
>
>
>  - David
>
>
>
> On Thu, Apr 2, 2015 at 2:54 PM, Philippe Bouttefroy <
> pbouttefroy at nvidia.com> wrote:
>
> Hi David, hi Ben,
>
> Thanks for looking into the issue! Unfortunately, CMake 2.8.12 did not
> resolve my issue. I can send the CMake output, if you would like.
>
> However, what I observed is that the first errors that I get with VS2013
> is that it is looking for <iostream.h> instead of <iostream> (in
> /build/Utilities/KWSys/ios/iostream) because vtksys_IOS_USE_ANSI is not
> set. Furthermore, CMake outputs:
> "Checking whether ANSI stream headers are available - no". I would have
> expected "yes" instead. I tried to dig into how the value was determined
> but could not figure it out.
>
> Do you have any clue on whether this is the root cause of my issue? Any
> idea on how to debug this?
>
> Again, thanks for your time!
>
> Best,
> Philippe
>
>
> -----Original Message-----
> From: Ben Boeckel [mailto:ben.boeckel at kitware.com]
> Sent: Thursday, April 02, 2015 1:49 PM
> To: David Gobbi
> Cc: Philippe Bouttefroy; vtkusers at vtk.org
> Subject: Re: [vtkusers] VTK-6.1 and Visual Studio 2013 on VirtualBox
>
> On Thu, Apr 02, 2015 at 12:50:10 -0600, David Gobbi wrote:
> > Hi Philippe,
> >
> > Around a year ago, I did a 64-bit build of VTK 6.1 (or thereabouts)
> > with Visual Studio 2013 Express on Win7-64 running on VirtualBox.  I
> > didn't run into any errors like the one you describe above.
> >
> >
> > I suspect that all the errors are related to this:
> >
> >   CMake Warning (dev) at Utilities/KWSys/vtksys/CMakeLists.txt:264
> >   (CONFIGURE_FILE):
> >     configure_file called with unknown argument(s): COPY_ONLY
> >
> > You're using a version of CMake 3.x that expects cmake files to use
> > COPYONLY instead of the older COPY_ONLY.  Try cmake 2.8.12, and I bet
> > the problem will disappear.
>
> This isn't an error but a warning. CMake 3 is informing that COPY_ONLY is
> no longer supported.
>
> > Does anyone else know why CMake 3 would be giving this error?  It
> > seems like a nasty bit of backwards-incompatibility.
>
> The real problems are probably pointed out by CMP0054. Places which
> check:
>
>     set(compiler "MSVC")
>     if (compiler STREQUAL "MSVC")
>
> turn into:
>
>     if (MSVC STREQUAL 1)
>
> and are therefore *false* because MSVC is defined as "1" with it and not
> defined otherwise and "if" automatically dereferences. The new behavior is
> that quoted strings are not considered for automatic expansion thereby
> pointing out probable errors in the previous code. My guess is that MSVC
> detection needed is being skipped somewhere because of the bugs pointed out
> (*not* caused) by CMP0054.
>
> --Ben
>
>     ------------------------------
>  This email message is for the sole use of the intended recipient(s) and
> may contain confidential information.  Any unauthorized review, use,
> disclosure or distribution is prohibited.  If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message.
>  ------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150402/e06dd0e0/attachment.html>


More information about the vtkusers mailing list