building android/ubuntu-touch on 32bit machine

host C: libhost <= build/libs/host/CopyFile.c
host StaticLib: libhost (/media/linux/1/touch/export/phablet-ubuntu-20130618/out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-ar only run on 64-bit linux
http://grokbase.com/t/gg/android-building/131h2qq409/why-does-the-build-process-think-im-running-32-bit
in \\192.168.1.8\1\touch\export\phablet-ubuntu-20130618\prebuilts\tools\gcc-sdk\:
cp gcc gcc.bak
in \\192.168.1.8\1\touch\export\phablet-ubuntu-20130618\prebuilts\tools\gcc-sdk\gcc:
    # exit 1

MY_TOOL=`dirname $0`/${PREFIX32}-${PROGNAME}


http://blog.csdn.net/herbert5069/article/details/7671801

http://blog.sina.com.cn/s/blog_76dbbd7e01018cm5.html

ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-gcc only run on 64-bit linux
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/emulator64-target-arm_intermediates/tcg/tcg.o] Error 1
make: *** Waiting for unfinished jobs….
产生的原因是我的UBUNTU是32位的,要求64位。
牛人给了一个解决方法 : external/qemu/Makefile.common  externalqemu/Makefile.target 中关于-m64改为-m32


http://www.dewen.org/q/6600

进入你的android src目录:

修改:build/core/main.mk

from: ifneq (64,$(findstring 64,$(build_arch)))
改为: ifneq (i686,$(findstring i686,$(build_arch)))

还要修改其他一些mk file,比如:
external/clearsilver/cgi/Android.mk
external/clearsilver/java-jni/Android.mk
external/clearsilver/util/Android.mk
external/clearsilver/cs/Android.mk

把所有的LOCAL_CFLAGS += -m64 改为 LOCAL_CFLAGS += -m32

****grep所有的mk文件,把所有64改成32****

*************************************************

  CC      kernel/bounds.s
/media/linux/1/touch/cm/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc: Exec format error
/media/linux/1/touch/cm/android/system/kernel/goldfish/./Kbuild:34: *** [kernel/bounds.s] Error 1

#0  kernel/bounds.s at /media/linux/1/touch/cm/android/system/kernel/goldfish/./Kbuild:34
#1  include/generated/bounds.h at /media/linux/1/touch/cm/android/system/kernel/goldfish/./Kbuild:38
#2  __build at /media/linux/1/touch/cm/android/system/kernel/goldfish/scripts/Makefile.build:8
Command-line invocation:
    "remake -f /media/linux/1/touch/cm/android/system/kernel/goldfish/scripts/Makefile.build obj=."
/media/linux/1/touch/cm/android/system/kernel/goldfish/Makefile:984: *** [prepare0] Error 2
mv \\192.168.1.101\1\touch\cm\android\system\prebuilts\gcc\linux-x86\arm\arm-eabi-4.6\ \\192.168.1.101\1\touch\cm\android\system\prebuilts\gcc\linux-x86\arm\arm-eabi-4.6.bak\
cp \\192.168.1.101\1\touch\export\phablet-ubuntu-20130618\prebuilts\gcc\linux-x86\arm\arm-eabi-4.6\ \\192.168.1.101\1\touch\cm\android\system\prebuilts\gcc\linux-x86\arm\arm-eabi-4.6\
    
*******************************************************

/media/linux/1/touch/cm/android/system/out/host/linux-x86/bin/emulator64-arm    
/media/linux/1/touch/cm/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/lib64SDL_intermediates/lib64SDL.a: could not read symbols: File format not recognized
collect2: ld returned 1 exit status
build/core/binary.mk:710: *** [/media/linux/1/touch/cm/android/system/out/host/linux-x86/obj/EXECUTABLES/emulator64-arm_intermediates/emulator64-arm] Error 1

