сборка ipcad

Всем привет. всю голову себе сломал!
помогите пожалуйста?
[root@zakachkin ipcad]# cat PKGBUILD
# Contributor: Konstantin Sharlaimov <[email protected]>;
pkgname=ipcad
pkgver=3.7.3
pkgrel=1
pkgdesc="IP Cisco Accounting Daemon"
arch=('i686')
url="http://lionet.info/ipcad/"
license="GPL"
source=('http://lionet.info/soft/ipcad-3.7.3.tar.gz' 'ipcad' 'ipcad.dump')
md5sums=('125605249958894148ec26d3c88189f5' 'b61b0ffa3ace50342b0b5ffff2256e60'\
         'd41d8cd98f00b204e9800998ecf8427e')
depends=('netkit-rsh' 'libpcap')
backup=(etc/ipcad/ipcad.conf)
build() {
        cd ${startdir}/src/${pkgname}-${pkgver}/
        sed -i -e '1 s/^/#include "signal.h"\n/;' main.c
        sed -i -e '1 s/^/#include "headers.h"\n/;' pps.c
        sed -i -e '1 s/^/#include "signal.h"\n/;' pps.c
        sed -i -e '1 s/^/#include "signal.h"\n/;' servers.c
        sed -i -e '31 s%^%#include "/usr/src/linux/include/netfilter.h"\n%;' loop-ipq.c
        #sed -i '32,1i#include <linux/netfilter.h>' loop-ipq.c
        mkdir -p ${startdir}/pkg
        mkdir -p ${startdir}/pkg/usr
        mkdir -p ${startdir}/pkg/etc/
        mkdir -p ${startdir}/pkg/etc/rc.d
        mkdir -p ${startdir}/pkg/usr/man/man8/
        mkdir -p ${startdir}/pkg/usr/man/man5/
        mkdir -p ${startdir}/pkg/adm/tmp
        ./configure --prefix=/usr --sysconfdir=/etc/ipcad --mandir=/usr/man --enable-static --disable-shared
        make || return 1
        make DESTDIR=${startdir}/pkg install
        make DESTDIR=${startdir}/pkg install-man
        install -m 755 ${startdir}/src/ipcad ${startdir}/pkg/etc/rc.d
        install -m 600 ${startdir}/src/ipcad.dump ${startdir}/pkg/adm/tmp
}


[root@zakachkin ipcad]# makepkg --asroot
==> Сборка пакета: ipcad 3.7.3-1 (Пн. окт.  1 07:37:22 MSK 2012)
==> Проверяю необходимые для запуска зависимости...
==> Проверяю необходимые для сборки зависимости...
==> Получение исходных файлов...
  -> Найден ipcad-3.7.3.tar.gz
  -> Найден ipcad
  -> Найден ipcad.dump
==> Проверка исходных файлов с помощью md5sums...
    ipcad-3.7.3.tar.gz ... Готово
    ipcad ... Готово
    ipcad.dump ... Готово
==> Распаковка исходных файлов...
  -> Извлечение ipcad-3.7.3.tar.gz с помощью bsdtar
