1

Исходники IPCAD взял отсюда. Скофигурировал:

+ открыть спойлер

 Консоль:
#./configure
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... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for bison... no
checking for byacc... no
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
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... no
checking net/bpf.h presence... no
checking for net/bpf.h... no
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... no
checking libipq.h presence... no
checking for libipq.h... no
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

Пробую собрать:

+ открыть спойлер

 Консоль:
# make
gcc -DIPCAD_VERSION=\"3.7.3\" -DCONFIG_FILE=\"/usr/local/etc/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DPSRC_pcap -DIFST_linux -g -O2 -I/usr/local/include -DHAVE_CONFIG_H -W -Wall -o main.o -c main.c
main.c: In function ‘sigalarm’:
main.c:45:2: warning: implicit declaration of function ‘signal’ [-Wimplicit-function-declaration]
main.c: In function ‘main’:
main.c:247:8: error: ‘SIGCHLD’ undeclared (first use in this function)
main.c:247:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:252:8: error: ‘SIGSEGV’ undeclared (first use in this function)
main.c:253:8: error: ‘SIGBUS’ undeclared (first use in this function)
main.c:261:13: error: ‘SIG_IGN’ undeclared (first use in this function)
main.c:264:9: error: ‘SIGALRM’ undeclared (first use in this function)
main.c:265:9: error: ‘SIGINT’ undeclared (first use in this function)
main.c:266:9: error: ‘SIGHUP’ undeclared (first use in this function)
main.c:267:9: error: ‘SIGQUIT’ undeclared (first use in this function)
main.c:268:9: error: ‘SIGPIPE’ undeclared (first use in this function)
main.c:269:9: error: ‘SIGTERM’ undeclared (first use in this function)
main.c:270:9: error: ‘SIGTTIN’ undeclared (first use in this function)
main.c:272:2: warning: implicit declaration of function ‘siginterrupt’ [-Wimplicit-function-declaration]
main.c: In function ‘block_certain_signals’:
main.c:332:2: warning: implicit declaration of function ‘sigemptyset’ [-Wimplicit-function-declaration]
main.c:333:2: warning: implicit declaration of function ‘sigaddset’ [-Wimplicit-function-declaration]
main.c:333:18: error: ‘SIGINT’ undeclared (first use in this function)
main.c:334:18: error: ‘SIGHUP’ undeclared (first use in this function)
main.c:335:18: error: ‘SIGQUIT’ undeclared (first use in this function)
main.c:336:18: error: ‘SIGTERM’ undeclared (first use in this function)
main.c:337:2: warning: implicit declaration of function ‘sigprocmask’ [-Wimplicit-function-declaration]
main.c:337:21: error: ‘SIG_BLOCK’ undeclared (first use in this function)
main.c: In function ‘terminate_threads’:
main.c:410:3: warning: implicit declaration of function ‘pthread_kill’ [-Wimplicit-function-declaration]
main.c:410:26: error: ‘SIGALRM’ undeclared (first use in this function)
main.c: In function ‘block_certain_signals’:
main.c:338:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [main.o] Ошибка 1

И не пойму, что за ошибки выдает. Что делаю не так?

2

nano headers.h

Есть ли  ?

#include <signal.h>

3

У вас чего-то не хватает, плюс конфигурация по умолчанию.
http://www.debian.org/doc/manuals/maint … ld.ru.html

Истинный hotplug - это обычная электрическая розетка: воткнул - работает, и никаких драйверов.
Arch Linux/Xfce/Xiaomi Mi Notebook Pro 15.6 | Slackware64-current/Xfce/Lenovo G580

4

marikk,

marikk пишет:

Есть ли  ?

да, есть.

5 (27.03.2014 15:42:51 отредактировано marikk)

Nigelist пишет:

да, есть.

Интересно. На Debian “squeeze” собралось нормально.
закомментировал  signal.h получил

+ открыть спойлер

 Консоль:

#:/tmp/ipcad-3.7.3# make
gcc -DIPCAD_VERSION=\"3.7.3\" -DCONFIG_FILE=\"/usr/local/etc/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DPSRC_pcap -DIFST_linux -g -O2 -I/usr/local/include -DHAVE_CONFIG_H -W -Wall -o main.o -c main.c
main.c: In function ‘sigalarm’:
main.c:45: warning: implicit declaration of function ‘signal’
main.c: In function ‘main’:
main.c:247: error: ‘SIGCHLD’ undeclared (first use in this function)
main.c:247: error: (Each undeclared identifier is reported only once
main.c:247: error: for each function it appears in.)
main.c:252: error: ‘SIGSEGV’ undeclared (first use in this function)
main.c:253: error: ‘SIGBUS’ undeclared (first use in this function)
main.c:261: error: ‘SIG_IGN’ undeclared (first use in this function)
main.c:264: error: ‘SIGALRM’ undeclared (first use in this function)
main.c:265: error: ‘SIGINT’ undeclared (first use in this function)
main.c:266: error: ‘SIGHUP’ undeclared (first use in this function)
main.c:267: error: ‘SIGQUIT’ undeclared (first use in this function)
main.c:268: error: ‘SIGPIPE’ undeclared (first use in this function)
main.c:269: error: ‘SIGTERM’ undeclared (first use in this function)
main.c:270: error: ‘SIGTTIN’ undeclared (first use in this function)
main.c:272: warning: implicit declaration of function ‘siginterrupt’
main.c: In function ‘block_certain_signals’:
main.c:332: warning: implicit declaration of function ‘sigemptyset’
main.c:333: warning: implicit declaration of function ‘sigaddset’
main.c:333: error: ‘SIGINT’ undeclared (first use in this function)
main.c:334: error: ‘SIGHUP’ undeclared (first use in this function)
main.c:335: error: ‘SIGQUIT’ undeclared (first use in this function)
main.c:336: error: ‘SIGTERM’ undeclared (first use in this function)
main.c:337: warning: implicit declaration of function ‘sigprocmask’
main.c:337: error: ‘SIG_BLOCK’ undeclared (first use in this function)
main.c: In function ‘terminate_threads’:
main.c:410: warning: implicit declaration of function ‘pthread_kill’
main.c:410: error: ‘SIGALRM’ undeclared (first use in this function)

