You are not logged in.

1

Thursday, December 22nd 2005, 10:36pm

KDE 3.5 konstruct compile errors in KSIM

I run Fedora Core 4 Linux with kernel 2.6.14-1.1644-FC4 on an i686, and currently run KDE 3.4.2.
$ gcc --version
gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)

Konstruct fails with multiple errors in KSIM's SNMPLIB.CPP inside KDEUTILS-3.5.0:
-------------------------------------------------------------------------------------------------------
snmp_p.h:24:38: error: net-snmp/net-snmp-config.h: No such file or directory
snmp_p.h:25:40: error: net-snmp/net-snmp-includes.h: No such file or directory

... <snip>
snmplib.cpp: In constructor 'KSim::Snmp::SnmpLib::SnmpLib()':
snmplib.cpp:36: error: 'init_snmp' was not declared in this scope
snmplib.cpp: At global scope:
snmplib.cpp:56: error: expected constructor, destructor, or type conversion before '*' token
snmplib.cpp: In member function 'int KSim::Snmp::SnmpLib::netsnmp_ds_set_int(int, int, int)':
snmplib.cpp:63: error: '::netsnmp_ds_set_int' has not been declared
snmplib.cpp: In member function 'int KSim::Snmp::SnmpLib::netsnmp_ds_get_int(int, int)':
snmplib.cpp:68: error: '::netsnmp_ds_get_int' has not been declared
snmplib.cpp: At global scope:
snmplib.cpp:76: error: expected ',' or '...' before '*' token
snmplib.cpp:77: error: ISO C++ forbids declaration of 'oid' with no type
snmplib.cpp:77: error: no 'KSim::Snmp::tree* KSim::Snmp::SnmpLib::netsnmp_sprint_realloc_objid_tree(u_char**, size_t*, size_t*, int, int*, int)' member function declared in class 'KSim::Snmp::SnmpLib'
snmplib.cpp: In member function 'KSim::Snmp::tree* KSim::Snmp::SnmpLib::netsnmp_sprint_realloc_objid_tree(u_char**, size_t*, size_t*, int, int*, int)':
snmplib.cpp:79: error: '::netsnmp_sprint_realloc_objid_tree' has not been declared
snmplib.cpp:79: error: 'objid' was not declared in this scope
snmplib.cpp:79: error: 'objidlen' was not declared in this scope
snmplib.cpp: At global scope:
snmplib.cpp:77: warning: unused parameter 'oid'
snmplib.cpp:82: error: expected ',' or '...' before '*' token
snmplib.cpp:82: error: ISO C++ forbids declaration of 'oid' with no type
snmplib.cpp: In member function 'int KSim::Snmp::SnmpLib::netsnmp_oid_equals(int)':
snmplib.cpp:84: error: '::netsnmp_oid_equals' has not been declared
snmplib.cpp:84: error: 'firstOid' was not declared in this scope
snmplib.cpp:84: error: 'firstOidLen' was not declared in this scope
snmplib.cpp:84: error: 'secondOid' was not declared in this scope
snmplib.cpp:84: error: 'secondOidLen' was not declared in this scope
snmplib.cpp: At global scope:
snmplib.cpp:82: warning: unused parameter 'oid'
snmplib.cpp:87: error: expected ',' or '...' before '*' token
snmplib.cpp:87: error: ISO C++ forbids declaration of 'oid' with no type
snmplib.cpp: In member function 'int KSim::Snmp::SnmpLib::snmp_oid_compare(int)':
snmplib.cpp:89: error: '::snmp_oid_compare' has not been declared
snmplib.cpp:89: error: 'firstOid' was not declared in this scope
snmplib.cpp:89: error: 'firstOidLen' was not declared in this scope
snmplib.cpp:89: error: 'secondOid' was not declared in this scope
snmplib.cpp:89: error: 'secondOidLen' was not declared in this scope
snmplib.cpp: At global scope:
snmplib.cpp:87: warning: unused parameter 'oid'
snmplib.cpp:92: error: variable or field 'snmp_error' declared void
snmplib.cpp:92: error: 'int KSim::Snmp::SnmpLib::snmp_error' is not a static member of 'class KSim::Snmp::SnmpLib'
snmplib.cpp:92: error: 'netsnmp_session' was not declared in this scope
snmplib.cpp:92: error: 'session' was not declared in this scope
snmplib.cpp:92: error: expected primary-expression before 'int'
snmplib.cpp:92: error: expected primary-expression before 'int'
snmplib.cpp:92: error: expected primary-expression before 'char'
snmplib.cpp:92: error: initializer expression list treated as compound expression
snmplib.cpp:93: error: expected ',' or ';' before '{' token
snmplib.cpp: In member function 'const char* KSim::Snmp::SnmpLib::snmp_api_errstring(int)':
snmplib.cpp:99: error: '::snmp_api_errstring' has not been declared
snmplib.cpp: In member function 'const char* KSim::Snmp::SnmpLib::snmp_errstring(int)':
snmplib.cpp:104: error: '::snmp_errstring' has not been declared
snmplib.cpp: At global scope:
snmplib.cpp:107: error: expected constructor, destructor, or type conversion before '*' token
snmplib.cpp:112: error: variable or field 'snmp_free_pdu' declared void
snmplib.cpp:112: error: 'int KSim::Snmp::SnmpLib::snmp_free_pdu' is not a static member of 'class KSim::Snmp::SnmpLib'
snmplib.cpp:112: error: 'netsnmp_pdu' was not declared in this scope
snmplib.cpp:112: error: 'pdu' was not declared in this scope
snmplib.cpp:113: error: expected ',' or ';' before '{' token
snmplib.cpp:117: error: expected constructor, destructor, or type conversion before '*' token
snmplib.cpp:122: error: variable or field 'snmp_sess_init' declared void
snmplib.cpp:122: error: 'int KSim::Snmp::SnmpLib::snmp_sess_init' is not a static member of 'class KSim::Snmp::SnmpLib'
snmplib.cpp:122: error: 'netsnmp_session' was not declared in this scope
snmplib.cpp:122: error: 'session' was not declared in this scope
snmplib.cpp:123: error: expected ',' or ';' before '{' token
snmplib.cpp:127: error: expected constructor, destructor, or type conversion before '*' token
snmplib.cpp:132: error: 'int KSim::Snmp::SnmpLib::snmp_close' is not a static member of 'class KSim::Snmp::SnmpLib'
snmplib.cpp:132: error: 'netsnmp_session' was not declared in this scope
snmplib.cpp:132: error: 'session' was not declared in this scope
snmplib.cpp:133: error: expected ',' or ';' before '{' token
snmplib.cpp:137: error: 'int KSim::Snmp::SnmpLib::snmp_synch_response' is not a static member of 'class KSim::Snmp::SnmpLib'
snmplib.cpp:137: error: 'netsnmp_session' was not declared in this scope
snmplib.cpp:137: error: 'session' was not declared in this scope
snmplib.cpp:137: error: 'netsnmp_pdu' was not declared in this scope
snmplib.cpp:137: error: 'pdu' was not declared in this scope
snmplib.cpp:138: error: 'netsnmp_pdu' was not declared in this scope
snmplib.cpp:138: error: 'response' was not declared in this scope
snmplib.cpp:138: error: initializer expression list treated as compound expression
snmplib.cpp:139: error: expected ',' or ';' before '{' token
snmplib.cpp:143: error: expected ',' or '...' before '*' token
snmplib.cpp:145: error: ISO C++ forbids declaration of 'oid' with no type
snmplib.cpp: In member function 'int KSim::Snmp::SnmpLib::generate_Ku(int)':
snmplib.cpp:147: error: '::generate_Ku' has not been declared
snmplib.cpp:147: error: 'hashtype' was not declared in this scope
snmplib.cpp:147: error: 'hashtype_len' was not declared in this scope
snmplib.cpp:147: error: 'P' was not declared in this scope
snmplib.cpp:147: error: 'pplen' was not declared in this scope
snmplib.cpp:147: error: 'Ku' was not declared in this scope
snmplib.cpp:147: error: 'kulen' was not declared in this scope
snmplib.cpp: At global scope:
snmplib.cpp:145: warning: unused parameter 'oid'
pdu.cpp: In constructor 'KSim::Snmp::PDU::PDU()':
pdu.cpp:33: error: class 'KSim::Snmp::PDU' does not have any field named 'd'
pdu.cpp: In constructor 'KSim::Snmp::PDU::PDU(int)':
pdu.cpp:39: error: 'd' was not declared in this scope
pdu.cpp:39: error: 'class KSim::Snmp::SnmpLib' has no member named 'snmp_pdu_create'
pdu.cpp: In destructor 'KSim::Snmp::PDU::~PDU()':
pdu.cpp:44: error: 'd' was not declared in this scope
pdu.cpp: In member function 'void KSim::Snmp::PDU::addNullVariable(KSim::Snmp::Identifier)':
pdu.cpp:56: error: 'd' was not declared in this scope
pdu.cpp:57: error: 'class KSim::Snmp::SnmpLib' has no member named 'snmp_add_null_var'
pdu.cpp:57: error: 'struct KSim::Snmp::Identifier::Data' has no member named 'data'
pdu.cpp: At global scope:
pdu.cpp:60: error: expected constructor, destructor, or type conversion before '*' token
pdu.cpp: In member function 'bool KSim::Snmp::PDU::hasError() const':
pdu.cpp:69: error: 'd' was not declared in this scope
pdu.cpp:72: error: 'd' was not declared in this scope
pdu.cpp:72: error: 'SNMP_ERR_NOERROR' was not declared in this scope
pdu.cpp: In member function 'int KSim::Snmp::PDU::errorCode() const':
pdu.cpp:77: error: 'd' was not declared in this scope
pdu.cpp: In member function 'KSim::Snmp::ValueMap KSim::Snmp::PDU::variables() const':
pdu.cpp:82: error: 'd' was not declared in this scope
pdu.cpp:87: error: 'variable_list' was not declared in this scope
pdu.cpp:87: error: 'var' was not declared in this scope
pdu.cpp:87: error: 'd' was not declared in this scope
make[6]: *** [ksim_snmp_la.all_cpp.lo] Error 1
make[6]: Leaving directory `/home/reindeer/Programs/konstruct/kde/kdeutils/work/kdeutils-3.5.0/ksim/monitors/snmp'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/reindeer/Programs/konstruct/kde/kdeutils/work/kdeutils-3.5.0/ksim/monitors'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/reindeer/Programs/konstruct/kde/kdeutils/work/kdeutils-3.5.0/ksim'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/reindeer/Programs/konstruct/kde/kdeutils/work/kdeutils-3.5.0'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/reindeer/Programs/konstruct/kde/kdeutils/work/kdeutils-3.5.0'
make[1]: *** [build-work/kdeutils-3.5.0/Makefile] Error 2
make[1]: Leaving directory `/home/reindeer/Programs/konstruct/kde/kdeutils'
make: *** [dep-../../kde/kdeutils] Error 2
-----------------------------------------------------------------------------------------------------
Has anyone else encountered this?
Why would the snmp header files be missing?
I searched the forum, and could not find any reference to errors in snmplib.cpp.
Is this a problem with KSIM?
Does this require me to use a different version of GCC? (other than 4.0.2)
Any help would be greatly appreciated. Thanks.

