[devel] kernel & libdb

Alexander S. Belov =?iso-8859-1?q?asbel_=CE=C1_sicex=2Eru?=
Сб Июн 21 08:24:43 MSD 2003


Привет всем,

Делаю 

#rpm -ba kernel-w4l-up.spec 
...
cc -I/usr/include -I. -ldb -ldl aicasm.c aicasm_symbol.c aicasm_gram.c
aicasm_macro_gram.c aicasm_scan.c aicasm_macro_scan.c -o aicasm
aicasm.c:291:1: warning: multi-line string literals are deprecated
aicasm.c:338:1: warning: multi-line string literals are deprecated
aicasm.c:377:1: warning: multi-line string literals are deprecated
aicasm.c:392:1: warning: multi-line string literals are deprecated
aicasm.c:412:1: warning: multi-line string literals are deprecated
aicasm.c:428:1: warning: multi-line string literals are deprecated
aicasm_symbol.c:406:1: warning: multi-line string literals are
deprecated
aicasm_gram.y: In function `format_1_instr':
aicasm_gram.y:1590: warning: deprecated use of label at end of compound
statement
aicasm_gram.y: At top level:
aicasm_gram.y:1846: warning: type mismatch with previous implicit
declaration
aicasm_gram.tab.c:2957: warning: previous implicit declaration of
`yyerror'
aicasm_gram.y:1846: warning: `yyerror' was previously implicitly
declared to return `int'
aicasm_macro_gram.y:162: warning: type mismatch with previous implicit
declaration
aicasm_macro_gram.tab.c:1283: warning: previous implicit declaration of
`mmerror'
aicasm_macro_gram.y:162: warning: `mmerror' was previously implicitly
declared to return `int'
/home/asbel/tmp/ccTsyxO4.o: In function `symtable_open':
/home/asbel/tmp/ccTsyxO4.o(.text+0x1af): undefined reference to `dbopen'
collect2: ld returned 1 exit status
make: *** [aicasm] Ошибка 1


Ну, т.е. проблемы с libdb пр сборке какой-то фигни для aic:
/usr/src/RPM/BUILD/kernel-source-2.4.21/drivers/scsi/aic7xxx/aicasm/*.

# rpm-qa | grep 'libdb'
libdb4.0-devel-4.0.14-alt10
libdb4.0_tcl-4.0.14-alt10
libdb2-devel-2.4.14-alt2
libdb4.0_java-4.0.14-alt10
libdb4.0_cxx-4.0.14-alt10
libdb4.0_tcl-devel-static-4.0.14-alt10
libdb4.0-4.0.14-alt10
libdb4.1-4.1.25-alt1
libdb4.0_cxx-devel-4.0.14-alt10
libdb4.0_java-devel-static-4.0.14-alt10
libdb1-1.85-alt2
libdb4.0_cxx-devel-static-4.0.14-alt10
libdb4.0-devel-static-4.0.14-alt10
libdb4.0_tcl-devel-4.0.14-alt10
libdb1-devel-1.85-alt2
libdb2-2.4.14-alt2
libdb4.1_cxx-4.1.25-alt1
libdb4.0_java-devel-4.0.14-alt10

Т.е. вроде все ОК и в spec'е стоит:
BuildRequires: coreutils libdb4.0-devel perl flex bin86

Но на самом деле эта фигня должна собираться с libdb2:

aicasm_symbol.c:
....
#include <sys/types.h>
#ifdef __linux__
#include "aicdb.h"
#else
#include <db.h>
#endif
#include <fcntl.h>
#include <regex.h>
....

# cat aicdb.h
#include <db2/db_185.h>

А она по причине того, что в Makefile стоит 
AICASM_CFLAGS:= -I/usr/include -I. -ldb

Пытается слинковаться с db4.

Соотв. если исправить эту строчку в Makefile на 
AICASM_CFLAGS:= -I/usr/include -I. -ldb2

и в spec'е добавить

BuildRequires: coreutils libdb4.0-devel perl flex bin86 libdb2-devel

ИМНО будет счастье или я что-то не понимаю...





Подробная информация о списке рассылки Devel