dskvr / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

[0.1.8] Warning when cross-compiling #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On Ubuntu, I'd like to cross-compile opkg for the Blackfin/uClinux environment. 
The Blackfin has no MMU so doesn't support fork() and uses an alternative 
called vfork().

I get three warnings: Two when running "configure", and one when running "make":

=========== configure
#PATH edited to include path to toolchain
./configure --disable-curl --disable-gpg ac_cv_func_malloc_0_nonnull=yes 
--build=i686-pc-linux --host=bfin-linux-uclibc CC=bfin-linux-uclibc-gcc 
CFLAGS="-O2 -Wall -I/usr/src/uClinux-dist/linux-2.6.x/include" 
AR="bfin-linux-uclibc-ar" RANLIB="bfin-linux-uclibc-ranlib"
...
checking for bfin-linux-uclibc-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: using cross tools not prefixed with host triplet
checking pkg-config is at least version 0.20... yes
...
checking for vfork... yes
checking for working fork... cross
configure: WARNING: result yes guessed because of cross compilation
checking for working vfork... (cached) yes

=========== make
...
Making all in src
  CC    opkg-cl.o
opkg-cl.c: In function âmainâ:
opkg-cl.c:317: warning: implicit declaration of function âpkg_hash_load_feedsâ
opkg-cl.c:321: warning: implicit declaration of function 
âpkg_hash_load_status_filesâ
opkg-cl.c:277: warning: âcmd_nameâ is used uninitialized in this function
  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':
/var/tmp/opkg-0.1.8/libbb/gz_open.c:47: warning: fork: this function is not 
implemented on no-mmu systems
Making all in utils
===========

I was told that the consequence of not supporting fork() is either 
non-consequential or a show-stopper, depending on the application.

So I'd like to know whether I can safely use opkg on that non-MMU platform or 
there's just no way opkg will run without making changes to the source code.

Thank you.

Original issue reported on code.google.com by frdthe...@gmail.com on 11 Apr 2011 at 10:27

GoogleCodeExporter commented 8 years ago
Apparently, a patch was introduced for gz_open.c that supports vfork() provided 
the uset exported the env't variable "OPKG_USE_VFORK=1", so I guess this 
warning can be ignored.

Original comment by frdthe...@gmail.com on 11 Apr 2011 at 12:39

GoogleCodeExporter commented 8 years ago
The warning seems appropriate to me. In any event, it comes from your linker 
and is beyond the control of opkg.

Original comment by graham.g...@gmail.com on 13 Apr 2011 at 12:19

GoogleCodeExporter commented 8 years ago
Thanks for the clarification. opkg-cl seems to work OK.

Original comment by frdthe...@gmail.com on 13 Apr 2011 at 7:47