shadow-4.2.1编译错误

时间:2015-08-06 17:47:57

标签: c linux gcc cross-compiling

我尝试编译shadow-4.2.1,但总是得到相同的错误。它适用于从头开始的跨linux:

Book-Version: 3.0.0-SYSVINIT
The host distribution: Debian Wheezy 7.8
The architecture of the host and target: Both x86_64
${CLFS_HOST}: x86_64-cross-linux-gnu
${CLFS_TARGET}: x86_64-unknown-linux-gnu
${BUILD64}: -m64
The package or section in which the problem was encountered: 7.6.  (Book-Chapter), Shadow-4.2.1
Note whether you have deviated from the book at all: No, I haven't.

编译shadow-4.2.1时出现以下错误:

libtool: link: x86_64-unknown-linux-gnu-gcc -m64 -g -O2 -o userdel userdel.o  ../libmisc/libmisc.a ../lib/.libs/libshadow.a
x86_64-unknown-linux-gnu-gcc -m64 -DHAVE_CONFIG_H -I. -I.. -I../lib -I../libmisc -DLOCALEDIR=\"/tools/share/locale\"   -g -O2 -MT usermod.o -MD -MP -MF
.deps/usermod.Tpo -c -o usermod.o usermod.c
usermod.c: In function 'process_flags':
usermod.c:1364:10: error: 'vflg' undeclared (first use in this function)
  if (   (vflg || Vflg)
          ^
usermod.c:1364:10: note: each undeclared identifier is reported only once for each function it appears in
usermod.c:1364:18: error: 'Vflg' undeclared (first use in this function)
  if (   (vflg || Vflg)
                  ^
usermod.c:1365:10: error: 'is_sub_uid' undeclared (first use in this function)
      && !is_sub_uid) {
          ^
usermod.c:1372:10: error: 'wflg' undeclared (first use in this function)
  if (   (wflg || Wflg)
      ^
usermod.c:1372:18: error: 'Wflg' undeclared (first use in this function)
  if (   (wflg || Wflg)
                  ^
usermod.c:1373:10: error: 'is_sub_gid' undeclared (first use in this function)
  && !is_sub_gid) {
      ^
make[2]: *** [usermod.o] Error 1
make[2]: Leaving directory `/mnt/clfs/sources/shadow-4.2.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/clfs/sources/shadow-4.2.1'
make: *** [all] Error 2

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

这是一个错字。
应该是

echo "#define ENABLE_SUBUIDS 1" >> config.h


代替

obj().attr = attr + str(x)
self.cell_list.append(obj)

检查here已解决的