【问题标题】:cygwin64 :: ./configure returns "configure: exit 77"cygwin64 :: ./configure 返回“配置:退出 77”
【发布时间】:2020-06-13 14:47:03
【问题描述】:

我已经安装了Cygwin64,现在我想安装extundelete

所以我下载了它,解压缩了文件,但是当我运行./configure 时它说:

$ ./configure
Configuring extundelete 0.2.4
configure: error: in `/cygdrive/c/Users/franc/Desktop/extundelete-0.2.4':
configure: error: C++ compiler cannot create executables
See `config.log' for more details

所以我打开config.log 文件,发现一些错误:

configure:2876: $? = 0
configure:2865: CC -v >&5
Using built-in specs.
COLLECT_GCC=CC
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/9.2.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-9.2.0-2.x86_64/src/gcc-9.2.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-9.2.0-2.x86_64/src/gcc-9.2.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
gcc version 9.2.0 (GCC) 
configure:2876: $? = 0
configure:2865: CC -V >&5
CC: error: unrecognized command line option '-V'
CC: fatal error: no input files
compilation terminated.
configure:2876: $? = 1
configure:2865: CC -qversion >&5
CC: error: unrecognized command line option '-qversion'; did you mean '--version'?
CC: fatal error: no input files
compilation terminated.
configure:2876: $? = 1
configure:2896: checking whether the C++ compiler works
configure:2918: CC    conftest.cpp  >&5
CC: fatal error: cannot execute 'cc1plus': spawn: No such file or directory
compilation terminated.
configure:2922: $? = 1
configure:2960: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "extundelete"
| #define PACKAGE_TARNAME "extundelete"
| #define PACKAGE_VERSION "0.2.4"
| #define PACKAGE_STRING "extundelete 0.2.4"
| #define PACKAGE_BUGREPORT "extundelete.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "extundelete"
| #define VERSION "0.2.4"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2965: error: in `/cygdrive/c/Users/franc/Desktop/extundelete-0.2.4':
configure:2967: error: C++ compiler cannot create executables
See `config.log' for more details

.log 文件以 configure: exit 77 结尾

是否可以在 Cygwin64 中编译文件?

【问题讨论】:

  • 配置输出看起来不像 CMake 生成的输出。为什么要使用cmake 标签?
  • @Tsyvarev,我应该改用什么命令?输出比较长,要全部 >200 行吗?
  • 我不是说你使用了错误的命令。我问你为什么使用cmake 标签来回答你的问题。这个标签与问题有什么关系?
  • extundelete 是一个可以从 ext3 或 ext4 分区恢复已删除文件的实用程序。为什么要安装在 cygwin 上?
  • 不要在 Windows 主目录下构建。从C:\Users\franc 继承的权限可以拧紧构建过程所需的执行权限。使用/home/franc/usr/src 目录。 PS:当然可以在Cygwin 64bit下搭建;您认为这些软件包是如何构建的?

标签: gcc makefile cmake cygwin configure


【解决方案1】:

您的构建问题可能是由于从C:\Users\franc 继承的权限导致构建过程所需的执行权限。
使用/home/franc/usr/src 目录或其他类似目录。
在 Windows 主目录下构建 NOT

很遗憾,由于其他原因,您无法在 Cygwin 上构建程序,请参见下文:

在适当的目录中,您将拥有:

$ ./configure
Configuring extundelete 0.2.4
Writing generated files to disk

为避免某些范围错误,您可以从 makefile 中删除限制调用

$ find . -name Makefile -exec sed -e "s/-std=c99//" -i {} \;
$ find . -name Makefile -exec sed -e "s/-std=c++0x -std=c++11//" -i {} \;

比构建

$ make
make -s all-recursive
Making all in src
...
insertionops.cc: In function ‘std::ostream& operator<<(std::ostream&, const ext2_inode&)’:
insertionops.cc:36:36: error: ‘const struct ext2_inode’ has no member named ‘i_dir_acl’; did you mean ‘i_file_acl’?
   36 |   os << "Directory ACL: " << inode.i_dir_acl << std::endl;
      |                                    ^~~~~~~~~
      |                                    i_file_acl
make[2]: *** [Makefile:437: extundelete-insertionops.o] Error 1
make[1]: *** [Makefile:268: all-recursive] Error 1
make: *** [Makefile:208: all] Error 2

你无法克服 Cygwin ext2 inode 结构缺乏扩展属性的问题。
由于 Cygwin 是一个 Windows 用户模式程序,它无法挂载 Windows 无法识别的文件系统,并且它对 ext2 的支持非常有限,主要专注于在外部磁盘上制作文件系统,但它不能真正使用它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-03
    相关资源
    最近更新 更多