Jump to content

Recommended Posts

Posted

Доброго времени суток,

 

Никак не могу скомпилировать 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

Posted

поставил 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

Posted

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) прекрасно компилируется... Однако, хотелось бы на чем-то не таком древнем.

Posted

Получилось поднять работающий 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

 

и все прекрасно работает.

Posted

да я и ребут не особо "пробовал"... так в отчаянии зашатдаунил вечером сервер, а утром почему то решил еще раз проверить - оказалось все работает!

  • 10 months later...
Posted

Что по поводу кэширования видео? все файлы идут в кэш, или только какие-то расширения?

 

 

Какая эффективность LUSCA при кэшировании видео youtube/vk/facebook ?

Что скажете по такой реализации LUSCA -> http://bandi-tech.blogspot.com/2013/07/cara-install-dan-konfigurasi-lusca-head.html

Posted

^rage^, Вы используете squid в качестве кэширующего сервера ? Как обстоят дела с видео контентом youtube/vk/ok/ И другие ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.