2017-01-16 15 views
0

Я исправлен во временной системе (/ tools). Во время компиляции glibc (шаг 6.9 LFS) мой компьютер неожиданно отключился. После загрузки резервной копии, переделывая каталог сборки, запуская configure и make, он терпит неудачу. Вот лог:Система разбилась во время компиляции glibc, отказывается компилировать снова даже после перекомпоновки каталога построения

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 

EDIT: Я catted 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 

ответ

1

#ifndef _LINUX_LIMITS_H

Это include/linux/limits.h. Ожидается, что LONG_MAX будет получен от include/limits.h, что является различными файлами.

Вероятно, ваши источники были повреждены после нечистого выключения. Вы должны восстановить их из нетронутой копии.