Cygwin64 :: ./configure 返回“configure: exit 77”的错误消息

3
我已经安装了 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

enter image description here

于是我打开了config.log文件,并发现了一些错误:

提示:本段翻译涉及IT技术相关内容。

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
@Tsyvarev,我应该使用什么命令代替?输出较长,您需要所有的>200行吗? - Francesco Mantovani
我并不是说你使用了错误的命令。我想问为什么你在问题中使用了 cmake 标签。这个标签与问题有什么关系? - Tsyvarev
extundelete是一个工具,可以从ext3或ext4分区中恢复已删除的文件。你为什么要在cygwin上安装? - Philippe
不要在Windows Home目录下构建。从“C:\ Users \ franc”继承的权限可能会破坏构建过程所需的执行权限。请使用“/ home / franc”或“/ usr / src”目录。附注:当然可以在Cygwin 64位下构建;您认为这些软件包是如何构建的? - matzeri
1个回答

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

不幸的是,您无法在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的支持非常有限,主要集中在外部磁盘上创建文件系统,但实际上无法使用它。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接