View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015563 | CMake | CMake | public | 2015-05-12 06:18 | 2016-06-10 14:31 | ||||
Reporter | Alex Lamaison | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | sometimes | ||||
Status | closed | Resolution | moved | ||||||
Platform | Windows | OS | OS Version | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015563: ABI failures are not treated as a fatal error | ||||||||
Description | With Visual Studio 2005/2008 ABI detection sometimes fails because the path to the source file is too long. When that happens, CMake continues configuring and doesn't treat it as a fatal error. Shouldn't building be aborted if ABI tests fail? What effect might it have on the binaries that are built? | ||||||||
Steps To Reproduce | Install CMake at the default location. Create a CMake project at a directory several steps down from C:\, e.g C:\Users\MyUsername\Project\My\Project. Configure the project with CMake to use Visual Studio 2005 or 2008 as generator. Observe log output like: 1>-- The C compiler identification is MSVC 14.0.50727 1>-- The CXX compiler identification is MSVC 14.0.50727 1>-- Check for working C compiler using: Visual Studio 8 2005 Win64 1>-- Check for working C compiler using: Visual Studio 8 2005 Win64 -- works 1>-- Detecting C compiler ABI info 1>-- Detecting C compiler ABI info - failed 1>-- Check for working CXX compiler using: Visual Studio 8 2005 Win64 1>-- Check for working CXX compiler using: Visual Studio 8 2005 Win64 -- works 1>-- Detecting CXX compiler ABI info 1>-- Detecting CXX compiler ABI info - failed Observe that configuration continues after the ABI check failure and reports success. The only way to notice that ABI detection failed is to grep the log. | ||||||||
Additional Information | The reason the ABI step fails with older visual studio is that CMake adds the full path to CMakeCXXCompilerABI.cpp as a RelativePath in the VS project. For example, "C:\Program Files (x86)\CMake\share\cmake-3.2\Modules\CMakeCXXCompilerABI.cpp". Visual Studio converts all paths to be relative to the build directory. Assuming a build path of "C:\Users\MyUsername\Project\My\Project\bin", VS tries to open "..\..\..\..\..\Program Files (x86)\CMake\share\cmake-3.2\Modules\CMakeCXXCompilerABI.cpp" and fails because this is longer than Windows path limits. A workaround for this would be for CMake to copy CMakeCXXCompilerABI.cpp to the binary directory, the way it does for the source file it uses to determine if the compiler is working. See https://github.com/ruslo/hunter/issues/121#issuecomment-101219535 [^] for more history on this issue. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0038740) Brad King (manager) 2015-05-12 08:34 |
When the ABI detection logic was first added it was deemed optional in the sense that it was not known to work on all toolchains for all platforms. This is why it is not a hard error. If anyone wants to work on this, perhaps it could be made a hard error on platform where it is known to work normally. The compiler id detection logic already places its source file in the build tree. The later steps of checking for a working compiler and detecting the ABI could be taught to do this also. |
(0042776) Kitware Robot (administrator) 2016-06-10 14:29 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-05-12 06:18 | Alex Lamaison | New Issue | |
2015-05-12 08:34 | Brad King | Note Added: 0038740 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042776 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |