survivor Posted February 19, 2014 Posted February 19, 2014 Доброго времени суток, Никак не могу скомпилировать Lusca с включенным TProxy (пробовал разные линуксы, ядра): ./configure --prefix=/usr/local/squid --enable-storeio=aufs --w~--enable-large-cache-files --enable-snmp --enable-linux-tproxy4 Все Ok make all ... comm_ips_tproxy4.c: In function ‘comm_ips_restoreCapabilities’: comm_ips_tproxy4.c:95: error: ‘cap_user_header_t’ undeclared (first use in this function) comm_ips_tproxy4.c:95: error: (Each undeclared identifier is reported only once comm_ips_tproxy4.c:95: error: for each function it appears in.) comm_ips_tproxy4.c:95: error: expected ‘;’ before ‘head’ comm_ips_tproxy4.c:96: error: ‘cap_user_data_t’ undeclared (first use in this function) comm_ips_tproxy4.c:96: error: expected ‘;’ before ‘cap’ comm_ips_tproxy4.c:98: error: ‘head’ undeclared (first use in this function) comm_ips_tproxy4.c:98: error: ‘_LINUX_CAPABILITY_VERSION’ undeclared (first use in this function) comm_ips_tproxy4.c:99: warning: implicit declaration of function ‘capget’ comm_ips_tproxy4.c:99: error: ‘cap’ undeclared (first use in this function) comm_ips_tproxy4.c:110: error: ‘CAP_NET_BIND_SERVICE’ undeclared (first use in this function) comm_ips_tproxy4.c:112: error: ‘CAP_NET_ADMIN’ undeclared (first use in this function) comm_ips_tproxy4.c:112: error: ‘CAP_NET_BROADCAST’ undeclared (first use in this function) comm_ips_tproxy4.c:115: warning: implicit declaration of function ‘capset’ make[1]: *** [comm_ips_tproxy4.o] Error 1 make[1]: Leaving directory `/root/LUSCA_HEAD-r14809/libiapp' make: *** [all-recursive] Error 1 Какая-то фигня, то ли с кодировкой что-то, какие-то символы непонятные вылезают. Гугл ничего про это не знает... Что я делаю не так? root@server:~/LUSCA_HEAD-r14809# uname -a Linux server 2.6.32-5-686 #1 SMP Mon Sep 23 23:00:18 UTC 2013 i686 GNU/Linux Вставить ник Quote
nuclearcat Posted February 20, 2014 Posted February 20, 2014 libcap кажется, нужен Вставить ник Quote
survivor Posted February 20, 2014 Author Posted February 20, 2014 поставил libcap - same shit: Making all in libiapp make[1]: Entering directory `/root/LUSCA_HEAD-r14809/libiapp' source='comm_ips_tproxy4.c' object='comm_ips_tproxy4.o' libtool=no \ DEPDIR=.deps depmode=none /bin/bash ../cfgaux/depcomp \ gcc -DHAVE_CONFIG_H -I. -I. -I../include -m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -g -O2 -D_REENTRANT -c comm_ips_tproxy4.c comm_ips_tproxy4.c: In function ‘comm_ips_restoreCapabilities’: comm_ips_tproxy4.c:95: error: ‘cap_user_header_t’ undeclared (first use in this function) comm_ips_tproxy4.c:95: error: (Each undeclared identifier is reported only once comm_ips_tproxy4.c:95: error: for each function it appears in.) comm_ips_tproxy4.c:95: error: expected ‘;’ before ‘head’ comm_ips_tproxy4.c:96: error: ‘cap_user_data_t’ undeclared (first use in this function) comm_ips_tproxy4.c:96: error: expected ‘;’ before ‘cap’ comm_ips_tproxy4.c:98: error: ‘head’ undeclared (first use in this function) comm_ips_tproxy4.c:98: error: ‘_LINUX_CAPABILITY_VERSION’ undeclared (first use in this function) comm_ips_tproxy4.c:99: warning: implicit declaration of function ‘capget’ comm_ips_tproxy4.c:99: error: ‘cap’ undeclared (first use in this function) comm_ips_tproxy4.c:110: error: ‘CAP_NET_BIND_SERVICE’ undeclared (first use in this function) comm_ips_tproxy4.c:112: error: ‘CAP_NET_ADMIN’ undeclared (first use in this function) comm_ips_tproxy4.c:112: error: ‘CAP_NET_BROADCAST’ undeclared (first use in this function) comm_ips_tproxy4.c:115: warning: implicit declaration of function ‘capset’ make[1]: *** [comm_ips_tproxy4.o] Error 1 make[1]: Leaving directory `/root/LUSCA_HEAD-r14809/libiapp' make: *** [all-recursive] Error 1 Вставить ник Quote
nuclearcat Posted February 20, 2014 Posted February 20, 2014 libcap заголовки тоже? Файлик /usr/include/sys/capability.h есть? Там должен быть "typedef struct __user_cap_header_struct { <------>__u32 version; <------>int pid; } *cap_user_header_t;" Вставить ник Quote
survivor Posted February 24, 2014 Author Posted February 24, 2014 libcap заголовки тоже? Файлик /usr/include/sys/capability.h есть? Там должен быть "typedef struct __user_cap_header_struct { <------>__u32 version; <------>int pid; } *cap_user_header_t;" root@server:~/LUSCA_HEAD-r14809# ls /usr/include/sys/capability.h ls: cannot access /usr/include/sys/capability.h: No such file or directory apt-get install libcap-dev root@server:~/LUSCA_HEAD-r14809# ls /usr/include/sys/capability.h /usr/include/sys/capability.h root@server:~/LUSCA_HEAD-r14809# cat /usr/include/sys/capability.h | grep user_cap_header_struct пусто make all make[1]: Entering directory `/root/LUSCA_HEAD-r14809/libiapp' if gcc -DHAVE_CONFIG_H -I. -I. -I../include -m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -g -O2 -D_REENTRANT -MT comm_ips_tproxy4.o -MD -MP -MF ".deps/comm_ips_tproxy4.Tpo" -c -o comm_ips_tproxy4.o comm_ips_tproxy4.c; \ then mv -f ".deps/comm_ips_tproxy4.Tpo" ".deps/comm_ips_tproxy4.Po"; else rm -f ".deps/comm_ips_tproxy4.Tpo"; exit 1; fi comm_ips_tproxy4.c: In function ‘comm_ips_restoreCapabilities’: comm_ips_tproxy4.c:95: error: ‘cap_user_header_t’ undeclared (first use in this function) comm_ips_tproxy4.c:95: error: (Each undeclared identifier is reported only once comm_ips_tproxy4.c:95: error: for each function it appears in.) comm_ips_tproxy4.c:95: error: expected ‘;’ before ‘head’ comm_ips_tproxy4.c:96: error: ‘cap_user_data_t’ undeclared (first use in this function) comm_ips_tproxy4.c:96: error: expected ‘;’ before ‘cap’ comm_ips_tproxy4.c:98: error: ‘head’ undeclared (first use in this function) comm_ips_tproxy4.c:98: error: ‘_LINUX_CAPABILITY_VERSION’ undeclared (first use in this function) comm_ips_tproxy4.c:99: warning: implicit declaration of function ‘capget’ comm_ips_tproxy4.c:99: error: ‘cap’ undeclared (first use in this function) comm_ips_tproxy4.c:110: error: ‘CAP_NET_BIND_SERVICE’ undeclared (first use in this function) comm_ips_tproxy4.c:112: error: ‘CAP_NET_ADMIN’ undeclared (first use in this function) comm_ips_tproxy4.c:112: error: ‘CAP_NET_BROADCAST’ undeclared (first use in this function) comm_ips_tproxy4.c:115: warning: implicit declaration of function ‘capset’ make[1]: *** [comm_ips_tproxy4.o] Error 1 make[1]: Leaving directory `/root/LUSCA_HEAD-r14809/libiapp' make: *** [all-recursive] Error 1 Методом перебора обнаружил что на lenny (с ядром 2.6.26) прекрасно компилируется... Однако, хотелось бы на чем-то не таком древнем. Вставить ник Quote
f13 Posted February 25, 2014 Posted February 25, 2014 (edited) это всё в /usr/include/linux/capability.h, это ядерные хеадеры Edited February 25, 2014 by f13 Вставить ник Quote
nuclearcat Posted February 25, 2014 Posted February 25, 2014 Скорее всего из-за того, что lusca перестали обновлять. Нужно искать кого-то, кто подправит сырки. Вставить ник Quote
survivor Posted March 4, 2014 Author Posted March 4, 2014 Получилось поднять работающий tproxy (последний lusca - LUSCA_HEAD-r14809) на последнем squeeze: cat /etc/debian_version 6.0.9 с дефолтным ядром и iptables: uname -a Linux tproxy 2.6.32-5-686 #1 iptables -h iptables v1.4.8 Оказалось, что после установки пакетов libcap-dev libpcap-dev нужно сделать... reboot!!! тогда make all не дает ошибки: make[1]: Entering directory `/root/LUSCA_HEAD-r14809/libiapp' if gcc -DHAVE_CONFIG_H -I. -I. -I../include -m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -g -O2 -D_REENTRANT -MT comm_ips_tproxy4.o -MD -MP -MF ".deps/comm_ips_tproxy4.Tpo" -c -o comm_ips_tproxy4.o comm_ips_tproxy4.c; \ then mv -f ".deps/comm_ips_tproxy4.Tpo" ".deps/comm_ips_tproxy4.Po"; else rm -f ".deps/comm_ips_tproxy4.Tpo"; exit 1; fi comm_ips_tproxy4.c: In function ‘comm_ips_restoreCapabilities’: comm_ips_tproxy4.c:95: error: ‘cap_user_header_t’ undeclared (first use in this function) comm_ips_tproxy4.c:95: error: (Each undeclared identifier is reported only once comm_ips_tproxy4.c:95: error: for each function it appears in.) comm_ips_tproxy4.c:95: error: expected ‘;’ before ‘head’ comm_ips_tproxy4.c:96: error: ‘cap_user_data_t’ undeclared (first use in this function) comm_ips_tproxy4.c:96: error: expected ‘;’ before ‘cap’ comm_ips_tproxy4.c:98: error: ‘head’ undeclared (first use in this function) comm_ips_tproxy4.c:98: error: ‘_LINUX_CAPABILITY_VERSION’ undeclared (first use in this function) comm_ips_tproxy4.c:99: warning: implicit declaration of function ‘capget’ comm_ips_tproxy4.c:99: error: ‘cap’ undeclared (first use in this function) comm_ips_tproxy4.c:110: error: ‘CAP_NET_BIND_SERVICE’ undeclared (first use in this function) comm_ips_tproxy4.c:112: error: ‘CAP_NET_ADMIN’ undeclared (first use in this function) comm_ips_tproxy4.c:112: error: ‘CAP_NET_BROADCAST’ undeclared (first use in this function) comm_ips_tproxy4.c:115: warning: implicit declaration of function ‘capset’ make[1]: *** [comm_ips_tproxy4.o] Error 1 make[1]: Leaving directory `/root/LUSCA_HEAD-r14809/libiapp' make: *** [all-recursive] Error 1 и все прекрасно работает. Вставить ник Quote
sexst Posted March 7, 2014 Posted March 7, 2014 А ldconfig вместо ребута не пробовали? Вставить ник Quote
survivor Posted March 11, 2014 Author Posted March 11, 2014 да я и ребут не особо "пробовал"... так в отчаянии зашатдаунил вечером сервер, а утром почему то решил еще раз проверить - оказалось все работает! Вставить ник Quote
npokypop Posted January 19, 2015 Posted January 19, 2015 Что по поводу кэширования видео? все файлы идут в кэш, или только какие-то расширения? Какая эффективность LUSCA при кэшировании видео youtube/vk/facebook ? Что скажете по такой реализации LUSCA -> http://bandi-tech.blogspot.com/2013/07/cara-install-dan-konfigurasi-lusca-head.html Вставить ник Quote
pavel.odintsov Posted January 19, 2015 Posted January 19, 2015 Я не в теме кэшера, но btrfs явно не рекомендую даже для кэша :) Вставить ник Quote
npokypop Posted January 19, 2015 Posted January 19, 2015 ^rage^, Вы используете squid в качестве кэширующего сервера ? Как обстоят дела с видео контентом youtube/vk/ok/ И другие ? Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.