2009-07-02, 编译dpkg 出错
时间:2009-07-02 来源:Junping1982
在红旗系统下无法安装DEB依赖包, 由于没有DPKG工具, 在网络上下载了
dpkg-1.10.28
编译时出现以下错误:
make[2]: Entering directory `/home/Bruce/Desktop/dpkg-1.10.28/lib'
gcc -g -O2 -Wall -Wwrite-strings -Wpointer-arith -Wimplicit -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wcast-qual -Wcast-align -Winline -Wmissing-noreturn -Wsign-compare -DHAVE_CONFIG_H -D_GNU_SOURCE -DLOCALEDIR=\"/usr/share/locale\" -I../intl -I../intl -I../include -I.. -I. -I../include -I.. -I. -I../optlib -DUSE_ZLIB -DUSE_BZ2LIB -DCOPYINGFILE=\"/usr/share/doc/dpkg/copyright\" -c dump.c
In file included from dump.c:37:
../include/parsedump.h:34: error: array type has incomplete element type
dump.c: In function 'w_charfield':
dump.c:95: warning: cast discards qualifiers from pointer target type
dump.c: In function 'w_booleandefno':
dump.c:133: warning: cast discards qualifiers from pointer target type
make[2]: *** [dump.o] 错误 1
make[2]: Leaving directory `/home/Bruce/Desktop/dpkg-1.10.28/lib'
make[1]: *** [all-lib] 错误 2
make[1]: Leaving directory `/home/Bruce/Desktop/dpkg-1.10.28'
make: *** [all-recursive] 错误 2
[Bruce@localhost dpkg-1.10.28]$
在parsedump.h文件出错的行如下:
extern const struct fieldinfo fieldinfos[];
extern const struct nickname nicknames[];
extern const int nfields; /* = elements in fieldinfos, including the sentinels */
在dump.c出错的代码行在:
void w_booleandefno(struct varbuf *vb,
const struct pkginfo *pigp, const struct pkginfoperfile *pifp,
enum fwriteflags flags, const struct fieldinfo *fip) {
int value= pifp->valid ? PKGPFIELD(pifp,fip->integer,int) : -1;
if (!(flags&fw_printheader)) {
varbufaddstr(vb, (value==1) ? "yes" : "no");
return;
}
if (!value) return;
assert(value==1);
varbufaddstr(vb,fip->name); varbufaddstr(vb, ": yes\n");
}
经过处理后, 发现是编译器的问题, 没法再处理, 所以就又新下载了
dpkg-1.15.2
编译时出现以下错误:
Making all in src
make[2]: Entering directory `/home/Bruce/Desktop/dpkg-1.15.2/src'
gcc -std=gnu99 -O2 -mcpu=i486 -mtune=i686 -Wl,-O1 -o dpkg archives.o cleanup.o configure.o depcon.o enquiry.o errors.o filesdb.o help.o main.o packages.o pkg-array.o pkg-show.o processarc.o remove.o select.o trigproc.o update.o ../lib/libdpkg.a ../libcompat/libcompat.a -lz -lbz2
processarc.o: In function `process_archive':
/home/Bruce/Desktop/dpkg-1.15.2/src/processarc.c:170: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
archives.o: In function `tarobject':
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:657: undefined reference to `matchpathcon'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:641: undefined reference to `is_selinux_enabled'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:826: undefined reference to `setfscreatecon'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:828: undefined reference to `freecon'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:850: undefined reference to `setfscreatecon'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:663: undefined reference to `setfscreatecon'
检查配置时的输出信息发现有如下信息:
checking for BZ2_bzdopen in -lbz2... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for is_selinux_enabled in -lselinux... yes
Package libselinux was not found in the pkg-config search path.
Perhaps you should add the directory containing `libselinux.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libselinux' found
依此安装了以下相应的包:
glibc-2.9-3.i686.rpm
libsepol-2.0.32-1.fc9.i386.rpm
libselinux-2.0.67-4.fc9.i386.rpm
问题依旧.
查看相关安装包的文件信息如下:
500)this.width=500;" border="0">
没有libseliunx.pc文件, 不知哪位高手是否有处理过相似的问题。 企盼给予指导
dpkg-1.10.28
编译时出现以下错误:
make[2]: Entering directory `/home/Bruce/Desktop/dpkg-1.10.28/lib'
gcc -g -O2 -Wall -Wwrite-strings -Wpointer-arith -Wimplicit -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wcast-qual -Wcast-align -Winline -Wmissing-noreturn -Wsign-compare -DHAVE_CONFIG_H -D_GNU_SOURCE -DLOCALEDIR=\"/usr/share/locale\" -I../intl -I../intl -I../include -I.. -I. -I../include -I.. -I. -I../optlib -DUSE_ZLIB -DUSE_BZ2LIB -DCOPYINGFILE=\"/usr/share/doc/dpkg/copyright\" -c dump.c
In file included from dump.c:37:
../include/parsedump.h:34: error: array type has incomplete element type
dump.c: In function 'w_charfield':
dump.c:95: warning: cast discards qualifiers from pointer target type
dump.c: In function 'w_booleandefno':
dump.c:133: warning: cast discards qualifiers from pointer target type
make[2]: *** [dump.o] 错误 1
make[2]: Leaving directory `/home/Bruce/Desktop/dpkg-1.10.28/lib'
make[1]: *** [all-lib] 错误 2
make[1]: Leaving directory `/home/Bruce/Desktop/dpkg-1.10.28'
make: *** [all-recursive] 错误 2
[Bruce@localhost dpkg-1.10.28]$
在parsedump.h文件出错的行如下:
extern const struct fieldinfo fieldinfos[];
extern const struct nickname nicknames[];
extern const int nfields; /* = elements in fieldinfos, including the sentinels */
在dump.c出错的代码行在:
void w_booleandefno(struct varbuf *vb,
const struct pkginfo *pigp, const struct pkginfoperfile *pifp,
enum fwriteflags flags, const struct fieldinfo *fip) {
int value= pifp->valid ? PKGPFIELD(pifp,fip->integer,int) : -1;
if (!(flags&fw_printheader)) {
varbufaddstr(vb, (value==1) ? "yes" : "no");
return;
}
if (!value) return;
assert(value==1);
varbufaddstr(vb,fip->name); varbufaddstr(vb, ": yes\n");
}
经过处理后, 发现是编译器的问题, 没法再处理, 所以就又新下载了
dpkg-1.15.2
编译时出现以下错误:
Making all in src
make[2]: Entering directory `/home/Bruce/Desktop/dpkg-1.15.2/src'
gcc -std=gnu99 -O2 -mcpu=i486 -mtune=i686 -Wl,-O1 -o dpkg archives.o cleanup.o configure.o depcon.o enquiry.o errors.o filesdb.o help.o main.o packages.o pkg-array.o pkg-show.o processarc.o remove.o select.o trigproc.o update.o ../lib/libdpkg.a ../libcompat/libcompat.a -lz -lbz2
processarc.o: In function `process_archive':
/home/Bruce/Desktop/dpkg-1.15.2/src/processarc.c:170: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
archives.o: In function `tarobject':
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:657: undefined reference to `matchpathcon'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:641: undefined reference to `is_selinux_enabled'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:826: undefined reference to `setfscreatecon'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:828: undefined reference to `freecon'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:850: undefined reference to `setfscreatecon'
/home/Bruce/Desktop/dpkg-1.15.2/src/archives.c:663: undefined reference to `setfscreatecon'
检查配置时的输出信息发现有如下信息:
checking for BZ2_bzdopen in -lbz2... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for is_selinux_enabled in -lselinux... yes
Package libselinux was not found in the pkg-config search path.
Perhaps you should add the directory containing `libselinux.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libselinux' found
依此安装了以下相应的包:
glibc-2.9-3.i686.rpm
libsepol-2.0.32-1.fc9.i386.rpm
libselinux-2.0.67-4.fc9.i386.rpm
问题依旧.
查看相关安装包的文件信息如下:
500)this.width=500;" border="0">
没有libseliunx.pc文件, 不知哪位高手是否有处理过相似的问题。 企盼给予指导
相关阅读 更多 +