#0  /media/linux/1/touch/cm/android/system/out/host/linux-x86/obj/EXECUTABLES/emulator64-arm_intermediates/emulator64-arm at /media/linux/1/touch/cm/android/system/build/core/binary.mk:710
#1  /media/linux/1/touch/cm/android/system/out/host/linux-x86/bin/emulator64-arm at /media/linux/1/touch/cm/android/system/build/core/base_rules.mk:501
#2  files at /media/linux/1/touch/cm/android/system/build/core/main.mk:740
#3  droidcore at /media/linux/1/touch/cm/android/system/frameworks/base/Android.mk:629
#4  droid at /media/linux/1/touch/cm/android/system/build/core/main.mk:67
\\192.168.1.101\1\touch\cm\android\system\build\core\main.mk
ifdef FULL_BUILD
  # The base list of modules to build for this product is specified
  # by the appropriate product definition file, which was included
  # by product_config.make.
  product_MODULES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)
  # Filter out the overridden packages before doing expansion
  product_MODULES := $(filter-out $(foreach p, $(product_MODULES), \
      $(PACKAGES.$(p).OVERRIDES)), $(product_MODULES))
  $(call expand-required-modules,product_MODULES,$(product_MODULES))
  product_FILES := $(call module-installed-files, $(product_MODULES))
  ifeq (0,1)
    $(info product_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):)
    $(foreach p,$(product_FILES),$(info :   $(p)))
    $(error done)
  endif
modules_to_install := $(sort \
    $(ALL_DEFAULT_INSTALLED_MODULES) \
    $(product_FILES) \
    $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \
    $(call get-tagged-modules, shell_$(TARGET_SHELL)) \
    $(CUSTOM_MODULES) \
  )
.PHONY: files
files: prebuilt \
        $(modules_to_install) \
        $(INSTALLED_ANDROID_INFO_TXT_TARGET)
remake<4> print INTERNAL_PRODUCT
build/core/product_config.mk:253 (origin: makefile) INTERNAL_PRODUCT = build/target/product/full.mk
cp \\192.168.1.101\1\touch\cm\android\system\build\target\product\emulator.mk to \\192.168.1.101\1\touch\cm\android\system\build\target\product\emulator.mk.orig
in \\192.168.1.101\1\touch\cm\android\system\build\target\product\emulator.mk, remove:
    emulator64-x86 \
    emulator64-arm \
    emulator64-mips \
    lib64OpenglRender \
    lib64GLES_CM_translator \
    lib64GLES_V2_translator \
    lib64EGL_translator
not working
http://hi.baidu.com/lypoint/item/70c763a7f67865258819d34a
host Executable: emulator64-x86 (out/host/linux-x86/obj/EXECUTABLES/emulator64-x86_intermediates/emulator64-x86)
out/host/linux-x86/obj/STATIC_LIBRARIES/lib64SDL_intermediates/lib64SDL.a: could not read symbols: File format not recognized
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator64-arm_intermediates/emulator64-arm] 错误 1
make: *** 正在等待未完成的任务....
out/host/linux-x86/obj/STATIC_LIBRARIES/lib64SDL_intermediates/lib64SDL.a: could not read symbols: File format not recognized
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator64-mips_intermediates/emulator64-mips] 错误 1
out/host/linux-x86/obj/STATIC_LIBRARIES/lib64SDL_intermediates/lib64SDL.a: could not read symbols: File format not recognized
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator64-x86_intermediates/emulator64-x86] 错误 1
true
administrator@ubuntu:/media/C8DCACC3DCACAD5E/ics2/icsmaster$ lib64SDL_intermediates/lib64SDL.a: could not read symbols: File format not

解决方法:

sudo apt-get install gcc-4.4

sudo apt-get install g++-4.4

cd /usr/bin

ln -s -f gcc-4.4 gcc

ln -s -f g++-4.4 g++

sudo apt-get install g++-4.4-multilib
rm out/host/linux-x86/obj/STATIC_LIBRARIES/lib64SDL_intermediates/lib64SDL.a
mka


host Executable: emulator64-x86 (out/host/linux-x86/obj/EXECUTABLES/emulator64-x86_intermediates/emulator64-x86)
out/host/linux-x86/obj/STATIC_LIBRARIES/lib64SDL_intermediates/lib64SDL.a: could not read symbols: File format not recognized

