Armin
Armin

Reputation: 619

Building AOSP (4.2.2) on Ubuntu 12.10 X64 Fail

I'm trying to build AOSP (4.2.2) on Ubuntu 12.10 X64 and i get following error :

armin@ubuntu:~/source$ make -j1 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.2.2 TARGET_PRODUCT=full TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a HOST_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-3.5.0-17-generic-x86_64-with-Ubuntu-12.10-quantal HOST_BUILD_TYPE=release BUILD_ID=JDQ39 OUT_DIR=out ============================================ Checking build tools versions... external/bluetooth/bluedroid/Android.mk:8: NO BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR, using only generic configuration find: ../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory find: ../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory find: ../../vendor/unbundled_google/libs/gcm/gcm-client/src': No such file or directory find: ../../vendor/unbundled_google/libs/gcm/gcm-server/src': No such file or directory find: src': No such file or directory vendor/nvidia/grouper/keymaster/Android.mk:16: Extraneous text after ifeq' directive PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Effect_Tick.ogg:system/media/audio/ui/Effect_Tick.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressStandard.ogg:system/media/audio/ui/KeypressStandard.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressSpacebar.ogg:system/media/audio/ui/KeypressSpacebar.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressDelete.ogg:system/media/audio/ui/KeypressDelete.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressReturn.ogg:system/media/audio/ui/KeypressReturn.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/VideoRecord.ogg:system/media/audio/ui/VideoRecord.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/camera_click.ogg:system/media/audio/ui/camera_click.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/LowBattery.ogg:system/media/audio/ui/LowBattery.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Dock.ogg:system/media/audio/ui/Dock.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Undock.ogg:system/media/audio/ui/Undock.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Lock.ogg:system/media/audio/ui/Lock.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/Unlock.ogg:system/media/audio/ui/Unlock.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Sceptrum.ogg:system/media/audio/ringtones/Sceptrum.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressStandard_120.ogg:system/media/audio/ui/KeypressStandard.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressSpacebar_120.ogg:system/media/audio/ui/KeypressSpacebar.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressDelete_120.ogg:system/media/audio/ui/KeypressDelete.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/KeypressReturn_120.ogg:system/media/audio/ui/KeypressReturn.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/Capella.ogg:system/media/audio/notifications/Capella.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/CetiAlpha.ogg:system/media/audio/notifications/CetiAlpha.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/Polaris.ogg:system/media/audio/notifications/Polaris.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/Pollux.ogg:system/media/audio/notifications/Pollux.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/notifications/ogg/Procyon.ogg:system/media/audio/notifications/Procyon.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Aquila.ogg:system/media/audio/ringtones/Aquila.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/ArgoNavis.ogg:system/media/audio/ringtones/ArgoNavis.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Carina.ogg:system/media/audio/ringtones/Carina.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Centaurus.ogg:system/media/audio/ringtones/Centaurus.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Cygnus.ogg:system/media/audio/ringtones/Cygnus.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Draco.ogg:system/media/audio/ringtones/Draco.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Machina.ogg:system/media/audio/ringtones/Machina.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Orion.ogg:system/media/audio/ringtones/Orion.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Pegasus.ogg:system/media/audio/ringtones/Pegasus.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Pyxis.ogg:system/media/audio/ringtones/Pyxis.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Rigel.ogg:system/media/audio/ringtones/Rigel.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Scarabaeus.ogg:system/media/audio/ringtones/Scarabaeus.ogg ignored. PRODUCT_COPY_FILES frameworks/base/data/sounds/ringtones/ogg/Solarium.ogg:system/media/audio/ringtones/Solarium.ogg ignored. host Java: jsr305lib (out/host/common/obj/JAVA_LIBRARIES/jsr305lib_intermediates/classes) host Java: guavalib (out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/classes) Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Export includes file: build/libs/host/Android.mk -- out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/export_includes Import includes file: out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/import_includes Header: out/host/linux-x86/obj/include/libexpat/expat.h Header: out/host/linux-x86/obj/include/libexpat/expat_external.h Header: out/target/product/generic/obj/include/libexpat/expat.h Header: out/target/product/generic/obj/include/libexpat/expat_external.h Header: out/host/linux-x86/obj/include/libpng/png.h Header: out/host/linux-x86/obj/include/libpng/pngconf.h Header: out/host/linux-x86/obj/include/libpng/pngusr.h Header: out/target/product/generic/obj/include/libpng/png.h Header: out/target/product/generic/obj/include/libpng/pngconf.h Header: out/target/product/generic/obj/include/libpng/pngusr.h Header: out/host/linux-x86/obj/include/selinux/selinux.h Header: out/host/linux-x86/obj/include/selinux/label.h Header: out/host/linux-x86/obj/include/selinux/context.h Header: out/host/linux-x86/obj/include/selinux/avc.h Header: out/host/linux-x86/obj/include/selinux/android.h Header: out/target/product/generic/obj/include/selinux/selinux.h Header: out/target/product/generic/obj/include/selinux/label.h Header: out/target/product/generic/obj/include/selinux/context.h Header: out/target/product/generic/obj/include/selinux/avc.h Header: out/target/product/generic/obj/include/selinux/android.h Header: out/target/product/generic/obj/include/libsonivox/eas.h Header: out/target/product/generic/obj/include/libsonivox/eas_types.h Header: out/target/product/generic/obj/include/libsonivox/eas_reverb.h Header: out/target/product/generic/obj/include/libsonivox/jet.h Header: out/target/product/generic/obj/include/libsonivox/ARM_synth_constants_gnu.inc Header: out/target/product/generic/obj/include/libwpa_client/wpa_ctrl.h host C: acp <= build/tools/acp/acp.c Import includes file: out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/import_includes host C++: libhost <= build/libs/host/pseudolocalize.cpp /bin/bash: prebuilts/tools/gcc-sdk/g++: cannot execute binary file make: * [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 126

Can someone help me to resolve this issue?

Upvotes: 3

Views: 9751

Answers (4)

stela
stela

Reputation: 51

You can kill the first 4 by editing out the entire section about gcm in frameworks/base/Android.mk (from "reference docs for GCM" to "include $(BUILD_DROIDDOC)")

The PRODUCT_COPY_FILES ones are easy to silence by removing all lines except one in frameworks/base/data/sounds/AllAudio.mk (pick any one that you want to keep).

That leaves a single one ("find src") that I don't know off-hand.

Source : https://groups.google.com/forum/#!msg/android-building/H8DrWy4bEIM/Y6-HD6e0IxsJ

Upvotes: 1

Jitendra Kulkarni
Jitendra Kulkarni

Reputation: 833

This is what worked for me:

  1. Get Google Cloud Messaging (GCM) code from Google.
  2. Copy it to the vendor dir.
  3. Build and enjoy.

Here are the details:

Get GCM source as explained at: https://code.google.com/p/gcm/source/checkout

% croot
% cd vendor
% mkdir -p unbundled_google/libs;cd !$
% cp -pr <GCM  dir of the google pkg. where you see /gcm > .
% croot
% <build whatever your were building>

I am not sure if I need to use gcm_client_deprecated dir as it looks more substantial and has more code, however I could do make sdk with the current gcm-client dir.

Upvotes: 1

Mayur Shah
Mayur Shah

Reputation: 1019

I was facing the same issue when i was trying to build ICS on Ubuntu 12.04. Later i read in some forum that currently it does not work for 12.04 and Ubuntu is trying to overcome this issue. As 12.04 is LTS(Long term support), after some time Ubuntu might release update where building ICS will work.I guess same is the problem for 12.10.So i think you should use 11.04.Although its outdated and no updates are going to be released,it works fine for AOSP.I am using same and its the only possible solution right now.

Upvotes: 1

Bruce
Bruce

Reputation: 66

You need to concentrate on the line that says :

/bin/bash: prebuilts/tools/gcc-sdk/g++: cannot execute binary file

This might be because you are on 64 bits, and that binary is for 32 bits. Perhaps you have some other stuff missing too, so i better point you to a tutorial about compiling android (jb) on ubuntu/x64. Look at the prerequisites and install everything you need.

Tutorial at xda-developers

Upvotes: 2

Related Questions