[CMake] cmake-2.8.7 crash on cygwin
marco atzeri
marco.atzeri at gmail.com
Thu Aug 9 06:57:26 EDT 2012
On 8/8/2012 10:48 PM, marco atzeri wrote:
> Hi,
> trying to build vtk-5.10.0-1 with cygwin cmake-2.8.7,
> cmake crashes building vtkUnicodeCaseFoldData.h
>
>
> $ cmake -P vtkUnicodeString.cmake
> Aborted (core dumped)
>
> leaving an almost empty
>
> $ cat vtkUnicodeCaseFoldData.h
> // Generated file, do not edit by hand!
>
> static vtkUnicodeString::value_type vtkUnicodeCaseFoldData[] = {
> -----------------------------------------------------------------
>
> cmake crash on cygwin-1.7.15 , 1.7.16 and latest snapshot
> so it could be a cmake bug.
>
> If someone want to test or investigate, I uploaded files, strace
> and stackdump on
>
> http://matzeri.altervista.org/works/cmake/
>
> Regards
> Marco
using cmake-2.8.8-2 from
http://sourceware.org/cygwinports/
I have no crash, so or it is a bug solved in 2.8.8
or attached Yaakov's patch solve the issue.
Bill,
could you look on it for the next 2.8.9 cygwin package ?
Regards
Marco
-------------- next part --------------
--- origsrc/cmake-2.8.8/Source/kwsys/SystemTools.cxx 2012-04-18 13:10:54.000000000 -0500
+++ src/cmake-2.8.8/Source/kwsys/SystemTools.cxx 2012-07-11 05:42:36.768957300 -0500
@@ -73,13 +73,6 @@
// Windows API.
#if defined(_WIN32)
# include <windows.h>
-#elif defined (__CYGWIN__)
-# include <windows.h>
-# undef _WIN32
-#endif
-
-#ifdef __CYGWIN__
-extern "C" void cygwin_conv_to_win32_path(const char *path, char *win32_path);
#endif
// getpwnam doesn't exist on Windows and Cray Xt3/Catamount
@@ -876,7 +869,7 @@ bool SystemTools::SameFile(const char* f
}
//----------------------------------------------------------------------------
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
static bool WindowsFileExists(const char* filename)
{
WIN32_FILE_ATTRIBUTE_DATA fd;
@@ -891,15 +884,7 @@ bool SystemTools::FileExists(const char*
{
return false;
}
-#if defined(__CYGWIN__)
- // Convert filename to native windows path if possible.
- char winpath[MAX_PATH];
- if(SystemTools::PathCygwinToWin32(filename, winpath))
- {
- return WindowsFileExists(winpath);
- }
- return access(filename, R_OK) == 0;
-#elif defined(_WIN32)
+#if defined(_WIN32)
return WindowsFileExists(filename);
#else
return access(filename, R_OK) == 0;
@@ -919,26 +904,6 @@ bool SystemTools::FileExists(const char*
}
//----------------------------------------------------------------------------
-#ifdef __CYGWIN__
-bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
-{
- SystemToolsTranslationMap::iterator i =
- SystemTools::Cyg2Win32Map->find(path);
-
- if (i != SystemTools::Cyg2Win32Map->end())
- {
- strncpy(win32_path, i->second.c_str(), MAX_PATH);
- }
- else
- {
- cygwin_conv_to_win32_path(path, win32_path);
- SystemToolsTranslationMap::value_type entry(path, win32_path);
- SystemTools::Cyg2Win32Map->insert(entry);
- }
- return win32_path[0] != 0;
-}
-#endif
-
bool SystemTools::Touch(const char* filename, bool create)
{
if(create && !SystemTools::FileExists(filename))
@@ -3702,7 +3667,7 @@ bool SystemTools::LocateFileInDir(const
bool SystemTools::FileIsFullPath(const char* in_name)
{
kwsys_stl::string name = in_name;
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
// On Windows, the name must be at least two characters long.
if(name.length() < 2)
{
@@ -4520,9 +4485,6 @@ bool SystemTools::ParseURL( const kwsys_
unsigned int SystemToolsManagerCount;
SystemToolsTranslationMap *SystemTools::TranslationMap;
SystemToolsTranslationMap *SystemTools::LongPathMap;
-#ifdef __CYGWIN__
-SystemToolsTranslationMap *SystemTools::Cyg2Win32Map;
-#endif
// SystemToolsManager manages the SystemTools singleton.
// SystemToolsManager should be included in any translation unit
@@ -4568,9 +4530,6 @@ void SystemTools::ClassInitialize()
// Allocate the translation map first.
SystemTools::TranslationMap = new SystemToolsTranslationMap;
SystemTools::LongPathMap = new SystemToolsTranslationMap;
-#ifdef __CYGWIN__
- SystemTools::Cyg2Win32Map = new SystemToolsTranslationMap;
-#endif
// Add some special translation paths for unix. These are not added
// for windows because drive letters need to be maintained. Also,
@@ -4625,9 +4584,6 @@ void SystemTools::ClassFinalize()
{
delete SystemTools::TranslationMap;
delete SystemTools::LongPathMap;
-#ifdef __CYGWIN__
- delete SystemTools::Cyg2Win32Map;
-#endif
}
--- origsrc/cmake-2.8.8/Source/kwsys/SystemTools.hxx.in 2012-04-18 13:10:54.000000000 -0500
+++ src/cmake-2.8.8/Source/kwsys/SystemTools.hxx.in 2012-07-11 17:42:52.097828100 -0500
@@ -277,15 +277,6 @@ public:
static bool FileExists(const char* filename);
/**
- * Converts Cygwin path to Win32 path. Uses dictionary container for
- * caching and calls to cygwin_conv_to_win32_path from Cygwin dll
- * for actual translation. Returns true on success, else false.
- */
-#ifdef __CYGWIN__
- static bool PathCygwinToWin32(const char *path, char *win32_path);
-#endif
-
- /**
* Return file length
*/
static unsigned long FileLength(const char *filename);
@@ -883,9 +874,6 @@ private:
*/
static SystemToolsTranslationMap *TranslationMap;
static SystemToolsTranslationMap *LongPathMap;
-#ifdef __CYGWIN__
- static SystemToolsTranslationMap *Cyg2Win32Map;
-#endif
friend class SystemToolsManager;
};
More information about the CMake
mailing list