Template:FAQ:Compiling 01

From Net-SNMP Wiki
Revision as of 16:02, 19 July 2009 by Dts12 (Talk | contribs) (Latest FAQ revision - preparing for 5.5 release)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The basic mechanism for compiling the Net-SNMP project software is to run configure, followed by make (to compile it), make test (to check that it's working properly) and then make install (to install the files into the correct locations - which typically needs to be done as root.

The primary role of configure is to determines various aspects about the system that the software is being compiled on. However there are also a number of options to configure which can be used to control various aspects of the compilation environment.

The most common options are --with-mib-modules and --with-out-mib-modules which control the set of MIB module code files that are included within the agent binary. Adding or removing these modules will affect what MIB information the agent can return.
See the entry How do I add a MIB to the agent? for more details.


The configure script can also specify the compiler to use for compiling the source code (e.g. configure --with-cc=cc), the flags passed to this compiler (e.g. configure --with-cflags=-g), or to the linker (e.g. configure --with-ldflags=-Bstatic), and various other aspects of the build environment.
Run configure --help for a full list.