1. 程式人生 > >mstar編譯相關問題(ubuntu12.04)

mstar編譯相關問題(ubuntu12.04)

0、mboot編譯錯誤

make menuconfig
make[1]: Nothing to be done for `.config'.
vendor/mstar/mboot/MBoot/sboot/scripts/gcc-version.sh: line 11: /tools/arm_eabi-2011.03/bin/arm-none-eabi-gcc: No such file or directory

sudo apt-get install lib32z1

1、mboot編譯錯誤

scripts/kconfig/lxdialog/dialog.h:31:20: fatal error: curses.h: No such file or directory

解決辦法:

sudo apt-get install libncurses5-dev

2、mboot編譯錯誤

SECURITY_INFO_LOADER_RAM_OFFSET=0x0
/bin/sh: 1: Syntax error: Missing '))'
make: *** [out/chunk_header.bin] Error 2
make menuconfig
make[1]: Nothing to be done for `.config'.
if [ -a ./../u-boot-2011.06/UConfig.in ]; then \
        ln -s -v ./../u-boot-2011.06/UConfig.in ./UConfig.in;\
        else \
        touch ./UConfig.in;\
        fi;
/bin/sh: 1: [: -a: unexpected operator
scripts/kconfig/mconf Config.in
Config.in:1295:warning: choice values currently only support a single prompt
Config.in:1243:warning: choice values currently only support a single prompt
Config.in:2054:warning: 'select' used by config symbol 'MSTAR_DVFS_PACKAGE_0' refer to undefined symbol 'IS_DVFS_PACKAGE_0'
Config.in:2060:warning: 'select' used by config symbol 'MSTAR_DVFS_PACKAGE_1' refer to undefined symbol 'IS_DVFS_PACKAGE_1'
#
# using defaults found in .config
#
.config:533:warning: trying to assign nonexistent symbol ARCH_CA7
.config:534:warning: trying to assign nonexistent symbol ARCH_CA9
.config:535:warning: trying to assign nonexistent symbol ARCH_CA12
.config:536:warning: trying to assign nonexistent symbol ARCH_CA53
2011.06/../MstarCustomer/MSTAR/include/CusRawIO.h:115:2: error: #error "please set the correct Mboot storage!!\n"
In file included from src/bootlogo/MsPoolDB.c:96:0:
vendor/mstar/mboot/MBoot/u-boot-2011.06/../MstarApp/include/MsEnvironment.h:210:2: error: #error "Wrong ENV_CFG settings!"
src/bootlogo/MsPoolDB.c: In function 'prepare_nand_dbtable':
src/bootlogo/MsPoolDB.c:1095:12: error: 'ENABLE_MODULE_ANDROID_BOOT' undeclared (first use in this function)
src/bootlogo/MsPoolDB.c:1095:12: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [src/bootlogo/MsPoolDB.o] Error 1
make[1]: *** [../MstarApp/libmsapp.a] Error 2
  COPY    out/u-boot.bin
cp: cannot stat `../u-boot-2011.06/u-boot.bin': No such file or directory
make: *** [out/"u-boot.bin"] Error 1

解決辦法:/bin/sh檔案有問題,拷貝另一個伺服器上的sh來替換後OK

2、mboot編譯錯誤

.config:625:warning: trying to reassign symbol STATIC_PANEL_PARA
.config:690:warning: trying to reassign symbol MSTAR_STR_ENABLE
  SPLIT   include/autoconf.h -> include/config/*
make: *** [include/config/MARKER] Error 255
#### make failed to build some targets (28 seconds) ####

解決方法:make distclean 

3、supernova編譯錯誤

(1)

tar: Client_tvos: Cannot utime: Operation not permitted
tar: Client_tvos: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: Exiting with failure status due to previous errors

原因:許可權不夠,因為解壓時用了sudo,使用root可以編譯,重新解壓原始檔,不能用sudo

(2)

Release mboot from vendor/mstar/supernova/projects/board/mooney/bin/mboot/mooney.117B.emmc.optee
make[3]: Leaving directory `vendor/mstar/supernova/projects/board'
make[2]: dos2unix: Command not found
make[2]: *** [prepareConfig] Error 127
make[2]: Leaving directory `vendor/mstar/supernova/target'
make[1]: *** [tvos_an_image] Error 2
make[1]: Leaving directory `vendor/mstar/supernova/target'
make: *** [image_all] Error 2
$ dos2unix
The program 'dos2unix' is currently not installed.  You can install it by typing:
sudo apt-get install dos2unix
 sudo apt-get install dos2unix

(3)

dos2unix: converting file vendor/mstar/supernova/out/buildenv/board/INI/module/Customer_Module.ini to Unix format ...
dos2unix: Failed to change the owner and group of temporary output file vendor/mstar/supernova/projects/board/mooney/NONE_DEFAULT_MMAP/d2utmpn9hrAH: Operation not permitted
dos2unix: converting file vendor/mstar/supernova/projects/board/mooney/NONE_DEFAULT_MMAP/SN_MMAP_ANDROID_DTMB_512_512_CMA_OP-TEE.h to Unix format ...
dos2unix: problems converting file vendor/mstar/supernova/projects/board/mooney/NONE_DEFAULT_MMAP/SN_MMAP_ANDROID_DTMB_512_512_CMA_OP-TEE.h
make[2]: *** [prepareConfig] Error 1
make[2]: Leaving directory `vendor/mstar/supernova/target'
make[1]: *** [tvos_an_image] Error 2

sudo chown xxx:xxx board/mooney/NONE_DEFAULT_MMAP/SN_MMAP_ANDROID_DTMB_512_512_CMA_OP-TEE.h

(4)

make[3]: Leaving directory `vendor/mstar/supernova/optee'
sed -i 's/^export LD_PRELOAD/#export LD_PRELOAD/g' vendor/mstar/supernova/target/dvb.mainz/tmp_image/Customer/profile ;
Start to prepare customerbackup image ...
Start to prepare database image ...
vendor/mstar/supernova/projects/msrv/system_database/ImportSql/import_sql: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
make[2]: *** [prepareDatabase] Error 127
make[2]: Leaving directory `vendor/mstar/supernova/target'
make[1]: *** [tvos_an_image] Error 2
make[1]: Leaving directory `vendor/mstar/supernova/target'
make: *** [image_all] Error 2

解決辦法:

sudo apt-get install g++-multilib 或者

sudo apt-get install g++-4.7-multilib


4、編譯kernel錯誤

make menuconfig
  HOSTCC  scripts/basic/fixdep
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2

解決辦法:

sudo apt-get install g++-multilib 或者

sudo apt-get install g++-4.7-multilib

4、編譯kernel錯誤

make menuconfig

/usr/bin/ld: cannot find -lncurses
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/kconfig/mconf] Error 1
make: *** [menuconfig] Error 2

