FAQ_全志平台Tina系统lzop编译失败问题解决方法

FAQ_全志平台Tina系统lzop编译失败问题解决方法 

【现象】

编译过程中报错:

make[3]: Leaving directory `/home/Work/new/tools/pack-bintools'
make[3]: Entering directory `/home/Work/new/tools/lzo'
make[3]: Leaving directory `/home/Work/new/tools/lzo'
make[3]: Entering directory `/home/Work/new/tools/lzo'
make[3]: Leaving directory `/home/Work/new/tools/lzo'
make[3]: Entering directory `/home/Work/new/tools/lzop'
(cd /home/Work/dev/out/cowbell-std/compile_dir/host/lzop-1.04/; if [ -x configure ]; then cp -fpR /home/Work/new/scripts/config.{guess,sub} /home/Work/new/out/cowbell-std/compile_dir/host/lzop-1.04// &&  bash ./configure CC="gcc" CFLAGS="-O2 -I/home/Work/new/out/host/include -I/home/Work/new/out/host/usr/include " CPPFLAGS="-I/home/Work/new/out/host/include -I/home/Work/dev/new/out/host/usr/include " LDFLAGS="-L/home/Work/new/out/host/lib -L/homen/Work/LX05-dev/lx05_new/out/host/usr/lib  -static" SHELL="/usr/bin/env bash" --target=x86_64-redhat-linux --host=x86_64-redhat-linux --build=x86_64-redhat-linux --program-prefix="" --program-suffix="" --prefix=/home/Work/new/out/host --exec-prefix=/home/Work/new/out/host --sysconfdir=/home/Work/new/out/host/etc --localstatedir=/home/mrzhen/Work/new/out/host/var --sbindir=/home/Work/new/out/host/bin ; fi )
configure: Configuring lzop 1.04
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking target system type... x86_64-redhat-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking for x86_64-redhat-linux-gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/Work/new/out/cowbell-std/compile_dir/host/lzop-1.04':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[3]: *** [/home/Work/new/out/cowbell-std/compile_dir/host/lzop-1.04/.configured] Error 77
make[3]: Leaving directory `/home/Work/LX05-dev/new/tools/lzop'
make[2]: *** [tools/lzop/compile] Error 2
make[2]: Leaving directory `/home/Work/new'
make[1]: *** [/home/Work/new/out/cowbell-std/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2
make[1]: Leaving directory `/home/Work/new'
make: *** [world] 错误 2

 

编译的设备gcc是4.8.5,内核3.82

 

【原因】编译用的pc的gcc不支持静态编译

 

【解决方法】

chenkunyao@ExdroidC1:~/workspace/tina2.0/the_same_as_server_tina/tools/lzop$ git diff .
diff --git a/lzop/Makefile b/lzop/Makefile
index 866c630..3f86628 100644
--- a/lzop/Makefile
+++ b/lzop/Makefile
@@ -18,7 +18,7 @@ HOST_BUILD_PARALLEL:=1
 include $(BUILD_DIR)/host-build.mk
 
 # compile static for host without library liblzo2.so.2
-HOST_LDFLAGS += -static
+# HOST_LDFLAGS += -static
 
 define Host/Install

可以试下x86_64-redhat-linux-gcc -o hello hello.c -static或者gcc -o hello hello.c -static,如果也无法编译,就证明这个pc的gcc确实不支持静态编译

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值