ltib - fails to build Busybox in Ubuntu 12.04

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ltib - fails to build Busybox in Ubuntu 12.04

6,076 Views
makislivadas
Contributor IV

ltib is latest downloaded from freescale : L3.0.35_1.1.0_121218_source.tar.gz

Applied all the necessary patches for the build to work on ubuntu 12.04 and ltib builds well past the blue configuration screen.

However when trying to build the busybox it fails with a linker problem.

It appears the build script is not finding necessary libraries:

the linker error script is as follows:

==========

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /lib/libc.so.6

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /usr/lib/libc_nonshared.a

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find /lib/ld-linux.so.3

collect2: ld returned 1 exit status

RPM build errors:

Build time for busybox: 5 seconds

Started: Sat Mar 16 20:00:41 2013

Ended:   Sat Mar 16 20:00:47 2013

Elapsed: 6 seconds

These packages failed to build:

busybox

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


Any advice will be appreciated



Labels (1)
4 Replies

888 Views
makislivadas
Contributor IV

Managed to fix this following this thread


LTIB on Ubuntu 12.04


In particular doing this suggestion:


---------------------------------


I just noticed that my earlier note was cryptic, but in this case, you're seeing the same problem as I had: LTIB is trying to find libraries in your host system directories. In other words, it's trying to load /lib/libc.so.6 instead of finding the library within the LTIB tree.

The answer seems to be simple. Go into ltib/dist/lfs/base_libs/base_libs.spec and find these lines:

     # remove absolute paths from text search files (if they exist)

     perl -w -e '

         @ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV;

         exit(0) unless @ARGV;

Remove the last two (the lines beginning with "@ARGV" and "exit(0)" and you should be good to go.

----------------------------------

still curous why this script works on 10.04 but needs to be corrected in 12.04.


888 Views
jkobs2014
Contributor III

Thank you!

0 Kudos

888 Views
tongchunyang
Contributor III

The same problem dealt with the same way as you shown.

But my ubuntu 12.04 is the 64bit version copy.

Before do the same way, I used to make symbol link for the so files as the make error above. But it can not work anymore.

So, I think it mast be 32bit --> 64bit version, and can not find the so files as the regular way as the script does as Ubuntu 10.04.

Maybe this is the cause.

I don't know what version of the Ubuntu 10.04 you use (32bit or 64bit):smileyblush:

0 Kudos

888 Views
makislivadas
Contributor IV

This fix handles both 32bit and 64bit version of Ubuntu 12.04 and any other versions of ubuntu later then 12.04, in the same way.

0 Kudos