On [Fri, 14.12.2007 18:47], gosha wrote: > Добрый день, > > Невезуха. > > Ситуация такова, что все пакеты, использующие #define системных вызовов > файла /usr/include/asm/unistd.h не собираются. > > > Причина следующая: > /* /usr/include/asm/unistd.h: */ > #ifdef __KERNEL__ Уберите этот ifdef > > #ifndef __ASSEMBLY__ > /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ > #define _syscall1(type,name,atype,a) \ > type name(atype a) \ > { \ > register unsigned long __a0 asm("$4") = (unsigned long) a; \ > register unsigned long __a3 asm("$7"); \ > unsigned long __v0; \ > \ > __asm__ volatile ( \ > ".set\tnoreorder\n\t" \ > "li\t$2, %3\t\t\t# " #name "\n\t" \ > "syscall\n\t" \ > "move\t%0, $2\n\t" \ > ".set\treorder" \ > : "=&r" (__v0), "=r" (__a3) \ > : "r" (__a0), "i" (__NR_##name) \ > : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ > "memory"); \ > \ > if (__a3 == 0) \ > return (type) __v0; \ > errno = __v0; \ > return (type) -1; \ > } > .................................................................................................................................. > #endif > #endif > > > напр компилируется coreutils: > exit.c : > #include > int errno; > _syscall1(void,exit,int,status); > void _start(void) > {exit(STATUS);} > > > Как я понял, при сборке не выставлен флаг -D __KERNEL__ . и, поэтому, не > обрабатывается препроцессором _syscall1(void,exit,int,status) > > соотв получаем ошибки типа. > llseek.c:34: error: expected declaration specifiers or '...' before '_llseek' > llseek.c:34: error: expected declaration specifiers or '...' before 'fd' > llseek.c:34: error: expected declaration specifiers or '...' > before 'offset_high' > llseek.c:35: error: expected declaration specifiers or '...' > before 'offset_low' > llseek.c:35: error: expected declaration specifiers or '...' before 'result' > llseek.c:36: error: expected declaration specifiers or '...' before 'origin' > > ============================================== > Где могли бы быть неправильные настройки сборки? > > Как победить ? > > Спасибо. > -- > С Уваженим, > gosha. > _______________________________________________ > devel-ports mailing list > devel-ports@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/devel-ports -- Regards, Kirill A. Shutemov + Belarus, Minsk + Velesys LLC, http://www.velesys.com/ + ALT Linux Team, http://www.altlinux.com/