解決辦法:

sudo apt-get install lib32ncurses5-dev

sudo apt-get install lib32tinfo-dev 

5、編譯kernel錯誤

make menuconfig

scripts/kconfig/mconf Kconfig
arch/arm64/Kconfig:10: can't open file "drivers/mstar2/Kconfig"

解決辦法:./genlink.sh 

6、編譯kernel錯誤

make 

  CC      kernel/bounds.s
/bin/sh: 1: aarch64-linux-gnu-gcc: not found

解決辦法:export PATH=/tools/linaro-aarch64_linux-2014.09_843419-patched/bin:$PATH

7、編譯kernel錯誤

make 

init/main.c:1060:34: error: expected expression before ‘)’ token
  printk(KERN_DEBUG "%s\n",KERM_CL);
                                  ^

make[1]: *** [init/main.o] Error 1

解決辦法:

修改3.10.40\include\linux\release_version.h:加上後面的”

8、git 問題:

git status
error: cannot fork() for status: Cannot allocate memory
fatal: Could not run 'git status --porcelain' in submodule external/chromium_org/third_party/angle
fatal: 'git status --porcelain' failed in submodule external/chromium_org/third_party/angle

解決辦法:

刪除external/chromium_org/third_party/angle目錄下的.git目錄

此時可以提交併上傳,但是clone的程式碼中沒有angle目錄,回到主程式碼:

