

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://net-snmp.sourceforge.io/wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AFAQ%3ACompiling_06b</id>
		<title>Template:FAQ:Compiling 06b - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://net-snmp.sourceforge.io/wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AFAQ%3ACompiling_06b"/>
		<link rel="alternate" type="text/html" href="https://net-snmp.sourceforge.io/wiki/index.php?title=Template:FAQ:Compiling_06b&amp;action=history"/>
		<updated>2026-04-27T18:21:34Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>https://net-snmp.sourceforge.io/wiki/index.php?title=Template:FAQ:Compiling_06b&amp;diff=3999&amp;oldid=prev</id>
		<title>Dts12: Latest FAQ revision - preparing for 5.5 release</title>
		<link rel="alternate" type="text/html" href="https://net-snmp.sourceforge.io/wiki/index.php?title=Template:FAQ:Compiling_06b&amp;diff=3999&amp;oldid=prev"/>
				<updated>2009-07-19T16:24:38Z</updated>
		
		<summary type="html">&lt;p&gt;Latest FAQ revision - preparing for 5.5 release&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Although this is definitely a Frequently Asked Question on the project&lt;br /&gt;
mailing lists, it hasn&amp;#039;t really been a Frequently &amp;#039;&amp;#039;Answered&amp;#039;&amp;#039; Question.&lt;br /&gt;
The basic problem is that none of the core development team have much&lt;br /&gt;
involvement or experience with embedded systems.  And although we have&lt;br /&gt;
repeatedly put out a plea for implementation reports and advice, this&lt;br /&gt;
has not so far been particularly successful.  So the first thing to say&lt;br /&gt;
is that the following suggestions should be treated with a greater than&lt;br /&gt;
usual level of suspicion.&lt;br /&gt;
&lt;br /&gt;
The second thing to say is that compiling the Net-SNMP project for use&lt;br /&gt;
on an embedded system typically means compiling the &amp;#039;&amp;#039;&amp;#039;agent&amp;#039;&amp;#039;&amp;#039; (rather than&lt;br /&gt;
the trap receiver, or command-line tools).  So that is what this entry&lt;br /&gt;
will concentrate on.&lt;br /&gt;
&lt;br /&gt;
There are three main aspects to consider:&lt;br /&gt;
* how to compile the code,&lt;br /&gt;
* &amp;#039;&amp;#039;what&amp;#039;&amp;#039; code to compile, and&lt;br /&gt;
* how to install the resulting agent binary.&lt;br /&gt;
&lt;br /&gt;
The Net-SNMP project uses the standard &amp;lt;CODE&amp;gt;configure&amp;lt;/CODE&amp;gt; mechanism, so the&lt;br /&gt;
usual cross-compilation options are available - in particular &amp;lt;CODE&amp;gt;--host&amp;lt;/CODE&amp;gt;&lt;br /&gt;
and &amp;lt;CODE&amp;gt;--target&amp;lt;/CODE&amp;gt;.  It is also possible to specify the compiler and linker&lt;br /&gt;
to use (&amp;lt;CODE&amp;gt;--with-cc&amp;lt;/CODE&amp;gt; and &amp;lt;CODE&amp;gt;--with-ld&amp;lt;/CODE&amp;gt;), and any special flags to pass&lt;br /&gt;
to them (&amp;lt;CODE&amp;gt;--with-cflags&amp;lt;/CODE&amp;gt; and &amp;lt;CODE&amp;gt;--with-ldflags&amp;lt;/CODE&amp;gt;).   There shouldn&amp;#039;t be&lt;br /&gt;
anything particularly special about compiling the Net-SNMP code, so&lt;br /&gt;
see the documentation for your target environment for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
(And please let us know if there &amp;#039;&amp;#039;&amp;#039;is&amp;#039;&amp;#039;&amp;#039; anything special that should be&lt;br /&gt;
mentioned here!)&lt;br /&gt;
&lt;br /&gt;
If the aim is simply to generate an SNMP agent to run on the target&lt;br /&gt;
system, it&amp;#039;s probably not necessary to compile the command-line tools&lt;br /&gt;
or trap receiver.  The configure option &amp;lt;CODE&amp;gt;--disable-applications&amp;lt;/CODE&amp;gt; will&lt;br /&gt;
omit these elements.  See the [[FAQ:Compiling_05|previous entry]] for other potentially&lt;br /&gt;
relevant useful options.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the SNMP agent (and in particular, the code for individual&lt;br /&gt;
MIB modules) is the most system-specific part of the Net-SNMP software.&lt;br /&gt;
It may prove necessary to disable particular MIB modules if they do not&lt;br /&gt;
compile successfully, or attempt to use the wrong system-specific APIs.&lt;br /&gt;
This can be done using the configure option &amp;lt;CODE&amp;gt;--with-out-mib-modules&amp;lt;/CODE&amp;gt;.&lt;br /&gt;
Alternatively, the option &amp;lt;CODE&amp;gt;--enable-mini-agent&amp;lt;/CODE&amp;gt; will omit all but the&lt;br /&gt;
core MIB module code.  Additional modules can then be added individually&lt;br /&gt;
using &amp;lt;CODE&amp;gt;--with-mib-modules&amp;lt;/CODE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Further information about how to deal with problems with individual MIB&lt;br /&gt;
modules is reliant on suitable reports being forthcoming from the wider&lt;br /&gt;
Net-SNMP community.  The ball is in your court!&lt;br /&gt;
&lt;br /&gt;
Finally, installing the agent binary is &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; simply a matter of copying&lt;br /&gt;
the &amp;lt;CODE&amp;gt;snmpd&amp;lt;/CODE&amp;gt; file onto the target system.  The agent typically relies on&lt;br /&gt;
a number of additional libraries (and possibly the presence of assorted&lt;br /&gt;
MIB files, unless this has been explicitly omitted).  It is normally&lt;br /&gt;
necessary to run &amp;lt;CODE&amp;gt;make install&amp;lt;/CODE&amp;gt;, before copying the installed framework&lt;br /&gt;
to the target system.&lt;br /&gt;
&lt;br /&gt;
If the install destination needs to be different to the eventual location&lt;br /&gt;
on the target system, this can be handled using the configure options&lt;br /&gt;
&amp;lt;CODE&amp;gt;--prefix&amp;lt;/CODE&amp;gt; (for the target location) and &amp;lt;CODE&amp;gt;--with-install-prefix&amp;lt;/CODE&amp;gt; (for the&lt;br /&gt;
temporary install location).  Alternatively, this can be handled as part&lt;br /&gt;
of the install command:&lt;br /&gt;
       make install prefix={target location} INSTALL_PREFIX={temp location}&lt;br /&gt;
&lt;br /&gt;
Alternatively, if the agent is compiled with static linking (and no MIB&lt;br /&gt;
files), then it may be possible to simply copy the agent binary across to&lt;br /&gt;
the target system.  See the [[FAQ:Compiling_07|next entry]] for details.&lt;/div&gt;</summary>
		<author><name>Dts12</name></author>	</entry>

	</feed>