FAQ: net-snmp compilation in 2010(2011-05-02)

Document created by Aaronwu Employee on Aug 28, 2013Last modified by sonic on Sep 8, 2013
Version 2Show Document
  • View in full screen mode

2011-05-02 02:08:06     net-snmp compilation in 2010

Shyam sundar (INDIA)

Message: 100330   

 

Hello world,

 

When I am trying to add the net-snmp application and compile, I do get the following error,

 

I do have added SSH application to the kernel.When I tried to removing net-snmp application and build,I got error same error undefined reference to `_fork'. What could be the problem?

 

make[5]: Entering directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp'

make xEXT=a xDIR= -C build

make[6]: Entering directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build'

WARNING: not running autoconf

WARNING: not running autoheader

making all in /home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/snmplib

make[7]: Entering directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/snmplib'

make[7]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/snmplib'

making all in /home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent

make[7]: Entering directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent'

making all in /home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent/helpers

make[8]: Entering directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent/helpers'

make[8]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent/helpers'

making all in /home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent/mibgroup

make[8]: Entering directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent/mibgroup'

make[8]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent/mibgroup'

/bin/sh ../libtool  --mode=link bfin-linux-uclibc-gcc -pipe -Wall -g -O2      -mcpu=bf537-0.3 -Dlinux  -o snmpd snmpd.lo   -mcpu=bf537-0.3  libnetsnmpmibs.la libnetsnmpagent.la helpers/libnetsnmphelpers.la  ../snmplib/libnetsnmp.la -ldl -lcrypto -lm

bfin-linux-uclibc-gcc -pipe -Wall -g -O2 -mcpu=bf537-0.3 -Dlinux -o snmpd snmpd.o -mcpu=bf537-0.3  ./.libs/libnetsnmpmibs.a ./.libs/libnetsnmpagent.a helpers/.libs/libnetsnmphelpers.a ../snmplib/.libs/libnetsnmp.a -ldl -lcrypto -lm

./.libs/libnetsnmpagent.a(execute.o): In function `run_exec_command':

../../net-snmp-5.2.1/agent/mibgroup/utilities/execute.c:212: undefined reference to `_fork'

collect2: ld returned 1 exit status

make[7]: *** [snmpd] Error 1

make[7]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build/agent'

make[6]: *** [subdirs] Error 1

make[6]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp/build'

make[5]: *** [all] Error 2

make[5]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/net-snmp'

make[4]: *** [net-snmp] Error 2

make[4]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user'

make[2]: *** [subdirs] Error 1

make[2]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1'

make[1]: *** [single_] Error 2

make[1]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1'

make: *** [single] Error 2

 

 

 

 

The net-snmp in 2010R1 release needs to be updated. Here is the svn info

 

URL: svn://blackfin.uclinux.org/uclinux-dist/branches/2010R1/user/net-snmp

Repository Root: svn://blackfin.uclinux.org/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 10161

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 6286

Last Changed Date: 2008-02-22 11:37:47 +0530 (Fri, 22 Feb 2008)

 

The net-snmp in 2009R1 has a updated version when compared to 2010R1 version.Also I dont see this update in the trunk

 

URL: svn://blackfin.uclinux.org/uclinux-dist/branches/2009R1/user/net-snmp

Repository Root: svn://blackfin.uclinux.org/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 10100

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 9600

Last Changed Date: 2010-05-04 00:10:03 +0530 (Tue, 04 May 2010)

 

 

 

 

 

QuoteReplyEditDelete

 

 

2011-05-02 07:59:38     Re: net-snmp compilation in 2010

Shyam sundar (INDIA)

Message: 100338   

 

I do get the undefined reference to `_fork' error even for SSH

 

The ssh info for 2010R1

 

URL: svn://blackfin.uclinux.org/uclinux-dist/branches/2010R1/user/ssh

Repository Root: svn://blackfin.uclinux.org/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 10161

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 9473

Last Changed Date: 2010-02-27 15:05:20 +0530 (Sat, 27 Feb 2010)

 

 

The ssh info for 2009R1

 

URL: svn://blackfin.uclinux.org/uclinux-dist/branches/2009R1/user/ssh

Repository Root: svn://blackfin.uclinux.org/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 9810

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 9474

Last Changed Date: 2010-02-27 15:09:26 +0530 (Sat, 27 Feb 2010)

QuoteReplyEditDelete

 

 

2011-05-02 22:47:30     Re: net-snmp compilation in 2010

Aaron Wu (CHINA)

Message: 100349   

 

see if this will help   docs.blackfin.uclinux.org/doku.php?id=living_without_forks&s[]=vfork

QuoteReplyEditDelete

 

 

2011-05-03 03:38:51     Re: net-snmp compilation in 2010

Shyam sundar (INDIA)

Message: 100363   

 

Hi Aaron,

 

I am little clueless !

 

What changes do I need to make? Should I copy the net-snmp and ssh versions used in 2009 into 2010? Any guidance please?

QuoteReplyEditDelete

 

 

2011-05-03 04:21:09     Re: net-snmp compilation in 2010