#git submodule 
No submodule mapping found in .gitmodules for path 'external/chromium_org/third_party/angle'

原因是手動刪除了.git目錄,但是已經進入追蹤了,於是:

#git rm --cached external/chromium_org/third_party/angle
rm 'external/chromium_org/third_party/angle'
# git submodule 

9、安卓編譯問題

①、cannot find -llog collect2: error: ld returned 1 exit status

使用make編譯,可能是-j8問題

②、Building with Jack: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex


out/host/linux-x86/bin/jack: line 128: curl: command not found
out/host/linux-x86/bin/jack: line 128: curl: command not found
out/host/linux-x86/bin/jack: line 128: curl: command not found
out/host/linux-x86/bin/jack: line 128: curl: command not found
ERROR: Communication error with Jack server (127)
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex] Error 41
make: *** Waiting for unfinished jobs....

解決辦法:sudo apt-get install curl

③、/bin/bash: xmllint: command not found
make: *** [out/target/product/almond/system/etc/permissions/android.hardware.bluetooth.xml] Error 127

解決辦法:sudo apt-get  install libxml2-utils

4、flex-2.5.39: fatal internal error, exec of /usr/bin/m4 failed
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libmcldScript_intermediates/ScriptScanner.cpp] Broken pipe
make: *** Deleting file `out/host/linux-x86/obj/STATIC_LIBRARIES/libmcldScript_intermediates/ScriptScanner.cpp'
make: *** Waiting for unfinished jobs....
flex-2.5.39: fatal internal error, exec of /usr/bin/m4 failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Broken pipe
make: *** Deleting file `out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp'
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Broken pipe
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libmcldScript_intermediates/ScriptParser.cpp] Broken pipe
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:8: warning: tag "sysui_statusbar_touch" (36000) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:8
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:9: warning: tag "sysui_heads_up_status" (36001) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:9
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:10: warning: tag "sysui_fullscreen_notification" (36002) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:10
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:11: warning: tag "sysui_heads_up_escalation" (36003) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:11
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:19: warning: tag "sysui_status_bar_state" (36004) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:19
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:24: warning: tag "sysui_panelbar_touch" (36010) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:24
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:29: warning: tag "sysui_notificationpanel_touch" (36020) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:29
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:38: warning: tag "sysui_lockscreen_gesture" (36021) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:38
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:43: warning: tag "sysui_quickpanel_touch" (36030) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:43
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:48: warning: tag "sysui_panelholder_touch" (36040) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:48
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/EventLogTags.logtags:53: warning: tag "sysui_searchpanel_touch" (36050) duplicated in frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags:53
packages/apps/Browser/src/com/android/browser/EventLogTags.logtags:8: warning: tag "browser_bookmark_added" (70103) duplicated in device/mstar/common/apps/MBrowser3/src/com/android/browser/EventLogTags.logtags:8
packages/apps/Browser/src/com/android/browser/EventLogTags.logtags:12: warning: tag "browser_page_loaded" (70104) duplicated in device/mstar/common/apps/MBrowser3/src/com/android/browser/EventLogTags.logtags:12
packages/apps/Browser/src/com/android/browser/EventLogTags.logtags:15: warning: tag "browser_timeonpage" (70105) duplicated in device/mstar/common/apps/MBrowser3/src/com/android/browser/EventLogTags.logtags:15
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning


#### make failed to build some targets (43 seconds) ####

解決辦法:sudo apt-get install bison