Problems compiling SNMP++ v3.1 on Solaris

Simpson, Gary Gary.Simpson____tfeurope.com
Thu Apr 19 14:34:13 CEST 2001


Hello,

I have managed to fix the compilation problem, however, I now get the
following output when trying to run test_app:

 Created session successfully
 Send a GET-REQUEST to: 127.0.0.1
 Segmentation Fault (core dumped)

I have traced the fault to the MyMakeReqId() function in uxsnmp.cpp.  The
problem is that it is calling this function and snmpEventList is a null
pointer.  So it calls function snmpEventList->GetEntry but fails when it
tries to retrieve one of snmpEventList's member variables.  I have tried to
look in the code for where it should set snmpRequestList but I can't find
anything.

I do not know if this is caused by the following changes I made to the
makefile to sort out the compilation problem:

1. Replaced '-lg++' with '-lelf -lsocket -lnsl' in LDFLAGS
2. Added '-nostdlib' to SHARED

Thanks for your help,
Gary.

-----Original Message-----
From: Frary, Dave [mailto:dfrary____anatel.net]
Sent: Tuesday, April 17, 2001 2:13 PM
To: Simpson, Gary
Cc: Frank Fock
Subject: RE: Problems compiling SNMP++ v3.1 on Solaris


I had the same problem with the previous version.  I just removed the
'-lg++' from the Makefile.linux and everything worked fine.  I did this with
all makefiles within the SNMP++ distribution and the AGENT++ distribution.
I'm running standard (no additional packages) RedHat Linux 6.2.

Dave Frary

-----Original Message-----
From: Simpson, Gary [mailto:Gary.Simpson____tfeurope.com]
Sent: Tuesday, April 17, 2001 3:13 AM
To: AGENT++ (E-mail)
Subject: Problems compiling SNMP++ v3.1 on Solaris


Hello,

I have downloaded the new versions of SNMP++ and AGENT++.  However, I am
unable to compile the new version of SNMP++ as it comes up with the
following error message:

  ld: fatal: relocations remain against allocatable but non-writable
sections
  collect2: ld returned 1 exit status
  *** Error code 1
  make: Fatal error: Command failed for target '../lib/libsnmp++.so'

In order to build SNMP++, I have taken a copy of Makefile.linux and changed
this to remove the '-lg++' option (which does not work) and replaced it with
'-lelf -lsocket -lnsl'.  Without doing this, it comes up with errors saying
that library -lg++ is not found.  This worked with the previous version of
SNMP++.

Thanks for your help,
Gary.




This communication is intended solely for the addressee and is confidential
and not for third party unauthorised distribution.



More information about the AGENTPP mailing list