Ошибка при сборке ядра на FreeBSD 10.1 amd64

Простые/общие вопросы по UNIX системам. Спросите здесь, если вы новичок

Модераторы: vadim64, terminus

Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
rusol
рядовой
Сообщения: 10
Зарегистрирован: 2012-10-22 13:12:03

Ошибка при сборке ядра на FreeBSD 10.1 amd64

Непрочитанное сообщение rusol » 2015-01-25 22:50:26

Здравствуйте. Только установил Freebsd.

Код: Выделить всё

root@bill:/usr/home/rusol # uname -a
FreeBSD 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
При попытке пересобрать ядро со следующими опциями

Код: Выделить всё

options IPFIREWALL
выбивает ошибку

Код: Выделить всё

machine -> ../../../i386/include
x86 -> ../../../x86/include
cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc -I. -I../../.. -I../../../contrib/altq -I../../../contrib/ipfilter -I../../../dev/ath -I../../../dev/ath/ath_hal -I../../../contrib/dev/ath/ath_hal -I../../../contrib/ngatm -I../../../dev/twa -I../../../dev/cxgb -I../../../dev/cxgbe -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -gdwarf-2 ../../../i386/i386/genassym.c
In file included from ../../../i386/i386/genassym.c:44:
In file included from ../../../sys/systm.h:42:
./machine/cpufunc.h:468:41: warning: cast to 'char *' from smaller integer type 'u_int' (aka 'unsigned int') [-Wint-to-pointer-cast]
        __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory");
                                               ^
In file included from ../../../i386/i386/genassym.c:47:
In file included from ../../../sys/buf.h:260:
In file included from ../../../sys/proc.h:62:
In file included from ../../../sys/pcpu.h:48:
In file included from ./machine/pcpu.h:36:
./machine/segments.h:91:29: error: use of undeclared identifier 'NLDT'
extern union descriptor ldt[NLDT];
                            ^
In file included from ../../../i386/i386/genassym.c:76:
In file included from ./machine/pcb.h:45:
./machine/npx.h:56:16: error: use of 'savefpu' with tag type that does not match previous declaration
void    npxresume(union savefpu *addr);
                  ^~~~~
                  struct
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
In file included from ../../../i386/i386/genassym.c:76:
In file included from ./machine/pcb.h:45:
./machine/npx.h:57:14: error: use of 'savefpu' with tag type that does not match previous declaration
void    npxsave(union savefpu *addr);
                ^~~~~
                struct
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
In file included from ../../../i386/i386/genassym.c:76:
In file included from ./machine/pcb.h:45:
./machine/npx.h:58:36: error: use of 'savefpu' with tag type that does not match previous declaration
void    npxsetregs(struct thread *td, union savefpu *addr);
                                      ^~~~~
                                      struct
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
In file included from ../../../i386/i386/genassym.c:76:
In file included from ./machine/pcb.h:45:
./machine/npx.h:59:17: error: use of 'savefpu' with tag type that does not match previous declaration
void    npxsuspend(union savefpu *addr);
                   ^~~~~
                   struct
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
In file included from ../../../i386/i386/genassym.c:76:
./machine/pcb.h:66:2: error: use of 'savefpu' with tag type that does not match previous declaration
        union   savefpu pcb_user_save;
        ^~~~~
        struct
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
In file included from ../../../i386/i386/genassym.c:76:
./machine/pcb.h:87:2: error: use of 'savefpu' with tag type that does not match previous declaration
        union   savefpu *pcb_save;
        ^~~~~
        struct
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
In file included from ../../../i386/i386/genassym.c:76:
./machine/pcb.h:97:2: error: use of 'savefpu' with tag type that does not match previous declaration
        union savefpu   sp_fpususpend;
        ^~~~~
        struct
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
In file included from ../../../i386/i386/genassym.c:76:
./machine/pcb.h:105:30: warning: calling convention '__fastcall__' ignored for this target [-Wignored-attributes]
void    resumectx(struct pcb *) __fastcall;
                                ^
../../../sys/cdefs.h:355:35: note: expanded from macro '__fastcall'
#define __fastcall      __attribute__((__fastcall__))
                                       ^
In file included from ../../../i386/i386/genassym.c:77:
./machine/sigframe.h:86:19: error: field has incomplete type 'struct ucontext'
        struct ucontext4 sf_uc;         /* = *sf_ucontext */
                         ^
./machine/sigframe.h:86:9: note: forward declaration of 'struct ucontext'
        struct ucontext4 sf_uc;         /* = *sf_ucontext */
               ^
../../../sys/ucontext.h:66:19: note: expanded from macro 'ucontext4'
#define ucontext4 ucontext
                  ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:38:21: note: expanded from macro 'ASSYM'
char name ## sign[((value) < 0 ? 1 : 0) + ASSYM_BIAS];                        \
                    ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:39:28: note: expanded from macro 'ASSYM'
char name ## w0[(ASSYM_ABS(value) & 0xFFFFU) + ASSYM_BIAS];                   \
                           ^
../../../sys/assym.h:35:28: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                  ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:39:28: note: expanded from macro 'ASSYM'
char name ## w0[(ASSYM_ABS(value) & 0xFFFFU) + ASSYM_BIAS];                   \
                           ^
