<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Building static 1.2 agent]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I'm trying to build a static 1.2 agent,</p>
<pre><code>./configure --with-static-agent
</code></pre>
<p dir="auto">Configure script is happy, but make fails:</p>
<pre><code>  CXX    snmpproxy.o
../../../tools/create_ssa_list.sh "linux ecs logwatch ping portcheck ups" &gt; 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.
</code></pre>
<p dir="auto">Other configurations are building fine.</p>
<p dir="auto">Any workarounds? Also, is there a way to control what subagents that are compiled in? (Trying to optimizing footprint for use in embedded devices )</p>
<p dir="auto">Best regards.</p>
]]></description><link>https://forum.netxms.org/topic/1694/building-static-1.2-agent</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 08:59:06 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/1694.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 Apr 2012 10:01:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Building static 1.2 agent on Wed, 09 May 2012 11:23:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi, thank you very much for your efforts!</p>
<p dir="auto">But, I wonder if something still is broken?</p>
<p dir="auto">Building on an old Debian etch (32-bit) with configuration</p>
<pre><code>./configure --with-static-agent --with-all-static --with-static-subagents="pingcheck"
</code></pre>
<p dir="auto">Configure script ok, but make complains:</p>
<pre><code>../../../tools/create_ssa_list.sh "linux pingcheck" &gt; static_subagents.cpp
  CXX    static_subagents.o
make[4]: *** No rule to make target `../../../src/db/libnxdb/libnxdb.la', needed by `nxagentd'.  Stop.
</code></pre>
<p dir="auto">Also, seems to be some 64bit issues in RC1. When building on SuSE 64 bit, I get this:</p>
<pre><code>  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 1
</code></pre>
<p dir="auto">Changed file include/nms_common.h, from int to intptr_t in the SOCKET typedef:</p>
<pre><code>typedef intptr_t SOCKET;
</code></pre>
<p dir="auto">Got a bit longer, next error was</p>
<pre><code>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 1
</code></pre>
<p dir="auto">changed push.cpp,</p>
<pre><code> from: size_t size = sizeof(struct sockaddr_un);
 to: socklen_t size = sizeof(struct sockaddr_un);
</code></pre>
<p dir="auto">Then a normal build is ok, but when building with<br />
./configure --with-static-agent --with-all-static</p>
<p dir="auto">it complains,</p>
<pre><code>/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 status
</code></pre>
<p dir="auto">I think I give up on this for now <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> Will try again when next release is out. Again, thanks for your support.</p>
]]></description><link>https://forum.netxms.org/post/7372</link><guid isPermaLink="true">https://forum.netxms.org/post/7372</guid><dc:creator><![CDATA[KjellO]]></dc:creator><pubDate>Wed, 09 May 2012 11:23:52 GMT</pubDate></item><item><title><![CDATA[Reply to Building static 1.2 agent on Sat, 05 May 2012 06:10:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I've fixed that. You can download updated source archive from <a href="https://www.netxms.org/download/rc/netxms-1.2.1-rc1.tar.gz" rel="nofollow ugc">https://www.netxms.org/download/rc/netxms-1.2.1-rc1.tar.gz</a>. I also add two new options for configure:</p>
<p dir="auto">--with-all-static</p>
<p dir="auto">linker will produce really static executable, with system libraries statically linked too;</p>
<p dir="auto">--with-static-subagents=list</p>
<p dir="auto">specify list of subagents to be included into static agent. For example,</p>
<p dir="auto">./configure --with-static-agent --with-static-subagents="logwatch ping"</p>
<p dir="auto">will produce static agent with only logwatch and ping subagents.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/7356</link><guid isPermaLink="true">https://forum.netxms.org/post/7356</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sat, 05 May 2012 06:10:22 GMT</pubDate></item><item><title><![CDATA[Reply to Building static 1.2 agent on Fri, 04 May 2012 12:03:26 GMT]]></title><description><![CDATA[<p dir="auto">Just curious... is there a chance for a fix for this issue? No panic, otherwise I'll go for a "normal" build.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.netxms.org/post/7354</link><guid isPermaLink="true">https://forum.netxms.org/post/7354</guid><dc:creator><![CDATA[KjellO]]></dc:creator><pubDate>Fri, 04 May 2012 12:03:26 GMT</pubDate></item><item><title><![CDATA[Reply to Building static 1.2 agent on Fri, 27 Apr 2012 12:52:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Looks like a bug in makefiles. I'll check it later today and let you know.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/7323</link><guid isPermaLink="true">https://forum.netxms.org/post/7323</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 27 Apr 2012 12:52:26 GMT</pubDate></item></channel></rss>