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確實不支持靜態編譯

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章