compile error when upgrading from 5.1.4.2 to 5.4.2.1 with gcc 2.96

PoWah Wong <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
My snmp program can compile ok with net-snmp-5.1.4.2.
I want to use the newer (upgrade to) net-snmp 5.2.5.1, 5.3.2.3 or  5.4.2.1 and all three versions have the same compile errors.
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
I have to use this old gcc compiler because I still need to support the old RedHat OS.
I do not understand why 
How to fix the compile error?

My 5.1.4.2 makefile is:
all:	clean
	tar -xzf net-snmp-5.1.4.2.tar.gz
	mkdir net-snmp-5.1.4.2/agent/mibgroup/mymibs
	cp mymibs/* net-snmp-5.1.4.2/agent/mibgroup/mymibs
	cd net-snmp-5.1.4.2 ;\
	rm -f config.cache
	cd net-snmp-5.1.4.2 ;\
	./configure --with-libs=/usr/local/lib/libsensors.a --with-defaults --with-openssl=/ --with-mib-modules="mymibs/chrysalisUtsp ucd-snmp/lmSensors" --with-out-mib-modules="agent_mibs utilities"
	cd net-snmp-5.1.4.2 ;\
	make -f Makefile

clean:
	rm -rf net-snmp-5.1.4.2


My 5.4.2.1 makefile is:
all:	clean
	tar -xzf net-snmp-5.4.2.1.tar.gz
	mkdir net-snmp-5.4.2.1/agent/mibgroup/mymibs
	cp mymibs/* net-snmp-5.4.2.1/agent/mibgroup/mymibs
	cd net-snmp-5.4.2.1 ;\
	rm -f config.cache
	cd net-snmp-5.4.2.1 ;\
	./configure --with-libs=/usr/local/lib/libsensors.a --with-defaults --with-openssl=/ --with-mib-modules="mymibs/chrysalisUtsp ucd-snmp/lmSensors" --with-out-mib-modules="agent_mibs utilities"
	cd net-snmp-5.4.2.1 ;\
	make -f Makefile

clean:
	rm -rf net-snmp-5.4.2.1



The working 5.1.4.2 compile output is:
...
/bin/sh ../../libtool  --mode=compile gcc -I../../include -I../../include -I. -I../.. -I. -I./../.. -I./../../snmplib -I./.. -I..   -g -O2 -Dlinux  -c -o mymibs/myprod.lo mymibs/myprod.c
mkdir mymibs/.libs
gcc -I../../include -I../../include -I. -I../.. -I. -I./../.. -I./../../snmplib -I./.. -I.. -g -O2 -Dlinux -c mymibs/myprod.c  -fPIC -DPIC -o mymibs/.libs/myprod.lo
gcc -I../../include -I../../include -I. -I../.. -I. -I./../.. -I./../../snmplib -I./.. -I.. -g -O2 -Dlinux -c mymibs/myprod.c -o mymibs/myprod.o >/dev/null 2>&1
mv -f mymibs/.libs/myprod.lo mymibs/myprod.lo
/bin/sh ../../libtool  --mode=compile gcc -I../../include -I../../include -I. -I../.. -I. -I./../.. -I./../../snmplib -I./.. -I..   -g -O2 -Dlinux  -c -o ucd-snmp/lmSensors.lo ucd-snmp/lmSensors.c
mkdir ucd-snmp/.libs
...

The failed 5.4.2.1 compile output is:
...
/bin/sh ../../libtool  --mode=compile gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib   -g -O2 -Dlinux=linux  -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm  -I/usr/local/lib/perl5/5.8.3/i686-linux/CORE   -c -o mymibs/myprod.lo mymibs/myprod.c
mkdir mymibs/.libs
 gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -g -O2 -Dlinux=linux -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/local/lib/perl5/5.8.3/i686-linux/CORE -c mymibs/myprod.c  -fPIC -DPIC -o mymibs/.libs/myprod.o
mymibs/myprod.c:31:51: ../../../hwapi_dir/source/oamp_shm.h: No such file or directory
make[3]: *** [mymibs/myprod.lo] Error 1





      __________________________________________________________________
Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.