Jump to content

Stg-2.4-2007.01.20-13.47.20 + Debian 5.0


Recommended Posts

Пытаюсь собрать сабжевый стг, вот что вышло:

 

server02:~/stg-2.4-2007.01.20-13.47.20/projects/stargazer# ./build

#############################################################################

Building STG 2.4 for Linux

#############################################################################

Makeing stg_logger.lib

cp stg_logger.h ../../include/

cp libstg_logger.a ../../lib/

Makeing crypto.lib

cp ag_md5.h blowfish.h ../../include/

cp libcrypto.a ../../lib/

Makeing common.lib

g++ -g -Wall -I ../../include/ -I ./ -DLINUX -DSTG_TIME -c common.cpp

ar rc libstg_common.a debug.o stg_error.o common.o

ranlib libstg_common.a

cp debug.h stg_error.h common.h ../../include/

cp libstg_common.a ../../lib/

Makeing script_executer.lib

g++ -g -Wall -I ../../include/ -I ./ -DLINUX -DSTG_TIME -c script_executer.cpp

ar rc libscript_executer.a script_executer.o

ranlib libscript_executer.a

cp script_executer.h ../../include/

cp libscript_executer.a ../../lib/

Makeing conffiles.lib

cp conffiles.h ../../include/

cp libconffiles.a ../../lib/

Makeing hostallow.lib

cp hostallow.h ../../include/

cp libhostallow.a ../../lib/

Makeing pinger.lib

cp pinger.h ../../include/

cp libstg_pinger.a ../../lib/

Makeing dotconfpp.lib

cp dotconfpp.h mempool.h ../../include/

cp libdotconfpp.a ../../lib/

g++ -c admin.cpp -g3 -Wall -I ../../include -DLINUX

g++ -c admins.cpp -g3 -Wall -I ../../include -DLINUX

g++ -c main.cpp -g3 -Wall -I ../../include -DLINUX

In file included from admin.h:55,

from tariff2.h:42,

from main.cpp:43:

../../include/admin_conf.h: In constructor ‘ADMIN_CONF::ADMIN_CONF()’:

../../include/admin_conf.h:32: ошибка: нет декларации ‘memset’ в этой области видимости

make: *** [main.o] Ошибка 1

 

Подскажите из-за чего эта ошибка и как исправить, если возможно?

Link to post
Share on other sites

Попробывал заменить gcc, cpp, g++, gcov с версии 4.3 на 4.1, теперь собирается с другой ошибкой в модуле ipq:

 

make[1]: Entering directory `/root/stg-2.4-2007.01.20-13.47.20/projects/stargazer/plugins/capture/ipq_linux'

g++ -c ipq_cap.cpp -g3 -Wall -fPIC -I ../../../../../include -DLINUX

/usr/include/linux/netfilter.h:44: ошибка: поле ‘in’ имеет неполный тип

/usr/include/linux/netfilter.h:45: ошибка: поле ‘in6’ имеет неполный тип

../../../../../include/base_plugin.h:30: предупреждение: ‘class BASE_PLUGIN’ has virtual functions but non-virtual destructor

../../../../../include/base_store.h:25: предупреждение: ‘class BASE_STORE’ has virtual functions but non-virtual destructor

../../../../../include/base_auth.h:19: предупреждение: ‘class BASE_AUTH’ has virtual functions but non-virtual destructor

../../../../../include/notifer.h: In instantiation of ‘PROPERTY_NOTIFIER_BASE<int>’:

../../../user.h:82: instantiated from here

../../../../../include/notifer.h:12: предупреждение: ‘class PROPERTY_NOTIFIER_BASE<int>’ has virtual functions but non-virtual destructor

../../../user.h:82: предупреждение: ‘class CHG_PASSIVE_NOTIFIER’ has virtual functions but non-virtual destructor

../../../../../include/notifer.h: In instantiation of ‘PROPERTY_NOTIFIER_BASE<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >’:

../../../user.h:92: instantiated from here

../../../../../include/notifer.h:12: предупреждение: ‘class PROPERTY_NOTIFIER_BASE<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >’ has virtual functions but non-virtual destructor

../../../user.h:92: предупреждение: ‘class CHG_TARIFF_NOTIFIER’ has virtual functions but non-virtual destructor

../../../../../include/notifer.h: In instantiation of ‘PROPERTY_NOTIFIER_BASE<double>’:

../../../user.h:102: instantiated from here

../../../../../include/notifer.h:12: предупреждение: ‘class PROPERTY_NOTIFIER_BASE<double>’ has virtual functions but non-virtual destructor

../../../user.h:102: предупреждение: ‘class CHG_CASH_NOTIFIER’ has virtual functions but non-virtual destructor

../../../../../include/notifer.h: In instantiation of ‘PROPERTY_NOTIFIER_BASE<unsigned int>’:

../../../users.h:61: instantiated from here

../../../../../include/notifer.h:12: предупреждение: ‘class PROPERTY_NOTIFIER_BASE<unsigned int>’ has virtual functions but non-virtual destructor

../../../users.h:61: предупреждение: ‘class PROPERTY_NOTIFER_IP_BEFORE’ has virtual functions but non-virtual destructor

../../../users.h:72: предупреждение: ‘class PROPERTY_NOTIFER_IP_AFTER’ has virtual functions but non-virtual destructor

../../../traffcounter.h:105: предупреждение: ‘class TRF_IP_BEFORE’ has virtual functions but non-virtual destructor

../../../traffcounter.h:118: предупреждение: ‘class TRF_IP_AFTER’ has virtual functions but non-virtual destructor

../../../../../include/notifer.h: In instantiation of ‘NOTIFIER_BASE<std::_List_iterator<USER> >’:

../../../traffcounter.h:130: instantiated from here

../../../../../include/notifer.h:19: предупреждение: ‘class NOTIFIER_BASE<std::_List_iterator<USER> >’ has virtual functions but non-virtual destructor

make[1]: *** [ipq_cap.o] Ошибка 1

make[1]: Leaving directory `/root/stg-2.4-2007.01.20-13.47.20/projects/stargazer/plugins/capture/ipq_linux'