../../../sys/assym.h:35:44: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                                  ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:39:28: note: expanded from macro 'ASSYM'
char name ## w0[(ASSYM_ABS(value) & 0xFFFFU) + ASSYM_BIAS];                   \
                           ^
../../../sys/assym.h:35:66: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                                                        ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:40:29: note: expanded from macro 'ASSYM'
char name ## w1[((ASSYM_ABS(value) & 0xFFFF0000UL) >> 16) + ASSYM_BIAS];      \
                            ^
../../../sys/assym.h:35:28: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                  ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:40:29: note: expanded from macro 'ASSYM'
char name ## w1[((ASSYM_ABS(value) & 0xFFFF0000UL) >> 16) + ASSYM_BIAS];      \
                            ^
../../../sys/assym.h:35:44: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                                  ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:40:29: note: expanded from macro 'ASSYM'
char name ## w1[((ASSYM_ABS(value) & 0xFFFF0000UL) >> 16) + ASSYM_BIAS];      \
                            ^
../../../sys/assym.h:35:66: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                                                        ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:41:29: note: expanded from macro 'ASSYM'
char name ## w2[((ASSYM_ABS(value) & 0xFFFF00000000ULL) >> 32) + ASSYM_BIAS]; \
                            ^
../../../sys/assym.h:35:28: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                  ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:41:29: note: expanded from macro 'ASSYM'
char name ## w2[((ASSYM_ABS(value) & 0xFFFF00000000ULL) >> 32) + ASSYM_BIAS]; \
                            ^
../../../sys/assym.h:35:44: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                                  ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
../../../i386/i386/genassym.c:157:32: error: use of 'savefpu' with tag type that does not match previous declaration
ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
                               ^~~~~
                               struct
../../../sys/assym.h:41:29: note: expanded from macro 'ASSYM'
char name ## w2[((ASSYM_ABS(value) & 0xFFFF00000000ULL) >> 32) + ASSYM_BIAS]; \
                            ^
../../../sys/assym.h:35:66: note: expanded from macro 'ASSYM_ABS'
#define ASSYM_ABS(value)        ((value) < 0 ? -((value) + 1) + 1ULL : (value))
                                                                        ^
./x86/fpu.h:140:8: note: previous use is here
struct savefpu {
       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
*** Error code 1

Stop.
При установке FreeBSD 10.1 архитектуры i386 ядро собирается нормально.

Информация о процессоре:

Код: Выделить всё

CPU: Intel(R) Xeon(R) CPU E31245
Если я правильно понимаю, этот процессор должен работать с FreeBSD amd64?
Последний раз редактировалось f_andrey 2015-01-25 23:44:30, всего редактировалось 1 раз.
Причина: Автору. пожалуйста, выбирайте соответствующий раздел форума.

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

guest
проходил мимо

Ошибка при сборке ядра на FreeBSD 10.1 amd64

Непрочитанное сообщение guest » 2015-01-26 11:28:00

как создавали конфигурацию ядра - только одну опцию добавили в GENERIC, или что-то еще?
как собираете ядро - step by step:

# cd /usr/src
# make buildkernel KERNCONF=MYKERNEL
...

Аватара пользователя
BirdGovorun
лейтенант
Сообщения: 878
Зарегистрирован: 2009-10-20 20:27:13
Откуда: Харьков.

Ошибка при сборке ядра на FreeBSD 10.1 amd64

Непрочитанное сообщение BirdGovorun » 2015-01-26 12:45:32

rusol писал(а):
При попытке пересобрать ядро со следующими опциями

Код: Выделить всё

options IPFIREWALL
выбивает ошибку
Не надо ядро трогать, модулем грузить.

Код: Выделить всё

CPU: Intel(R) Xeon(R) CPU E31245
rusol писал(а):Если я правильно понимаю, этот процессор должен работать с FreeBSD amd64?
Нужно.

logout_90
мл. сержант
Сообщения: 72
Зарегистрирован: 2014-01-27 5:36:26

Ошибка при сборке ядра на FreeBSD 10.1 amd64

Непрочитанное сообщение logout_90 » 2015-01-26 13:06:44

Могу, конечно, ошибаться, но немного напрягает в логах:

Код: Выделить всё

machine -> ../../../i386/include
x86 -> ../../../x86/include
Сборка производится под архитектуру amd64? То есть, путь до кастомного конфига ядра

Код: Выделить всё

 /usr/src/sys/amd64/conf/
А не:

Код: Выделить всё

/usr/src/sys/i386/conf/

rusol
рядовой
Сообщения: 10
Зарегистрирован: 2012-10-22 13:12:03

Ошибка при сборке ядра на FreeBSD 10.1 amd64

Непрочитанное сообщение rusol » 2015-01-26 15:21:48

logout_90 писал(а): Сборка производится под архитектуру amd64? То есть, путь до кастомного конфига ядра

Код: Выделить всё

 /usr/src/sys/amd64/conf/
А не:

Код: Выделить всё

/usr/src/sys/i386/conf/
Точно, собирал в папке i386, пересобрал в amd64, все в порядке.

Спасибо большое.