使用Cygwin(64位)安装cmake,有问题

时间:2014-02-08 09:51:19

标签: cygwin cmake install

当我输入

$ ./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 个答案:

答案 0 :(得分:2)

这是在x86_64端口中删除的已弃用的Cygwin API。虽然您可以使用current equivalent解决此问题,但我建议找到更广泛的补丁集here

答案 1 :(得分: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;
  }