external\qemu\Makefile.common
external\qemu\Makefile.target
comment everything with emulator64


host C++: lib64GLcommon <= sdk/emulator/opengl/host/libs/Translator/GLcommon/GLDispatch.cpp
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-g++ only run on 64-bit linux
sdk/emulator/opengl/host/libs/Translator/GLcommon/GLDispatch.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
in \\192.168.2.8\1\touch\cm\android\system\sdk\emulator\opengl\host\libs\Translator\GLcommon\Android.mk:
comment "EGL host implementation, 64-bit" part


Unknown imported emugles module: HOST_lib64GLcommon
Please one of the following names: emugen libOpenglOsUtils lib64OpenglOsUtils libOpenglCodecCommon lib64OpenglCodecCommon libGLESv1_dec lib64GLESv1_dec libGLESv2_dec lib64GLESv2_dec lib_renderControl_dec lib64_renderControl_dec libut_rendercontrol_dec libGLcommon libGLES_CM_translator
sdk/emulator/opengl/host/libs/Translator/GLES_CM/Android.mk:23: *** Aborting.  Stop.
in sdk/emulator/opengl/host/libs/Translator/GLES_CM/Android.mk
comment "GLES_CM host implementation, 64-bit" part


Unknown imported emugles module: HOST_lib64GLcommon
Please one of the following names: emugen libOpenglOsUtils lib64OpenglOsUtils libOpenglCodecCommon lib64OpenglCodecCommon libGLESv1_dec lib64GLESv1_dec libGLESv2_dec lib64GLESv2_dec lib_renderControl_dec lib64_renderControl_dec libut_rendercontrol_dec libGLcommon libGLES_CM_translator libGLES_V2_translator
sdk/emulator/opengl/host/libs/Translator/GLES_V2/Android.mk:22: *** Aborting.  Stop.
in sdk/emulator/opengl/host/libs/Translator/GLES_V2/Android.mk:
comment "GLES_V2 host implementation, 64-bit" part


Unknown imported emugles module: HOST_lib64GLcommon
Please one of the following names: emugen libOpenglOsUtils lib64OpenglOsUtils libOpenglCodecCommon lib64OpenglCodecCommon libGLESv1_dec lib64GLESv1_dec libGLESv2_dec lib64GLESv2_dec lib_renderControl_dec lib64_renderControl_dec libut_rendercontrol_dec libGLcommon libGLES_CM_translator libGLES_V2_translator libEGL_translator
sdk/emulator/opengl/host/libs/Translator/EGL/Android.mk:51: *** Aborting.  Stop.
in sdk/emulator/opengl/host/libs/Translator/EGL/Android.mk:
comment "EGL host implementation, 64-bit " part



Import includes file: /media/linux/1/touch/cm/android/system/out/host/linux-x86/obj/SHARED_LIBRARIES/lib64OpenglRender_intermediates/import_includes
host C++: lib64_renderControl_dec <= /media/linux/1/touch/cm/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/lib64_renderControl_dec_intermediates/renderControl_dec.cpp
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-g++ only run on 64-bit linux
/media/linux/1/touch/cm/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/lib64_renderControl_dec_intermediates/renderControl_dec.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
host C++: lib64OpenglRender <= sdk/emulator/opengl/host/libs/libOpenglRender/NativeLinuxSubWindow.cpp
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-g++ only run on 64-bit linux
sdk/emulator/opengl/host/libs/libOpenglRender/NativeLinuxSubWindow.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
comment 64-bit parts in \\192.168.2.8\1\touch\cm\android\system\sdk\emulator\opengl\host\libs\GLESv1_dec\Android.mk \\192.168.2.8\1\touch\cm\android\system\sdk\emulator\opengl\host\libs\GLESv2_dec\Android.mk \\192.168.2.8\1\touch\cm\android\system\sdk\emulator\opengl\host\libs\renderControl_dec\Android.mk \\192.168.2.8\1\touch\cm\android\system\sdk\emulator\opengl\host\libs\libOpenglRender\Android.mk
    

你可能感兴趣的:(building android/ubuntu-touch on 32bit machine)