make: *** [stargazer] Ошибка 2

Link to post
Share on other sites
  • 2 weeks later...

маленкое хау-ту по установке на дебиан 5.0

1. apt-get install libexpat1-dev gcc cpp gcc-4.1 cpp-4.1 gcc-4.1-locales gcc-4.3-locales gcc-multilib make libtool bison gcc-4.1-multilib build-essential debian-keyring g++ g++-multilib

2. после меняем gcc 4.3 на gcc 4.1 путём изменения ссылок в /usr/sbin

3. после всех этих махинация большинство версий старгейзера компилируются

Link to post
Share on other sites
А почему не 4.3?

на 4.3 появляются ошибки описанные выше.

 

кстати, забыл добавить, что для успешной компиляции последний stable версии, выложенной на сайте, нужно ещё добавить #include <netinet/in.h> в /projects/stargazer/plugins/capture/ipq_linux/ipq_cap.cpp перед #include <linux/netfilter.h>

Link to post
Share on other sites

Так вот как раз добавление этого инклада и убирает указанные выше ошибки :o

Надо не компиляторы менять а разбираться в причинах проблемы

Link to post
Share on other sites

К стати, по поводу первой ошибки: лечится добавлением #include <cstring>

Ну или заменить файлы на их-же из архива с 2.406-beta

Link to post
Share on other sites

А есть принципиальная разница в том, на каком gcc собирать stargazer? Просто визуально при сборке с gcc 4.3 больше warning'ов...

Link to post
Share on other sites

Предупреждения - не ошибки. Разницы никакой нет (ну если не считать того что разные версии компилятора по разному оптимизируют код). Сейчас я стараюсь включать самый высокий уровень предупреждений (-W -Wall) чтобы выловить все потенциальные проблемы в коде. В идеале он должен компилироваться без предупреждений.

Link to post
Share on other sites
  • 5 months later...
на 4.3 появляются ошибки описанные выше.

 

кстати, забыл добавить, что для успешной компиляции последний stable версии, выложенной на сайте, нужно ещё добавить #include <netinet/in.h> в /projects/stargazer/plugins/capture/ipq_linux/ipq_cap.cpp перед #include <linux/netfilter.h>

 

Так вот как раз добавление этого инклада и убирает указанные выше ошибки :rolleyes:

Надо не компиляторы менять а разбираться в причинах проблемы

 

этот include касается каким-нибудь боком трафико_считалки ?

а то у нас трафик не правильно считается :lol:

Link to post
Share on other sites
этот include касается каким-нибудь боком трафико_считалки ?

а то у нас трафик не правильно считается :rolleyes:

Не касается

Link to post
Share on other sites

к стати вторая ошибка лечит добавлением в ipq_cap.cpp инклуда #include <netinet/in.h>

 

а чем трафик считаете?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...