==> Запускается build()...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for bison... bison -y
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for pthread_detach... no
checking for pthread_detach in -lc... yes
checking for working pthreads... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for netinet/in_systm.h... yes
checking for net/if.h... yes
checking for net/route.h... yes
checking for ifaddrs.h... yes
checking for netinet/ip.h... yes
checking for netinet/tcp.h... yes
checking for net/ethernet.h... yes
checking for netinet/if_ether.h... yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking linux/socket.h usability... yes
checking linux/socket.h presence... yes
checking for linux/socket.h... yes
checking for linux/netlink.h... yes
checking for linux/netfilter.h... no
checking for linux/if.h... no
checking for linux/netfilter_ipv4/ipt_ULOG.h... yes
checking for linux/netfilter_ipv4/ip_queue.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking sysexits.h usability... yes
checking sysexits.h presence... yes
checking for sysexits.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for socket in -lsocket... no
checking for inet_pton in -lnsl... yes
checking packet source type... pcap
checking net/bpf.h usability... yes
checking net/bpf.h presence... yes
checking for net/bpf.h... yes
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking for pcap_open_live in -lpcap... yes
checking libipq.h usability... yes
checking libipq.h presence... yes
checking for libipq.h... yes
checking pcap_findalldevs... yes
checking interface access type... linux
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking whether byte ordering is bigendian... no
checking for in_addr_t... yes
checking for socklen_t... yes
checking for open as weak alias for _open... no
checking for strstr... yes
checking for fcntl... yes
checking for flock... yes
checking for sched_yield... yes
checking for pthread_cancel... yes
checking for setpriority... yes
checking for strtoull... yes
checking for strtouq... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for getifaddrs... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating ipcad.spec
config.status: creating config.h
gcc -DIPCAD_VERSION=\"3.7.3\" -DCONFIG_FILE=\"/etc/ipcad/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DPSRC_pcap -DIFST_linux -march=i686 -mtune=generic -O2 -pipe -march=i686 -mtune=generic -O2 -pipe -I/usr/local/include -DHAVE_CONFIG_H -W -Wall -o main.o -c main.c
In file included from /usr/local/include/pcap.h:51:0,
                 from headers.h:203,
                 from ipcad.h:31,
                 from main.c:30:
/usr/local/include/pcap-bpf.h:89:8: ошибка: повторное определение «struct bpf_program»
/usr/include/pcap/bpf.h:107:8: замечание: originally defined here
/usr/local/include/pcap-bpf.h:667:8: ошибка: повторное определение «struct bpf_insn»
/usr/include/pcap/bpf.h:109:9: замечание: originally defined here
/usr/local/include/pcap-bpf.h:681:12: ошибка: несовместимые типы для «bpf_validate»
/usr/include/pcap/bpf.h:1273:12: замечание: здесь была предыдущая декларация «bpf_validate»
/usr/local/include/pcap-bpf.h:682:14: ошибка: несовместимые типы для «bpf_filter»
/usr/include/pcap/bpf.h:1274:14: замечание: здесь была предыдущая декларация «bpf_filter»
In file included from headers.h:203:0,
                 from ipcad.h:31,
                 from main.c:30:
/usr/local/include/pcap.h:269:7: ошибка: несовместимые типы для «bpf_filter»
/usr/include/pcap/bpf.h:1274:14: замечание: здесь была предыдущая декларация «bpf_filter»
/usr/local/include/pcap.h:270:5: ошибка: несовместимые типы для «bpf_validate»
/usr/include/pcap/bpf.h:1273:12: замечание: здесь была предыдущая декларация «bpf_validate»
make: *** [main.o] Ошибка 1
==> ОШИБКА: Произошел сбой в build().
    Преждевременный выход...
Строчки sed … надо добавить после ./configure

add

sed -i -e ‘1 s/^/#include “signal.h”\n/;’ main.c

after ./configure
Если совсем не знаете английский, то хоть гуглем переводите.

И совет - отправляя комменты в АУР, делайте так:
$ LANG=C makepkg
По-русски в АУР читает совсем небольшой процент.

Кстати, довольно рискованно запускать makepkg от root-а. Прецеденты были, когда кривой PKGBUILD сносил /usr


