Перейти к содержимому
Калькуляторы

TProxy, Lusca не компилируется

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

 

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

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

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

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

libcap заголовки тоже?

Файлик /usr/include/sys/capability.h есть?

 

Там должен быть "typedef struct __user_cap_header_struct {

<------>__u32 version;

<------>int pid;

} *cap_user_header_t;"

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

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

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

это всё в /usr/include/linux/capability.h, это ядерные хеадеры

Изменено пользователем f13

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Скорее всего из-за того, что lusca перестали обновлять. Нужно искать кого-то, кто подправит сырки.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

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

 

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

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

А ldconfig вместо ребута не пробовали?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

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

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

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

 

 

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

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

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Я не в теме кэшера, но btrfs явно не рекомендую даже для кэша :)

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

^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.

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 смайлов.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.