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确实不支持静态编译

 

你可能感兴趣的:(全志-Tina,全志-FAQ,全志-量产方法&问题)