Ltib 编译出问题

1、运行./ltib –m config 就出错了

错误1:提示没安装zlib,其实系统已经安装了相应的包,只是没找到,网上有说注释掉zlib检查的代码,但我想这不是好办法,总不能出错的地方就不要了。
解决方法 :添加路径,打开目录/ltib/bin/Ltibutils.pm 文件,search for zlib部分代码;
 
  
ltib安装问题
--- original/bin/Ltibutils.pm   2012-08-15 12:04:53.728901999 -0500
+++ ltib/bin/Ltibutils.pm       2012-08-15 12:12:01.916901781 -0500
@@ -562,7 +562,7 @@
     binutils         => 'ar --version 2>/dev/null',
     'gcc-c++'        => 'g++ --version 2>/dev/null',
     glibc            => 'ldd --version 2>/dev/null',
-    'glibc-devel'    => sub { -f '/usr/lib/libm.so' || -f '/usr/lib64/libm.so' || -f '/usr/lib32/libm.so' || -f '/usr/lib/x86_64-linux-gnu/libm.so' || -f '/usr/lib/i386-linux-gnu/libm.so' },
+    'glibc-devel'    => sub { -f '/usr/lib/libm.so' || -f '/usr/lib64/libm.so' || -f '/usr/lib32/libm.so' || -f '/usr/lib/x86_64-linux-gnu/libm.so' || -f '/usr/lib/i386-linux-gnu/libm.so' || -f '/usr/lib64/libz.so' },
     'glibc-headers'  => sub { -f '/usr/include/stdio.h' },
     'libstdc++' => sub {
             return system_nb(<<TXT) == 0;
@@ -585,6 +585,7 @@
     zlib         => sub { my @f = (glob('/usr/lib/libz.so*'),
                                    glob('/lib/libz.so*'),
                                    glob('/lib64/libz.so*'),
+                                  glob('/lib/i386-linux-gnu/libz.so*'),
                                    glob('/usr/lib/i386-linux-gnu/libz.so*'),
                                    glob('/usr/lib32/libz.so*'),
                                    glob('/usr/lib/x86_64-linux-gnu/libz.so*') ); @f > 1 ? 1 : 0 },
 
哪个路径没有,添加哪个路径。

错误2:
ltib安装问题
You don't have a working TeX binary installed, but the texi2dvi script
can't proceed without it. If you want to use this script, you have to
install some kind of TeX, for example TeX Live Debian packages. You can do
that with this command:
       apt-get install texlive
make[2]: *** [flex.pdf] Error 1
make[2]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/flex-2.5.37/doc'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/flex-2.5.37'
make: *** [install] Error 2
error: Bad exit status from /home/cody/i.mx6/ltib/tmp/rpm-tmp.99407 (%install)


RPM build errors:
    Bad exit status from /home/cody/i.mx6/ltib/tmp/rpm-tmp.99407 (%install)
Build time for flex: 27 seconds

Failed building flex
Died at ./ltib line 1392.
traceback:
 main::build_host_rpms:1392
  main::host_checks:1447
   main:554

解决:
sudo apt-get install texinfo
sudo apt-get install texlive
错误3:
ltib安装问题
Build path taken because: directory build, no prebuilt rpm, 

Cowardly refusing to clobber existing directory:
 /opt/freescale/ltib/usr/src/rpm/BUILD/flex-2.5.37
Remove this by hand if you really want to rebuild this package from scratch

Died at ./ltib line 1392.
traceback:
 main::build_host_rpms:1392
  main::host_checks:1447
   main:554

解决:
sudo rm -Rf /opt/freescale/ltib/usr/src/rpm/BUILD/flex-2.5.37
sudo rm -Rf /opt/freescale/ltib/usr/src/rpm/BUILD/libtool-2.4.2
 
错误4:
ltib安装问题
/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-3.0.35-4.0.0/common/stdafx.h:30:36: fatal error: /usr/include/sys/types.h: No such file or directory
compilation terminated.
make[1]: *** [AESKey.o] Error 1
make[1]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-3.0.35-4.0.0/bld/linux'
make: *** [all] Error 2
error: Bad exit status from /home/cody/i.mx6/ltib/tmp/rpm-tmp.77914 (%build)


RPM build errors:
    Bad exit status from /home/cody/i.mx6/ltib/tmp/rpm-tmp.77914 (%build)
Build time for elftosb: 1 seconds

Failed building elftosb
Died at ./ltib line 1392.
traceback:
 main::build_host_rpms:1392
  main::host_checks:1447
   main:554


解决:将下面内容保存为:elftosb-types_h-fix.patch并放在/opt/freescale/pkgs/目录
ltib安装问题
diff -rupN elftosb-11.09.01/common/stdafx.h elftosb-11.09.01-new/common/stdafx.h
--- elftosb-11.09.01/common/stdafx.h    2011-03-01 05:05:19.000000000 +0100
+++ elftosb-11.09.01-new/common/stdafx.h        2013-05-07 06:03:56.399989483 +0200
@@ -27,7 +27,7 @@
 // For Linux systems only, types.h only defines the signed
 // integer types.  This is not professional code.
 // Update: They are defined in the header files in the more recent version of redhat enterprise gcc.
-#include "/usr/include/sys/types.h"
+#include 
 #include 
 //typedef unsigned long uint32_t;
 //typedef unsigned short uint16_t;
diff -rupN elftosb-11.09.01/stdafx.h elftosb-11.09.01-new/stdafx.h
--- elftosb-11.09.01/stdafx.h   2013-05-07 06:04:25.055987505 +0200
+++ elftosb-11.09.01-new/stdafx.h       2013-05-07 06:03:23.671990775 +0200
@@ -27,7 +27,7 @@
 // For Linux systems only, types.h only defines the signed
 // integer types.  This is not professional code.
 // Update: They are defined in the header files in the more recent version of redhat enterprise gcc.
-#include "/usr/include/sys/types.h"
+#include 
 //typedef unsigned long uint32_t;
 //typedef unsigned short uint16_t;
 //typedef unsigned char uint8_t;

再编辑文件ltib_root/dist/lfs-5.1/elftosb/elftosb.spec,增加如下红色部分内容:
...
Source : %{name}-%{version}-%{release}.tar.gz
Patch0 : elftosb-types_h-fix.patch
BuildRoot : %{_tmppath}/%{name}
  ...
%setup -n %{name}-%{version}-%{release}
%patch0 -p1
%Build
make
...
再删掉/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-3.0.35-4.0.0,或其它以elftosb开头的,如有的话
 

注意: 在编译的过程中,你或许会遇到下面的问题:(In compile process, you will meet the following problem.) 
 1. sys/acl.h: No such file or directory  --> sudo apt-get install libacl1-dev 
 2. compr_lzo.c:29:23: error: lzo/lzo1x.h: No such file or directory  --> sudo apt-get install liblzo-dev (Maybe use liblzo2-dev replace it) 
 3. uuid/uuid.h: No such file or directory --> sudo apt-get install uuid-dev  
4. 到这里应该没什么错误了,再根据官方文档“i.MX_6Dual6Quad_Sabre-AI_Linux_User_Guide”来配置就OK了
 
5.运行./ltib 又遇到错误:
ltib安装问题
/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/cody/i.mx6/ltib/tmp/rpm-tmp.92805 (%build)


RPM build errors:
    Bad exit status from /home/cody/i.mx6/ltib/tmp/rpm-tmp.92805 (%build)
Build time for busybox: 46 seconds

Failed building busybox




解决:https://community.freescale.com/message/332355#332355
ltib安装问题
1) install patch-ltib-ubuntu12.04.sh from (https://community.freescale.com/docs/DOC-93455).
2) create a soft link under /usr/include.
     sudo ln -s i386-linux-gun/sys sys
3) install additional packages.
     sudo aptitude -y install asciidoc texlive-latex-base dblatex xutils-dev
     sudo apt-get install texinfo
4) 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;


6.终于看到成功的信息

Build Succeeded

 

转载于:https://www.cnblogs.com/zyy5/p/4392278.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值