[Insight-developers] compilation error with msvc 8.0

thiago.oliveira at istb.unibe.ch thiago.oliveira at istb.unibe.ch
Tue Jun 19 05:04:55 EDT 2012


Hi Brad,

Thank you for your help!

We have unchecked the CMAKE_USE_RELATIVE_PATHS so case 1) is fixed. However, we still get the error. We are not in case 2) either, since the relative path with \.. is matching with the build tree.

We have tried to change the flag from the ITK project to zero CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=0, but it did not help either. We still get a lot of the relative path stuff \..\. You can take a look at the error below.

I am compiling on VS 2005. And, I have seen it has a bug with big relative path strings. I was wondering if the 2008 had this bug fixed?!! Would you have any other suggestion??

Thank you in advance!

Best regards,
Thiago

1>------ Build started: Project: gdcmDSED, Configuration: Debug Win32 ------
1>Compiling...
1>gdcmVR16ExplicitDataElement.cxx
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\..\..\..\..\..\ITK\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition\gdcmVR16ExplicitDataElement.cxx': No such file or directory
1>gdcmExplicitImplicitDataElement.cxx
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\..\..\..\..\..\ITK\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition\gdcmExplicitImplicitDataElement.cxx': No such file or directory
1>gdcmCP246ExplicitDataElement.cxx
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\..\..\..\..\..\ITK\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition\gdcmCP246ExplicitDataElement.cxx': No such file or directory
1>gdcmUNExplicitImplicitDataElement.cxx
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\..\..\..\..\..\ITK\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition\gdcmUNExplicitImplicitDataElement.cxx': No such file or directory
1>Generating Code...
1>Build log was saved at "file://d:\Libraries\CrisalixGit\ExternalProject\ITK-build\Modules\ThirdParty\GDCM\src\gdcm\Source\DataStructureAndEncodingDefinition\gdcmDSED.dir\Debug\BuildLog.htm"
1>gdcmDSED - 4 error(s), 0 warning(s)
2>------ Build started: Project: itkTestDriver, Configuration: Debug Win32 ------
2>Performing Pre-Link Event...
2>Linking...
2>LINK : fatal error LNK1104: cannot open file '..\..\..\..\lib\Debug\itkgdcmDSED-4.2.lib'
2>Build log was saved at "file://d:\Libraries\CrisalixGit\ExternalProject\ITK-build\Modules\Core\TestKernel\src\itkTestDriver.dir\Debug\BuildLog.htm"
2>itkTestDriver - 1 error(s), 0 warning(s)
3>------ Skipped Build: Project: ITKHeaderTests, Configuration: Debug Win32 ------
3>Project not selected to build for this solution configuration
4>------ Skipped Build: Project: PACKAGE, Configuration: Debug Win32 ------
4>Project not selected to build for this solution configuration
5>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
5>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 2 failed, 211 up-to-date, 3 skipped ==========


From: Arnaud Gelas [mailto:arnaudgelas at gmail.com]
Sent: Montag, 18. Juni 2012 17:24
To: Brad King
Cc: Insight-developers at itk.org; Oliveira Dos Santos, Thiago (ISTB)
Subject: Re: [Insight-developers] compilation error with msvc 8.0

Brad,

We were in the case 1) and we wrongly assumed that was also fixed for previous versions of microsoft visual studio.

We are now recompiling by turning OFF CMAKE_USE_RELATIVE_PATHS.

Thanks for the link with respect to the VS 10 issues, interesting to learn about it!

Thanks,
Arnaud
On Mon, Jun 18, 2012 at 5:00 PM, Brad King <brad.king at kitware.com<mailto:brad.king at kitware.com>> wrote:
On 06/18/2012 09:40 AM, Arnaud Gelas wrote:
>      http://www.itk.org/pipermail/insight-developers/2011-March/017812.html
>
> These errors occurred with a recent version of cmake (2.8.8), so I am a
> little confused here.
The underlying problem is that VS does this with a relative path:

 c:\path\to\directory\with\project\file\..\..\..\relative\path\on\top\of\that\to\source.cpp

and then fails when the total string is over 250 characters or so
even though the collapsed full path would be well under the limit.

This is only a problem when CMake stores relative paths in the
project files, but we normally prefer full paths.  AFAIK for
VS 8 CMake stores relative paths under only two circumstances:

(1) The unsupported option CMAKE_USE_RELATIVE_PATHS is on.

(2) The sequence of "..\" is not long enough to escape the
   top-level of the build tree (CMAKE_BINARY_DIR).

Is either of these the case for your build?

----------------------------------------------------------------------
FYI, the fix referenced in the thread you linked was for VS 10 only:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed0075bd

There is a lot more to it as covered here:

 http://www.cmake.org/Bug/view.php?id=12570

but that should not affect VS 8.  There is extra trouble with VS 10
because it has one bug for relative paths and another bug for full
paths.

-Brad

________________________________
eMail ist virenfrei.
Von AVG überprüft - www.avg.de<http://www.avg.de>
Version: 2012.0.2177 / Virendatenbank: 2433/5076 - Ausgabedatum: 17.06.2012
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20120619/dbb48215/attachment.htm>


More information about the Insight-developers mailing list