[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] Added defconfig files for Android, Cygwin and FreeBSD
From:       Dan Fandrich <dan () coneharvesters ! com>
Date:       2011-07-20 4:37:19
Message-ID: 20110720043717.GA28793 () coneharvesters ! com
[Download RAW message or body]

On Wed, Jul 20, 2011 at 02:10:22AM +0800, Botao Sun wrote:
> I'm following your patch to build the Busybox on my own Android platform, but
> this error raised:
> ==========
> /mnt/user/botao_sun/busybox/trunk_busybox/pandaleb/android-toolchain-eabi/bin
> /../lib/gcc/arm-eabi/4.5.4/../../../../arm-eabi/bin/ld: cannot find -lm
> collect2: ld returned 1 exit status
> make: *** [busybox_unstripped] Error 1
> #############################################################################
> 
> The compiling mode I set is "static", so I check the build script and I find
> that there is no "$A/out/target/product/$P/obj/STATIC_LIBRARIES/
> libm_intermediates" in my system. 

You'll have to find out why libm isn't being built, or if it is, where the library
is now stored. Based on the toolchain version, it looks like you're using a newer
version of Android than I was, so plenty could have changed in the meantime. Those
linker flags point to internal Android build paths that aren't really meant to
be used in this manner, so it's not completely unexpected that this might break
between releases.

> Then I switch to the "Dynamic" mode, build
> script works well now, but when I execute "make install", I get this error:
> #############################################################################
> /mnt/user/botao_sun/busybox/trunk_busybox/pandaleb/android-toolchain-eabi/bin
> /../lib/gcc/arm-eabi/4.5.4/../../../../arm-eabi/bin/ld: cannot find -lcrypt

You can't run plain "make install" because that doesn't set the right environment
variables for an Android build. You need to run "examples/android-build install"
instead.

> But I find the "crypt" already exists in my system:
> #############################################################################
> ldconfig -p | grep crypt
>     libk5crypto.so.3 (libc6,x86-64) => /usr/lib/libk5crypto.so.3
>     libk5crypto.so.3 (libc6) => /usr/lib32/libk5crypto.so.3
[...]
Installed host libraries are irrelevant when cross-compiling.

> Anyway, I find there is an executable file named "busybox", then I try to run
> it as "./busybox", I get "/system/bin/linker: No such file or directory".

That's the Android run-time linker that it's looking for. Such a Busybox binary
can only be run on a system with the normal Android libraries available. Once again,
it's possible that a newer version of Android has moved the run-time linker to a
different location, so you may need to edit the example build script accordingly.

>>> Dan
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic