Building static 1.2 agent
-
Hi!
I'm trying to build a static 1.2 agent,
./configure --with-static-agentConfigure script is happy, but make fails:
CXX snmpproxy.o ../../../tools/create_ssa_list.sh "linux ecs logwatch ping portcheck ups" > static_subagents.cpp CXX static_subagents.o CXX subagent.o CXX sysinfo.o CXX tools.o CXX trap.o CXX upgrade.o CXX watchdog.o make[4]: *** No rule to make target `../../../src/db/libnxdb/libnxdb.la', needed by `nxagentd'. Stop.Other configurations are building fine.
Any workarounds? Also, is there a way to control what subagents that are compiled in? (Trying to optimizing footprint for use in embedded devices )
Best regards.
-
Hi!
Looks like a bug in makefiles. I'll check it later today and let you know.
Best regards,
Victor -
-
Hi!
I've fixed that. You can download updated source archive from https://www.netxms.org/download/rc/netxms-1.2.1-rc1.tar.gz. I also add two new options for configure:
--with-all-static
linker will produce really static executable, with system libraries statically linked too;
--with-static-subagents=list
specify list of subagents to be included into static agent. For example,
./configure --with-static-agent --with-static-subagents="logwatch ping"
will produce static agent with only logwatch and ping subagents.
Best regards,
Victor -
Hi, thank you very much for your efforts!
But, I wonder if something still is broken?
Building on an old Debian etch (32-bit) with configuration
./configure --with-static-agent --with-all-static --with-static-subagents="pingcheck"Configure script ok, but make complains:
../../../tools/create_ssa_list.sh "linux pingcheck" > static_subagents.cpp CXX static_subagents.o make[4]: *** No rule to make target `../../../src/db/libnxdb/libnxdb.la', needed by `nxagentd'. Stop.Also, seems to be some 64bit issues in RC1. When building on SuSE 64 bit, I get this:
CXX extagent.o extagent.cpp: In function CSCPMessage* ReadMessageFromPipe(void*, void*): extagent.cpp:131:34: error: cast from void to SOCKET loses precision make[4]: *** [extagent.o] Error 1Changed file include/nms_common.h, from int to intptr_t in the SOCKET typedef:
typedef intptr_t SOCKET;Got a bit longer, next error was
push.cpp: In function void* PushConnector(void*): push.cpp:245:63: error: cannot convert size_t* to socklen_t* for argument 3 to int accept(int, sock addr*, socklen_t*) make[4]: *** [push.o] Error 1changed push.cpp,
from: size_t size = sizeof(struct sockaddr_un); to: socklen_t size = sizeof(struct sockaddr_un);Then a normal build is ok, but when building with
./configure --with-static-agent --with-all-staticit complains,
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: attempted static link of dynamic object `../../../src/db/libnxdb/.libs/libnxdb.so' collect2: ld returned 1 exit statusI think I give up on this for now
Will try again when next release is out. Again, thanks for your support.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login