Shyam sundar (INDIA)

Message: 100365   

 

Hello world,

 

I have a doubt!  It is nowhere related to above discussion.

 

I did downloaded the toolchain,uboot and uclinux from the branch versions.

 

I updated the expect and tcl directory present in my branch version from trunk version.

 

So do I need to use the trunk version or branch version of the toolchain?

 

Is it ok to use the branch version of toolchain to build the branch version of uclinux in which some directories are updated from the trunk?

QuoteReplyEditDelete

 

 

2011-05-03 04:53:44     Re: net-snmp compilation in 2010

Aaron Wu (CHINA)

Message: 100367   

 

please use formal release for both uclinux distribution and toolchian unless you have a special reason.

QuoteReplyEditDelete

 

 

2011-05-03 05:07:46     Re: net-snmp compilation in 2010

Aaron Wu (CHINA)

Message: 100368   

 

You can have a try, looking into the diffrence between the net-snmp in 2010 and 2009, the version for net-snmp itself are the same, only some nommu realted porting is adopted in 2009. for the nommu realted porting, please refer to the patch for net-snmp and the link I posted above.

QuoteReplyEditDelete

 

 

2011-05-03 06:51:45     Re: net-snmp compilation in 2010

Shyam sundar (INDIA)

Message: 100374   

 

Thanks Aaron,

 

I took the net-snmp patch from 2009 and added to 2010 uclinux.That solved the compilation problem.

 

But when I added ssh applications,I do get the following error

 

make[7]: Nothing to be done for `all'.

make[7]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/ssh/build/openbsd-compat'

bfin-linux-uclibc-gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect1.o sshconnect2.o mux.o -L. -Lopenbsd-compat/     -mcpu=bf537-0.3 -lssh -lopenbsd-compat -lcrypto -lutil -lz  -lcrypt -lresolv -lresolv

sshconnect.o: In function `ssh_local_cmd':

../sshconnect.c:1177: undefined reference to `_fork'

collect2: ld returned 1 exit status

make[6]: *** [ssh] Error 1

make[6]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/ssh/build'

make[5]: *** [all] Error 2

make[5]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user/ssh'

make[4]: *** [ssh] Error 2

make[4]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1/user'

make[2]: *** [subdirs] Error 1

make[2]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1'

make[1]: *** [single_] Error 2

make[1]: Leaving directory `/home/shyam/Desktop/uc2010/uclinux/2010R1'

make: *** [single] Error 2

 

 

Do I need to add a patch for this? I compared sshconnect .c in 2009 and 2010 version, they look same.

 

URL: svn://blackfin.uclinux.org/uclinux-dist/branches/2010R1/user/ssh

Repository Root: svn://blackfin.uclinux.org/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 10161

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 9473

Last Changed Date: 2010-02-27 15:05:20 +0530 (Sat, 27 Feb 2010)

 

 

URL: svn://blackfin.uclinux.org/uclinux-dist/branches/2009R1/user/ssh

Repository Root: svn://blackfin.uclinux.org/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 9810

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 9474

Last Changed Date: 2010-02-27 15:09:26 +0530 (Sat, 27 Feb 2010)

QuoteReplyEditDelete

 

 

2011-05-03 07:21:02     Re: net-snmp compilation in 2010

Aaron Wu (CHINA)

Message: 100377   

 

Perhaps it's not fully ported, you can use vfork to replace fork, take other vforks for reference.

QuoteReplyEditDelete

 

 

2011-05-03 22:23:40     Re: net-snmp compilation in 2010

Sonic Zhang (CHINA)

Message: 100396   

 

Please use dropbear other than ssh.

QuoteReplyEditDelete

 

 

2011-05-04 00:39:39     Re: net-snmp compilation in 2010

Shyam sundar (INDIA)

Message: 100397   

 

Does dropbear support sftp?

QuoteReplyEditDelete

 

 

2011-05-04 02:35:47     Re: net-snmp compilation in 2010

Mike Frysinger (UNITED STATES)

Message: 100400   

 

yes

QuoteReplyEditDelete

 

 

2011-05-18 04:50:53     Re: net-snmp compilation in 2010

Shyam sundar (INDIA)

Message: 100718   

 

Hello world,

 

Does Dropbear support ssh tunnelling? If no, then what option would i end up with?

 

Compiling ssh was giving a problem !

QuoteReplyEditDelete

 

 

2011-05-19 00:13:53     Re: net-snmp compilation in 2010

Shyam sundar (INDIA)

Message: 100732   

 

Can anyone please tell me why I am not able to compile the ssh in 2010 distribution? I need to use the ssh tunnelling. With 2009 distribution it worked fine! I also compared 2009 and 2010 svn versions. I didnt see any changes in the code side!

QuoteReplyEditDelete

 

 

2011-05-19 11:37:51     Re: net-snmp compilation in 2010

Mike Frysinger (UNITED STATES)

Message: 100753   

 

please start new threads for new issues.  this thread is about net-snmp, so when you talk about any other package, you start a new thread for it.

Attachments

    Outcomes