make 타임즈에 ext3grep 설치 오류
운영 체제 센터 7
발생 원인: 삭제된 파일 복구 테스트
오류 프롬프트는 다음과 같습니다.
[root@localhost ext3grep-0.10.2]# make
make all-recursive
make[1]: “/data/recovery/ext3grep-0.10.2”
Making all in src
make[2]: “/data/recovery/ext3grep-0.10.2/src”
g++ -Iempty.pch.h -DHAVE_CONFIG_H -I. -I.. -g -O2 -DUSE_MMAP=1 -I/usr/include/ext2fs -I/usr/include/et -include pch.h \
-c -o pch.h.gch/6145d4709c827f9d2a94d7691c87ab4e ./pch-source.h
In file included from ./pch-source.h:43:0:
./ext3.h: ‘__u32 Inode::reserved2() const’ :
./ext3.h:113:42: :‘i_reserved2’
__u32 reserved2(void) const { return i_reserved2; }
^
./ext3.h: ‘void Inode::set_reserved2(__u32)’ :
./ext3.h:115:37: :‘i_reserved2’
void set_reserved2(__u32 val) { i_reserved2 = val; }
^
make[2]: *** [pch.h.gch/6145d4709c827f9d2a94d7691c87ab4e] 1
make[2]: “/data/recovery/ext3grep-0.10.2/src”
make[1]: *** [all-recursive] 1
make[1]: “/data/recovery/ext3grep-0.10.2”
make: *** [all] 2
해결 방법: (대응하는 곳에서 + 뒷내용을 ext3.h에 보충
[root@localhost ext3grep-0.10.2]# vim src/ext3.h
+ , @@ svn :
diff -ur ext3grep-0.10.1/src/ext3.h ext3grep-0.10.1.new/src/ext3.h
--- ext3grep-0.10.1/src/ext3.h2008-04-09 11:20:31.000000000 +0000
+++ ext3grep-0.10.1.new/src/ext3.h2011-12-10 07:00:50.000000000 +0000
@@ -24,6 +24,17 @@
#ifndef EXT3_H
#define EXT3_H
+// this trickery needs to happen before ext2_fs is included so
+// bail out if it has already been included by another path
+#ifdef _LINUX_EXT2_FS_H
+ #error please include this file before any other includes of ext2fs/ext2_fs.h
+#endif
+
+// some versions of the ext2 headers call this s_frags_per_group and some
+// call it s_clusters_per_group, define one to the other so our code works
+// with both
+#define s_clusters_per_group s_frags_per_group
+
// Use the header files from e2progs (http://e2fsprogs.sourceforge.net)
// We can use these headers and then everything named ext2 or ext3.
#include <ext2fs/ext2_fs.h>// Definitions of ext2, ext3 and ext4.
@@ -110,6 +121,12 @@
__u32 faddr(void) const { return i_faddr; }
__u16 uid_high(void) const { return i_uid_high; }
__u16 gid_high(void) const { return i_gid_high; }
+#ifndef i_reseved2
+ //i_reseved2 has been split into two fields in recent
+ //versions of the headers, luckilly we can still access
+ //it in one peice through the hurd side of the union
+ #define i_reserved2 osd2.hurd2.h_i_author
+#endif
__u32 reserved2(void) const { return i_reserved2; }
void set_reserved2(__u32 val) { i_reserved2 = val; }
버그 참조 주소:https://code.google.com/p/ext3grep/issues/detail?id=34
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
GNU make manual 번역(3)계속 번역 1.1 이 안내서를 읽는 방법 만약 당신이 초보자이거나 일반적인 소개를 찾고 있다면, 먼저 매 장의 앞의 몇 마디를 읽고 뒤의 몇 마디를 뛰어넘을 수 있다.각 장에서 앞 면적의 각 소절은 소개적 또는 일반...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.