So, to summarize Gary's work. - The result of 'configure --with-ldflags=-Bstatic' still contains shared libraries. - The result of './configure --enable-static=yes --enable-dynamic=no' contains no shared libraries. Is it due to the two options or just one of the two options? The options are not in pre5.1.x. How do we achieve that same effect in 5.0.x?
Will the size of installation smaller if the shared libraries is not included? Thanks, Jim -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gary Clark Sent: Tuesday, October 26, 2004 9:09 PM To: Gary Clark; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Packaging of snmpd Hello, I managed to build my agent and run it. It still dies but I am tracking it down exactly why. Use: ./configure --enable-static=yes --enable-dynamic=no --with-mib_modules=psb It appears to be ok for one of the tables initialisation etc. I will find out in the next hour whats going on. No shared libraries are pulled in. Much appreciated, Garyc ----- Original Message ----- From: "Gary Clark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, October 25, 2004 5:19 PM Subject: Re: Packaging of snmpd > Hello, > > I rebuilt the executable. Yes it does build but it still contains shared > libraries. > 'configure --with-ldflags=-Bstatic'. > > The static flag does indeed gets added but the dyamic libraries are still > being pulled in and I can see them by performing an > ' ldd'. > > I looked at the rest of the static explanation. > > NETSNMPDIR=/usr/local/build/snmp/full-clean-cvs-V5-1-patches > NETSNMPCONFIG=$(NETSNMPDIR)/net-snmp-config > > NETSNMPBASECFLAGS := $(shell $(NETSNMPCONFIG) --base-cflags) > NETSNMPINCLUDES := $(shell $(NETSNMPCONFIG) --build-includes > $(NETSNMPDIR)) > # base flags after build/src include, in case it has /usr/local/include > NETSNMPCFLAGS=$(NETSNMPINCLUDES) $(NETSNMPBASECFLAGS) > > NETSNMPBASELIBS := $(shell $(NETSNMPCONFIG) --base-agent-libs) > NETSNMPEXTLIBS := $(shell $(NETSNMPCONFIG) --external-agent-libs) > NETSNMPLIBDIRS := $(shell $(NETSNMPCONFIG) --build-lib-dirs > $(NETSNMPDIR)) > NETSNMPLIBDEPS := $(shell $(NETSNMPCONFIG) --build-lib-deps > $(NETSNMPDIR)) > LIB_DEPS=$(NETSNMPLIBDEPS) > LIBS=$(NETSNMPLIBDIRS) -Wl,-Bstatic $(NETSNMPBASELIBS) -Wl,-Bdynamic > $(NETSNMPEXTLIBS) > > > STRICT_FLAGS = -Wall -Wstrict-prototypes > CFLAGS=-I. $(NETSNMPCFLAGS) $(STRICT_FLAGS) > > This replaces the standard Makefile section, which will used installed > libraries: > > NETSNMPCONFIG=net-snmp-config > > # uncomment this if you have GNU make > #NETSNMPCFLAGS := $(shell $(NETSNMPCONFIG) --base-cflags) > #NETSNMPLIBS := $(shell $(NETSNMPCONFIG) --agent-libs) > NETSNMPCFLAGS=`$(NETSNMPCONFIG) --base-cflags` > NETSNMPLIBS=`$(NETSNMPCONFIG) --agent-libs` > > LIBS=$(NETSNMPLIBS) > > The below section in the Makefile? Which Makefile? The standard Makefile > section does not contains any of the definitions. > Do we have a set of static libraries I can use to replace the share > libaries? I'm using 5.1.2 for linux red-hat. > > Much appreciated, > Garyc > > > I performed > ----- Original Message ----- > From: "Robert Story (Users)" <[EMAIL PROTECTED]> > To: "Gary Clark" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, October 25, 2004 3:12 PM > Subject: Re: Packaging of snmpd > > > > On Mon, 25 Oct 2004 12:04:27 -0500 Gary wrote: > > GC> 1) I want the snmpd executable to be self-contained and not dependant > on > > GC> installation of net-snmp. Is this possible. > > > > Yes. Try the static linking tips here: > > > > http://www.net-snmp.org/faqs/rstory/#static > > > > GC> 2) The snmpd.conf file is situated in /usr/local/share/snmp. If there > is no > > GC> /usr/local/share/snmp then can the agent > > GC> point to it using an environment variable. I know SNMPCONFPATH is > a > > GC> way. However this gave me problems > > GC> when trying to use persistence and was advised to not to set the > > GC> environment variable. Do I simply ask the user to create > > GC> a directory /usr/local/share/snmp ? > > > > That directory is not used for persistence and dose not need to exist. The > > normal configuration of snmpd can be loaded from anyplace on the > filesystem by > > pointing to it with the -c option. > > > > The persistent directory defaults to /var/net-snmp. See the configure help > for > > options on configuring various paths. > > > > -- > > Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/> > > <irc://irc.freenode.net/#net-snmp> > > Archive: > <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users> > > > > You are lost in a twisty maze of little standards, all different. > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > > Use IT products in your business? Tell us what you think of them. Give us > > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > > http://productguide.itmanagersjournal.com/guidepromo.tmpl > > _______________________________________________ > > Net-snmp-users mailing list > > [EMAIL PROTECTED] > > Please see the following page to unsubscribe or change other options: > > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Net-snmp-users mailing list > [EMAIL PROTECTED] > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Net-snmp-users mailing list [EMAIL PROTECTED] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users