IMX6Q LTIB 安装编译错误的解决办法

Posted dxmcu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IMX6Q LTIB 安装编译错误的解决办法相关的知识,希望对你有一定的参考价值。

错误一:

Processing: sparse

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

Build path taken because: no prebuilt rpm,

Testing network connectivity

OK GPP:

 

Try sparse-0.4-fixlabel.patch.md5 from theGPP

http://bitshrine.org/gpp/sparse-0.4-fixlabel.patch.md5:

16:33:48 ERROR 404: Not Found.

Try sparse-0.4-fixlabel.patch from the GPP

http://bitshrine.org/gpp/sparse-0.4-fixlabel.patch:

16:33:48 ERROR 404: Not Found.

Can't get: sparse-0.4-fixlabel.patch at ./ltibline 802.

Died at ./ltib line 1392.

traceback:

 main::build_host_rpms:1392

 main::host_checks:1447

  main:554

 

 

Started: Fri Aug 12 16:33:43 2016

Ended:  Fri Aug 12 16:33:48 2016

Elapsed: 5 seconds

 

These packages failed to build:

sparse

 

Build Failed

解决办法:

下载sparse-0.4-fixlabel.patch以及sparse-0.4-fixlabel.patch.md5文件并拷贝到/opt/freescale/pkgs下、

 

问题2:

Trying libraries: m

Failed: -Wl,--start-group -lm-Wl,--end-group

Output of:

gcc -Wall -Wshadow -Wwrite-strings -Wundef-Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function-Wunused-value -Wmissing-prototypes -Wmissing-declarations-Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen-finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections-fno-guess-branch-probability -funsigned-char -static-libgcc-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -obusybox_unstripped -Wl,--start-group applets/built-in.o archival/lib.aarchival/libarchive/lib.a console-tools/lib.a coreutils/lib.acoreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.afindutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.amailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.anetworking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.aprocps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.autil-linux/lib.a util-linux/volume_id/lib.a archival/built-in.oarchival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.ocoreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.oeditors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.olibpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.omiscutils/built-in.o modutils/built-in.o networking/built-in.onetworking/libiproute/built-in.o networking/udhcp/built-in.oprintutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.oshell/built-in.o sysklogd/built-in.o util-linux/built-in.outil-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lm-Wl,--end-group

==========

/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

make: *** [busybox_unstripped] Error 1

error: Bad exit status from/home/jack/Projects/L3.0.35_4.1.0/ltib/tmp/rpm-tmp.18437 (%build)

 

 

RPM build errors:

   Bad exit status from/home/jack/Projects/L3.0.35_4.1.0/ltib/tmp/rpm-tmp.18437 (%build)

Build time for busybox: 5 seconds

 

Failed building busybox

 

 

f_buildrpms() returned an error, exiting

traceback:

 main:572

 

 

Started: Mon Aug 15 08:05:02 2016

Ended:  Mon Aug 15 08:05:07 2016

Elapsed: 5 seconds

 

These packages failed to build:

busybox

 

Build Failed

 

Exiting on error or interrupt

 

解决办法:

出现 failed buding busybox, 这时候要执行如下操作:
1) 在 /usr/include 下创建一个软链接:
sudo ln -s i386-linux-gun/sys sys
2) 修改 ltib/dist/lfs-5.1/base_libs/base_libs.spec(注释#部分)
...
perl -w -e '
# @ARGV = grep `file $_` =~ m,ASCII C program text, @ARGV;
# exit (0) unless @ARGV;
然后在 ltib 下运行./ltib,编译成功,如下图所示:
在这里需要注意的是,如果操作系统是 Ubuntu12.04,需要有如下操作才可以成功编译:
Asudo apt-get install texinfo
B
modify ltib/dist/lfs-5.1/base_libs/base_libs.spec.
...
perl -w -e '
# @ARGV = grep `file $_` =~ m,ASCII C program text, @ARGV;
# exit (0) unless @ARGV
成功编译以后, kernel image U-Boot images 就在rootfs/boot/下面了。

 

注:root权限执行./ltib

 

编译成功如下:

Preparing...               ########################################### [100%]

  1:modeps                 ###########################################[100%]

 

Processing deployment operations

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

making filesystem image file

staging directory is/home/jack/Projects/L3.0.35_4.1.0/ltib/rootfs.tmp

removing the boot directory and files

removing man files and directories

removing info files

removing /usr/share/locale directory

removing static libraries

removing target rpm database

stripping binaries and libraries

 

Filesystem stats, including padding:

 

   Total size            = 44556k

   Total number of files = 1611

 

 

Started: Mon Aug 15 08:34:36 2016

Ended:  Mon Aug 15 08:37:52 2016

Elapsed: 196 seconds

 

Build Succeeded

以上是关于IMX6Q LTIB 安装编译错误的解决办法的主要内容,如果未能解决你的问题,请参考以下文章

PHP安装编译错误及解决办法

PHP编译安装时常见错误解决办法,php编译常见错误

E9学习笔记-LTIB安装配置

linux编译安装时常见错误解决办法

PHP编译安装时常见错误解决办法

PHP编译安装时常见错误解决办法,php编译常见错误