6

Nigelist пишет:

 Консоль:
checking for bison... no
checking for byacc... no
checking for flex... no

Установил byacc, bison, flex.

Nigelist пишет:

 Консоль:
checking libipq.h usability... no
checking libipq.h presence... no
checking for libipq.h... no

Установил iptables-dev.
Вроде при конфигурировании меньше стало ошибок:

+ открыть спойлер

 Консоль:
# ./configure
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... /usr/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... no
checking net/bpf.h presence... no
checking for net/bpf.h... no
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

Но по остальным пунктам, что делать не знаю:

 Консоль:
checking whether we are cross compiling... no
...
checking for pthread_detach... no
...
checking for linux/netfilter.h... no
checking for linux/if.h... no
...
checking for socket in -lsocket... no
...
checking net/bpf.h usability... no
checking net/bpf.h presence... no
checking for net/bpf.h... no
...
checking whether byte ordering is bigendian... no

7

marikk пишет:

Интересно. На Debian “squeeze” собралось нормально.

Можете собрать пакет через check-install?

8 (27.03.2014 16:27:18 отредактировано marikk)

Nigelist пишет:

Можете собрать пакет через check-install?

Сейчас попробую. Все осталось по умолчанию
http://files.mail.ru/A0AE9D0B22BC409A92D909750A01A30E

9 (27.03.2014 17:07:43 отредактировано Fat-Zer)

Nigelist пишет:

Вроде при конфигурировании меньше стало ошибок:

если чего-то нет, то это не означает ошибку... это значит, что этого просто нет...

простой способ собрать: закоментировать/удалить в headers.h строчки:

#ifndef  __need_sig_atomic_t
#define  __need_sig_atomic_t 1
#endif

правильный способ: написать ещё один тест для autotools. какой именно — не скажу, тут думать надо...
ЗЫ: правильное решение не возможно т.к. автор не выложил файлы для autotools(Makefile.am и configure.ac)...

95% процентов проблем находятся между клавиатурой и стулом.

10

Fat-Zer, тамошний configure не autotools-compilant, вот и исходников его нет...

Истинный hotplug - это обычная электрическая розетка: воткнул - работает, и никаких драйверов.
Arch Linux/Xfce/Xiaomi Mi Notebook Pro 15.6 | Slackware64-current/Xfce/Lenovo G580

11

yars пишет:

Fat-Zer, ттамошний configure не autotools-compilant, вот и исходников его нет...

# Generated by GNU Autoconf 2.59.
а это в его шапке оказалось, просто чтоб кого-то запутать =)

95% процентов проблем находятся между клавиатурой и стулом.

12

Fat-Zer, хм, я его не смотрел :-)
UPD: там же *.in должны быть.

Истинный hotplug - это обычная электрическая розетка: воткнул - работает, и никаких драйверов.
Arch Linux/Xfce/Xiaomi Mi Notebook Pro 15.6 | Slackware64-current/Xfce/Lenovo G580

13

yars пишет:

Fat-Zer, хм, я его не смотрел :-)UPD: там же *.in должны быть.

вот я и говорю, что их нету... =)
только configure не in, а ac...

95% процентов проблем находятся между клавиатурой и стулом.

14 (28.03.2014 06:55:52 отредактировано Nigelist)

marikk пишет:

Сейчас попробую. Все осталось по умолчанию
http://files.mail.ru/A0AE9D0B22BC409A92D909750A01A30E

Спасибо! Пробну сегодня поставить.

P.S. Кстати, подскажите, готовому пакету нужны эти зависимости?

Nigelist пишет:

Установил byacc, bison, flex.

Nigelist пишет:

Установил iptables-dev.

15

Nigelist, нет.

Истинный hotplug - это обычная электрическая розетка: воткнул - работает, и никаких драйверов.
Arch Linux/Xfce/Xiaomi Mi Notebook Pro 15.6 | Slackware64-current/Xfce/Lenovo G580

16

yars, не подскажете, как определять зависимости при сборке из исходников?

17

Nigelist, читать вывод configure, в случае проблем - ./config.log.
А пакеты для dev(eloper)'а готовой программе не нужны, в связи с чем и введено деление пакетов на пакеты исходного кода, пакеты разработчика, пакеты документации и пакеты бинарников.

Истинный hotplug - это обычная электрическая розетка: воткнул - работает, и никаких драйверов.
Arch Linux/Xfce/Xiaomi Mi Notebook Pro 15.6 | Slackware64-current/Xfce/Lenovo G580

18 (28.03.2014 13:37:41 отредактировано Nigelist)

yars, тему можно закрывать. Нашел ppa с готовым deb-пакетом. Перепаковал, оказалось, что зависимостей вообще нету.

19

Кстати, пока тему не прикрыли спрошу. Есть ли альтернатива IPCAD? желательно такая же простая и легкая, но со своим веб-интерфейсом или с возможностью его прикрутить.