cross compiled snmpd is not responding

<[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi all, 
I have to to rum  net-snmp on a powerpc board. The direct compilation on  board gives a fairly respondimg snmpd but when I cross-compile the same on a FC4 machine for powerpc target , the compilation is successful , but the  cross compiled snmpd daemon is not responding to the snmp queries.

Cross-compiler I am using is 	
powerpc-750-linux- (upwind/gnuwing)

Host Machine is 
Linux 2.6.16-1.2096_FC4 i686 i386 GNU/Linux

The snippet for cross-compilation of snmp in my compilation script in following

--------snippet start------------------------------------
export TOP_DIR=(cvs_source_root_path)
export SNMPD_DIR=$TOP_DIR/AGNi/SNMP/SNMPDmn
export CUR_DIR=$PWD
cd $SNMPD_DIR
$SNMPD_DIR/configure --host=powerpc-750-linux-gnu --with-ar=powerpc-750-linux-gnu-ar --with-ranlib=powerpc-750-linux-gnu-ranlib --with-ld=powerpc-750-linux-gnu-ld --prefix=$TOP_DIR/mfp/snmp --with-endianness=big
make
make install
cd $CUR_DIR
--------snippet end---------------------------------------

The behaviour of the compiled snmpd is strange. For any localhost/client query, it doesn't respond at all.
On the board, I am forking the snmpd daemon in one of my parent processes as:

-------snippet start--------------------------------------

int StartSNMPD ()
{
    pid_t pid;
    char *arg[] = {"snmpd", "-Lsd -Lf /dev/null -p /var/run/snmpd -a -c /mfp/snmp/share/snmp/snmpd.conf -C", (char *) 0 };
    char dpath[20];

    strcpy ( dpath, EBX_BIN_PATH ) ;
    strcat( dpath, "/snmpd")  ;
    printf ( "\nsnmpd path is : %s\n" , dpath ) ;

    if ( (pid=fork()) < 0)
	{
        	perror("fork()-->");
	        return ERROR;
        }
    else if(pid != 0)
	{
        	waitpid(pid,NULL,0);
        }
    else if(pid == 0)
	{
        	execv ( dpath, arg);
	        return OK;
        }
    return 0;
}


--------snippet end---------------------------------------



Plz help.


Thanks & Regards
Sreejith
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.