Не удивлюсь, если ещё нужны патчи отсюда - ipcad in gentoo, пакет-то 2007 года…
Патчи наложил но это не спасает…
==> Making package: ipcad 3.7.3-1 (Thu Oct  4 18:53:46 MSK 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
  -> Found ipcad-3.7.3.tar.gz
  -> Found ipcad
  -> Found ipcad.dump
==> Validating source files with md5sums...
    ipcad-3.7.3.tar.gz ... Passed
    ipcad ... Passed
    ipcad.dump ... Passed
==> Extracting Sources...
  -> Extracting ipcad-3.7.3.tar.gz with bsdtar
==> Removing existing pkg/ directory...
==> Starting build()...
patching file configure.in
patching file configure.in
patching file main.c
Hunk #1 succeeded at 26 with fuzz 1.
patching file pps.c
Hunk #1 succeeded at 26 with fuzz 1.
patching file servers.c
Hunk #1 succeeded at 26 with fuzz 1.
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for bison... bison -y
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for pthread_detach... no
checking for pthread_detach in -lc... yes
checking for working pthreads... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for netinet/in_systm.h... yes
checking for net/if.h... yes
checking for net/route.h... yes
checking for ifaddrs.h... yes
checking for netinet/ip.h... yes
checking for netinet/tcp.h... yes
checking for net/ethernet.h... yes
checking for netinet/if_ether.h... yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking linux/socket.h usability... yes
checking linux/socket.h presence... yes
checking for linux/socket.h... yes
checking for linux/netlink.h... yes
checking for linux/netfilter.h... no
checking for linux/if.h... no
checking for linux/netfilter_ipv4/ipt_ULOG.h... yes
checking for linux/netfilter_ipv4/ip_queue.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking sysexits.h usability... yes
checking sysexits.h presence... yes
checking for sysexits.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for socket in -lsocket... no
checking for inet_pton in -lnsl... yes
checking packet source type... pcap
checking net/bpf.h usability... yes
checking net/bpf.h presence... yes
checking for net/bpf.h... yes
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking for pcap_open_live in -lpcap... yes
checking libipq.h usability... yes
checking libipq.h presence... yes
checking for libipq.h... yes
checking pcap_findalldevs... yes
checking interface access type... linux
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking whether byte ordering is bigendian... no
checking for in_addr_t... yes
checking for socklen_t... yes
checking for open as weak alias for _open... no
checking for strstr... yes
checking for fcntl... yes
checking for flock... yes
checking for sched_yield... yes
checking for pthread_cancel... yes
checking for setpriority... yes
checking for strtoull... yes
checking for strtouq... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for getifaddrs... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating ipcad.spec
config.status: creating config.h
config.status: config.h is unchanged
gcc -DIPCAD_VERSION=\"3.7.3\" -DCONFIG_FILE=\"/etc/ipcad/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DPSRC_pcap -DIFST_linux -march=i686 -mtune=generic -O2 -pipe -march=i686 -mtune=generic -O2 -pipe -I/usr/local/include -DHAVE_CONFIG_H -W -Wall -o main.o -c main.c
In file included from /usr/local/include/pcap.h:51:0,
                 from headers.h:203,
                 from ipcad.h:31,
                 from main.c:32:
/usr/local/include/pcap-bpf.h:89:8: error: redefinition of 'struct bpf_program'
/usr/include/pcap/bpf.h:107:8: note: originally defined here
/usr/local/include/pcap-bpf.h:667:8: error: redefinition of 'struct bpf_insn'
/usr/include/pcap/bpf.h:109:9: note: originally defined here
/usr/local/include/pcap-bpf.h:681:12: error: conflicting types for 'bpf_validate'
/usr/include/pcap/bpf.h:1273:12: note: previous declaration of 'bpf_validate' was here
/usr/local/include/pcap-bpf.h:682:14: error: conflicting types for 'bpf_filter'
/usr/include/pcap/bpf.h:1274:14: note: previous declaration of 'bpf_filter' was here
In file included from headers.h:203:0,
                 from ipcad.h:31,
                 from main.c:32:
/usr/local/include/pcap.h:269:7: error: conflicting types for 'bpf_filter'
/usr/include/pcap/bpf.h:1274:14: note: previous declaration of 'bpf_filter' was here
/usr/local/include/pcap.h:270:5: error: conflicting types for 'bpf_validate'
/usr/include/pcap/bpf.h:1273:12: note: previous declaration of 'bpf_validate' was here
make: *** [main.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
 
Зарегистрироваться или войдите чтобы оставить сообщение.