WebNMS Developer Forums
Click on Join Now to Sign Up
Hi,
I have made a mib using mib editor with three tables. With normal compilation using gcc, the agent answers all the querries of GET and GET_NEXT of all the elements in all tables.
But after cross compilation for arm linux and porting the agent on to an SBC, I get error messages for GET/GET_NEXT querries to elements in first two tables - "There is no such variable name in this mib. Errindx:1"
But the agent replies with normal values for elements of third table. This problem looks quite wierd to me. Please help me.
My Cross compiler details
Name: arm-linux-gcc
options: -c -g -Wall -fno-strict-aliasing -O -O2 -o
Library : ar
options: -cr
Linker: arm-linux-gcc
options: -g -o
Include LIbrary Name: -lpthread
Any help is very useful.
Thank you,
Suman
Hi Suman,
The problem may be due to compiler option. During compilation, the type char might have been set to unsigned by default and hence at run time when -1 value is assigned to char variable, it takes the value as 255.
The problem can be solved by changing the compiler option present in Makefile.
Change the option COMP_OPT=-c -g -Wall -O -O2 -o $@" to "COMP_OPT=-c -g -Wall -O -O2 -fsigned-char -o $@" in all the Makefiles present under the "agent, agent/source, agent/stubs" directories and their sub-directories.
Then compile the source and run the agent.
If problem persists, please mail us at cagent-support(at)webnms(dot)com
Hi Suman,
The problem may be due to compiler option. During compilation, the type char might have been set to unsigned by default and hence at run time when -1 value is assigned to char variable, it takes the value as 255.
The problem can be solved by changing the compiler option present in Makefile.
Change the option COMP_OPT=-c -g -Wall -O -O2 -o $@" to "COMP_OPT=-c -g -Wall -O -O2 -fsigned-char -o $@" in all the Makefiles present under the "agent, agent/source, agent/stubs" directories and their sub-directories.
Then compile the source and run the agent.
If problem persists, please mail us at cagent-support(at)webnms(dot)com.