2014-02-08 67 views
3

當I型使用Cygwin(64位)安裝CMake,具有問題

$ ./bootstrap 

我有一些錯誤:

SystemTools.o:SystemTools.cxx:(.text+0xaf2): undefined reference to `cygwin_conv _to_win32_path' 
SystemTools.o:SystemTools.cxx:(.text+0xaf2): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `cygwin_conv_to_win32_path' 
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld: SystemTools.o: bad reloc address 0x0 in section `.pdata$_ZStanSt12_Ios_IostateS_' 
collect2: error: ld returned 1 exit status 
Makefile:2: recipe for target 'cmake' failed 
make: *** [cmake] Error 1 
--------------------------------------------- 
Error when bootstrapping CMake: 
Problem while running make 
--------------------------------------------- 
Log of errors: /home/cmake-2.8.12/Bootstrap.cmk/cmake_bootstrap.log 

回答

2

這是已在x86_64的端口落下棄用Cygwin的API 。雖然你可以通過使用current equivalent來解決這個問題,但我建議你找一個更廣泛的補丁集,找到here

+0

嘿亞科夫,非常感謝你的回覆。你能否詳細解釋我需要做些什麼來改變路徑。我對Cygwin和Cmake很新,這個問題困擾了我很長一段時間。你的幫助真的很感激。再次感謝你。 – user3286827

0

解決了這個問題。我認爲這個問題與一些if_else條件有關,這些條件與其他環境(如POSIX,FreeBSD)的一些設置有關。我不是專家,所以在命中和審判中,我在文件LSDynaFamily.cxx中評論了一些行。

行號44:

//return stat64(fname,&s); 

的行數227起,修改爲如下部分:

//#elif USE_STAT_64 
    //struct stat64 st; 

Part of line number 240: 
#if defined (WIN32) && VTK_SIZEOF_ID_TYPE==8 
    struct __stat64 st; 
//#elif USE_STAT_64 
    //struct stat64 st; 
#else 
    struct stat st; 
#endif 
    while (tryAdapt >= 0) 
    { 
    tmpFile = vtkLSGetFamilyFileName(this->DatabaseDirectory.c_str(), 
             this->DatabaseBaseName, 
             adaptLevel, 
             filenum); 
    /* if (LS_DYNA_STAT(tmpFile.c_str(), st) == 0) 
     { 
     if (adapted) 
     { 
     this->Adaptations.push_back((int)this->Files.size()); 
     adapted = false; 
     } 
     this->Files.push_back(tmpFile); 
     this->FileSizes.push_back(st.st_size); 
     this->FileAdaptLevels.push_back(adaptLevel); 
     tryAdapt = 1; 
     ++filenum; 
     } 
    else 
     {*/ 
     --tryAdapt; 
     ++adaptLevel; 
     filenum = 0; 
     adapted = true; 
    // } 
    } 
    return this->Files.size() == 0; 
    }