FreeBSD agent build ends in error

Started by possamai, May 25, 2009, 09:12:08 PM

Previous topic - Next topic

possamai

Hi,

I'm trying to build netxms on freebsd but it ends in an error on a subagent...
I'm hoping someone can give me a hint about how to get this running..
it ends with "system.cpp:227: error: 'swap' was not declared in this scope

I do have swap space though :)
Is there a way I can tell what actually goes wrong? Can I help fix stuff?

I'm running FreeBSD 7.2
this is the end of the compile


/bin/sh ../../../../libtool --tag=CXX    --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../include   -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql -I/usr/local/include -D_THREAD_SAFE -D_THREAD_SAFE -DPREFIX=\"/usr/local\" -DPREFIXW=L\"/usr/local\" -DDATADIR=\"/usr/local/share/netxms\" -DLIBDIR=\"/usr/local/lib\"  -Wno-deprecated -MT freebsd.lo -MD -MP -MF .deps/freebsd.Tpo -c -o freebsd.lo freebsd.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../include -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql -I/usr/local/include -D_THREAD_SAFE -D_THREAD_SAFE -DPREFIX=\"/usr/local\" -DPREFIXW=L\"/usr/local\" -DDATADIR=\"/usr/local/share/netxms\" -DLIBDIR=\"/usr/local/lib\" -Wno-deprecated -MT freebsd.lo -MD -MP -MF .deps/freebsd.Tpo -c freebsd.cpp  -fPIC -DPIC -o .libs/freebsd.o
mv -f .deps/freebsd.Tpo .deps/freebsd.Plo
/bin/sh ../../../../libtool --tag=CXX    --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../include   -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql -I/usr/local/include -D_THREAD_SAFE -D_THREAD_SAFE -DPREFIX=\"/usr/local\" -DPREFIXW=L\"/usr/local\" -DDATADIR=\"/usr/local/share/netxms\" -DLIBDIR=\"/usr/local/lib\"  -Wno-deprecated -MT system.lo -MD -MP -MF .deps/system.Tpo -c -o system.lo system.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../include -I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql -I/usr/local/include -D_THREAD_SAFE -D_THREAD_SAFE -DPREFIX=\"/usr/local\" -DPREFIXW=L\"/usr/local\" -DDATADIR=\"/usr/local/share/netxms\" -DLIBDIR=\"/usr/local/lib\" -Wno-deprecated -MT system.lo -MD -MP -MF .deps/system.Tpo -c system.cpp  -fPIC -DPIC -o .libs/system.o
system.cpp: In function 'LONG H_MemoryInfo(const char*, const char*, char*)':
system.cpp:227: error: 'swap' was not declared in this scope
*** Error code 1

Stop in /usr/home/tnt/netxms/netxms-0.2.26/src/agent/subagents/freebsd.
*** Error code 1

Stop in /usr/home/tnt/netxms/netxms-0.2.26/src/agent/subagents.
*** Error code 1

Stop in /usr/home/tnt/netxms/netxms-0.2.26/src/agent.
*** Error code 1

Stop in /usr/home/tnt/netxms/netxms-0.2.26/src.
*** Error code 1

Stop in /usr/home/tnt/netxms/netxms-0.2.26.
*** Error code 1

Stop in /usr/home/tnt/netxms/netxms-0.2.26.

possamai

little note..

it only happens with --with-server and with --with-agent
Apparently --with-server also builds the agent...
All other stuff doesn't matter.

Alex Kirhenshtein

Thanks for report, patch attached to this message.

To apply:

cd netxms-0.2.26/src/agent/subagents/freebsd
patch -p0 < /some/where/system.diff

possamai

hey it looks like it works :)
If you could help me (and my lazy ass) with another thing...
compared to version 0.2.24, did any files get added or deleted?

The FreeBSD port is at version 0.2.24 now, and if the amount and names of files are still the same I'm going to commit the update to 0.2.26

if not, I have to make a list of files and directories :)
(So I'm hoping for no changes :P)