2011-04-08 18:51:18     [fork] "function is not implemented on no-mmu systems"

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-04-08 18:51:18     [fork] "function is not implemented on no-mmu systems"

Gilles Ganault (FRANCE)

Message: 99706   

Hello

 

I was trying to compile the opkg application and got those warning:

 

 

...

 

LINK  opkg-cl

 

../libopkg/.libs/libopkg.so: warning: fork: this function is not implemented on no-mmu systems

 

 

 

Making all in tests

 

  CC    libopkg_test.o

 

  LINK  libopkg_test

 

 

 

../libopkg/.libs/libopkg.a(libbb_la-gz_open.o): In function `gz_open':

 

/tmp/opkg-576/libbb/gz_open.c:47: warning: fork: this function is not implemented on no-mmu systems

 

 

Does it mean that opkg won't run on a Blackfin without making changes to its source code, or did I (not) use the right parameters in "configure"?

 

Thank you.

QuoteReplyEditDelete

 

 

2011-04-08 21:32:01     Re: [fork] "function is not implemented on no-mmu systems"

Mike Frysinger (UNITED STATES)

Message: 99707   

 

it means when you try to use fork(), it's going to fail

 

how important the fork() usage depends on source code analysis.  the wiki covers the most common cases.

QuoteReplyEditDelete

 

 

2011-04-09 04:08:08     Re: [fork] "function is not implemented on no-mmu systems"

Gilles Ganault (FRANCE)

Message: 99710   

 

Thank you. I'll try to ask developers of that application about this issue.

QuoteReplyEditDelete

 

 

2011-04-12 18:48:57     Re: [fork] "function is not implemented on no-mmu systems"

Gilles Ganault (FRANCE)

Message: 99801   

 

BTW, is the only to check for the consequences of using fork() to read the source code, or is there a way to run the application and watch for some negative behavior, eg. memory corruption, etc.?

QuoteReplyEditDelete

 

 

2011-04-12 19:03:55     Re: [fork] "function is not implemented on no-mmu systems"

Mike Frysinger (UNITED STATES)

Message: 99803   

 

if you were using 2010R1+, the code wouldnt even link, so you'd notice right away

 

any code that doesnt check the return of fork() is already broken by design ... who knows how the problem would manifest itself

QuoteReplyEditDelete

 

 

2011-04-12 19:31:32     Re: [fork] "function is not implemented on no-mmu systems"

Gilles Ganault (FRANCE)

Message: 99804   

 

Thought so :-/ Thank you.

QuoteReplyEditDelete

 

 

2011-04-13 05:29:30     Re: [fork] "function is not implemented on no-mmu systems"

Gilles Ganault (FRANCE)

Message: 99816   

 

As a test, using the 2010R1RC5 toolchain + uClinux-dist source code, I tried to compile a plain fork and then the opkg application which contains gz_open.c that supports fork/vfork.

 

Both cases end with the following link error: "undefined reference to `_fork'". I guess the linker stops dead whenever if finds a reference to fork().

 

Is there a way to compile/link applications that handle both fork and vfork such as this type of code, and thus, should run OK on the Blackfin?

 

===============

 

if (gz_use_vfork) {

 

*pid = vfork();

 

} else {

 

*pid = fork();

 

}

 

...

 

===============

 

 

Thank you.

QuoteReplyEditDelete

 

 

2011-04-13 14:58:39     Re: [fork] "function is not implemented on no-mmu systems"

Mike Frysinger (UNITED STATES)

Message: 99819   

 

add a check for the fork() func to configure.ac, and then use "#ifdef HAVE_FORK" in the code

QuoteReplyEditDelete

Attachments

    Outcomes