This post has been edited 2 times, last edit by "Reindeer" (Dec 23rd 2005, 4:50am)


2

Wednesday, January 4th 2006, 10:36am

I found compiled binaries and installed them by forcing an upgrade,
using rpm -ivh --force.
I'm bugged that this one error prevented me from compiling KDE 3.5.
I'm also shocked that not a single person has encountered this error.

3

Sunday, January 29th 2006, 9:10pm

Same problem

Hi. I have exactly the same problem; I'm running RedHat Enterprise Linux 4 AS (2.6.9-5 EL).

My guess is that it's a Redhat thing (since we're the only ones that have reported it). It is, as you said, a bit strange that no one else has complained.

While the binaries would be an option, I'd much rather appreciate a direct solution to the problem. I managed to solve the previous problems using solutions posted here, so I'm hoping it will be the same in this case.

4

Tuesday, January 31st 2006, 4:25pm

RE: KDE 3.5 konstruct compile errors in KSIM

The real errors are these ones:

Quoted

Originally posted by Reindeer
snmp_p.h:24:38: error: net-snmp/net-snmp-config.h: No such file or directory
snmp_p.h:25:40: error: net-snmp/net-snmp-includes.h: No such file or directory
The problem is that those files cannot be found.

There can be two possiblities for it: the files does not exists, or it search at the wrong places.

If the files does not exists, it is most likely that net-snmp isn't installed at your system. I think this should be catched by ./configure, but I quick solution would be to install that package. You can find out if that files exists with

Source code

1
locate net-snmp-config.h
(if you haven't a recent locate-database, exec su - -c "updatedb" first)

If you have that files at another place, you can pass addition search location to ./configure (I don't know exactly how ./configure-options are handled in Konstruct). Extra locations are given with --with-extra-includes=/path/to/right/include Maybe you also have to put a additional libary path (--with-extra-libs).

5

Friday, February 3rd 2006, 2:15am

I had same issue

I had the same issue:

snmp_p.h:24:38: error: net-snmp/net-snmp-config.h: No such file or directory
snmp_p.h:25:40: error: net-snmp/net-snmp-includes.h: No such file or directory


The answer for CentOS 4.2, which is almost the same as RHE 4:

install the net-snmp-devel rpm . Other dependancies may be required though.


Hope this helps...
[H]ardware: AMD X2 4200, 2GB RAM, 200GB HD, NV7800, ABIT AN8

OS's: WinXP,CentOS 4.2, OSX 10.4