前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >FAQ_全志平台Tina系统lzop编译失败问题解决方法

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

作者头像
阿志小管家
发布2024-02-02 15:00:29
1230
发布2024-02-02 15:00:29
举报

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

【现象】

编译过程中报错:

代码语言:javascript
复制
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不支持静态编译

【解决方法】

代码语言:javascript
复制
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确实不支持静态编译

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2024-02-02,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档