我被引入临时系统(/ tools)。在编译glibc期间(LFS的第6.9步),我的计算机意外关闭。在重新启动后,重新构建构建目录,运行configure和make,它会失败。这是日志:
root:/sources/glibc-2.24/build# make
make -r PARALLELMFLAGS="" -C .. objdir=`pwd` all
make[1]: Entering directory '/sources/glibc-2.24'
make subdir=csu -C csu ..=../ subdir_lib
make[2]: Entering directory '/sources/glibc-2.24/csu'
gawk -f ../scripts/gen-as-const.awk ../sysdeps/x86_64/nptl/tcb-offsets.sym \
| gcc -S -o /sources/glibc-2.24/build/tcb-offsets.hT3 -std=gnu11 -fgnu89-inline -O2 -Wall -Werror -Wundef -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes -Wold-style-definition -ftls-model=initial-exec -I../include -I/sources/glibc-2.24/build/csu -I/sources/glibc-2.24/build -I../sysdeps/unix/sysv/linux/x86_64/64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/x86_64/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -include /sources/glibc-2.24/build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -x c - \
-MD -MP -MF /sources/glibc-2.24/build/tcb-offsets.h.dT -MT '/sources/glibc-2.24/build/tcb-offsets.h.d /sources/glibc-2.24/build/tcb-offsets.h'
In file included from ../sysdeps/generic/hp-timing-common.h:42:0,
from ../sysdeps/x86_64/hp-timing.h:38,
from ../include/libc-internal.h:7,
from ../sysdeps/x86_64/nptl/tls.h:29,
from ../sysdeps/unix/sysv/linux/x86_64/sysdep.h:24,
from <stdin>:1:
../sysdeps/generic/_itoa.h:32:25: error: "LONG_MAX" is not defined [-Werror=undef]
# define _ITOA_NEEDED (LONG_MAX != LLONG_MAX)
^
../sysdeps/generic/_itoa.h:97:6: note: in expansion of macro '_ITOA_NEEDED'
#if !_ITOA_NEEDED
^~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [../Makerules:224: /sources/glibc-2.24/build/tcb-offsets.h] Error 1
make[2]: Leaving directory '/sources/glibc-2.24/csu'
make[1]: *** [Makefile:214: csu/subdir_lib] Error 2
make[1]: Leaving directory '/sources/glibc-2.24'
make: *** [Makefile:9: all] Error 2
root:/sources/glibc-2.24/build#
似乎limits.h不存在,但我查了一下,确实存在。
root:/usr/include/linux# ls | grep "limits.h"
limits.h
编辑:我发现了limits.h并注意到LONG_MAX确实没有包含在文件中。这是文件:
#ifndef _LINUX_LIMITS_H
#define _LINUX_LIMITS_H
#define NR_OPEN 1024
#define NGROUPS_MAX 65536 /* supplemental group IDs are available */
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
#define LINK_MAX 127 /* # links a file may have */
#define MAX_CANON 255 /* size of the canonical input queue */
#define MAX_INPUT 255 /* size of the type-ahead buffer */
#define NAME_MAX 255 /* # chars in a file name */
#define PATH_MAX 4096 /* # chars in a path name including nul */
#define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */
#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
#define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */
#define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */
#define RTSIG_MAX 32
#endif
root:/usr/include/linux# ls | grep "limits.h"
limits.h
root:/usr/include/linux# cat limits.h
#ifndef _LINUX_LIMITS_H
#define _LINUX_LIMITS_H
#define NR_OPEN 1024
#define NGROUPS_MAX 65536 /* supplemental group IDs are available */
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
#define LINK_MAX 127 /* # links a file may have */
#define MAX_CANON 255 /* size of the canonical input queue */
#define MAX_INPUT 255 /* size of the type-ahead buffer */
#define NAME_MAX 255 /* # chars in a file name */
#define PATH_MAX 4096 /* # chars in a path name including nul */
#define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */
#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
#define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */
#define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */
#define RTSIG_MAX 32
#endif
答案 0 :(得分:1)
include/linux/limits.h
这是LONG_MAX
。 include/limits.h
应该来自max-height
,这是不同的文件。
在不干净关机后,您的来源可能已损坏。您应该从原始副本中恢复它们。