1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

Problem Building AOSP

Discussion in 'Android Hacks and Help' started by VingInMedina, Dec 9, 2010.

  1. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    Messing around with building AOSP and I've run into a new problem. I was successfully able to build a ROM with Superuser and Busybox for my Droid 1 a couple of months ago. Yesterday, I pulled the latest source for everything and now I am getting this error

    Code:
    wam@matrix:~/android/system$ lunch generic_sholes-userdebug
    
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=2.2.1
    TARGET_PRODUCT=generic_sholes
    TARGET_BUILD_VARIANT=userdebug
    TARGET_SIMULATOR=false
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=arm
    HOST_ARCH=x86
    HOST_OS=linux
    HOST_BUILD_TYPE=release
    BUILD_ID=MASTER
    ============================================
    
    wam@matrix: /home/wam/android/system$ make
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=2.2.1
    TARGET_PRODUCT=generic_sholes
    TARGET_BUILD_VARIANT=userdebug
    TARGET_SIMULATOR=false
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=arm
    HOST_ARCH=x86
    HOST_OS=linux
    HOST_BUILD_TYPE=release
    BUILD_ID=MASTER
    ============================================
    /bin/bash: line 0: cd: dalvik/libcore//home/wam/android/system/dalvik/libcore: No such file or directory
    /bin/bash: line 0: cd: dalvik/libcore//home/wam/android/system/dalvik/libcore: No such file or directory
    dalvik/libcore/NativeCode.mk:71: dalvik/libcore//home/wam/android/system/dalvik/libcore/sub.mk: No such file or directory
    build/core/Makefile:19: warning: overriding commands for target `out/target/product/sholes/system/etc/gps.conf'
    build/core/Makefile:19: warning: ignoring old commands for target `out/target/product/sholes/system/etc/gps.conf'
    No private recovery resources for TARGET_DEVICE sholes
    make: *** No rule to make target `dalvik/libcore//home/wam/android/system/dalvik/libcore/sub.mk'.  Stop.
    It looks like one of the make files is using the full path to the current directory when trying to change directory:

    Code:
    /bin/bash: line 0: cd: dalvik/libcore//home/wam/android/system/dalvik/libcore: No such file or directory
    It puts the directory /home/wam/android/system/dalvik/libcore (which is the full path of that directory) after the dalvik/libcore (which is the relative path to that directory from my current location) giving a directory that doesn't exist.

    Since I really doubt that there is a problem with one of the AOSP makefiles, the problem must be in the environment on my machine.

    Does anyone have a suggestion as to what might be wrong or where I can look?

    I've done a search on the web and here in the forum and I have found references to this same problem from other people, but no answers as to what might be wrong.

    Thanks in advance for any and all help.
  2. tcrews
    Online

    tcrews Premium Member Premium Member Developer

    Joined:
    Jan 27, 2010
    Messages:
    1,354
    Likes Received:
    22
    Trophy Points:
    38
    Location:
    Lexington, SC
    Try a..

    make clean

    then your make

    that will clear out the out/ folder where sometimes changes in source conflict with files that have already been written there from previous makes.

    Other than that....not sure how you configured your environment initially.

    Worse comes to worse, delete the Android/system folder, create the android/system dir and do a complete git init and repo sync again. Restart your configuration of adding Busybox and Superuser.

    If you are editing any of the source files, I've seen a repo sync completely screw those up.
  3. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    Thanks for the suggestions.

    First thing I did was a make clean, so I will try building a new android/system with a git init and repo sync.

    I hadn't made any modifications to source code, so that probably isn't it, but I have been doing a lot of development work for other things and perhaps something I've added has screwed it up.
  4. tcrews
    Online

    tcrews Premium Member Premium Member Developer

    Joined:
    Jan 27, 2010
    Messages:
    1,354
    Likes Received:
    22
    Trophy Points:
    38
    Location:
    Lexington, SC
    I've rebuilt my system so many times it got to be a pain....finally I just created a github account, forked what I was working on from android, created my manifest to point to my stuff and android's stuff and repo sync that. All my edits, changes are pulled right on down from my repo and all the stock stuff is pulled from android's.
  5. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    Well, I've got it narrowed down a bit.

    In the JavaLibrary.mk file in the ~/android/system/dalvik/libcore directory there is a function called all-core-resource-dirs. It looks like this:

    Code:
    # Redirect ls stderr to /dev/null because the corresponding resources
    # directories don't always exist.
    define all-core-resource-dirs
    $(shell cd $(LOCAL_PATH) && ls -d */src/$(1)/{java,resources} 2> /dev/null)
    endef
    It is called a bit further on:

    Code:
    core_resource_dirs := $(call all-core-resource-dirs,main)
    If I just run this from the command line (using ksh) I get the following (I verified that LOCAL_PATH is set to 'dalvik/libcore'):

    Code:
    matrix$ cd dalvik/libcore && ls -d */src/main/{java,resources}
    annotation/src/main/java   nio_char/src/main/java
    archive/src/main/java      nio/src/main/java
    auth/src/main/java         openssl/src/main/java
    awt-kernel/src/main/java   prefs/src/main/java
    concurrent/src/main/java   prefs/src/main/resources
    crypto/src/main/java       regex/src/main/java
    dalvik/src/main/java       security-kernel/src/main/java
    icu/src/main/java          security/src/main/java
    json/src/main/java         sql/src/main/java
    junit/src/main/java        suncompat/src/main/java
    logging/src/main/java      text/src/main/java
    luni-kernel/src/main/java  xml/src/main/java
    luni/src/main/java         x-net/src/main/java
    math/src/main/java
    Which is just what I expect I should see. However, when I run it using bash (which is what the build will use) I get this:

    Code:
    wam@matrix:~/android/system$ cd dalvik/libcore && ls -d */src/main/{java,resources}
    /home/wam/android/system/dalvik/libcore
    annotation/src/main/java   nio_char/src/main/java
    archive/src/main/java      nio/src/main/java
    auth/src/main/java         openssl/src/main/java
    awt-kernel/src/main/java   prefs/src/main/java
    concurrent/src/main/java   prefs/src/main/resources
    crypto/src/main/java       regex/src/main/java
    dalvik/src/main/java       security-kernel/src/main/java
    icu/src/main/java          security/src/main/java
    json/src/main/java         sql/src/main/java
    junit/src/main/java        suncompat/src/main/java
    logging/src/main/java      text/src/main/java
    luni-kernel/src/main/java  xml/src/main/java
    luni/src/main/java         x-net/src/main/java
    math/src/main/java
    
    I have verified that this is where my problem is coming from. The first thing returned from the command is the current directory which is passed on later where it caused the later problems.

    Now, I don't use bash myself, so I don't know where to look exactly. Is there a setting in the ~/.bashrc file that would make it do this (i.e. print the current working directory)? It is coming from the "cd $(LOCAL_PATH)" part of the command.
  6. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    Found it.

    I had the variable CDPATH set. When I unset it, the make was able to proceed.

    Jeeze.

    Thanks tcrews for your help!
  7. thinkmega
    Offline

    thinkmega New Member

    Joined:
    Jun 10, 2010
    Messages:
    285
    Likes Received:
    0
    Trophy Points:
    0
    I have a side question .... how long does it take for "make" to finish? It took somewhere 3 hours on my box (an old one). I wonder how much faster if I upgrade.

    Thanks.
  8. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    It take about 3 hours for me to do a make too. I don't have a screaming fast machine, but I I am ok with it. a full ROM is a lot of software to compile.
  9. Mioze7Ae
    Offline

    Mioze7Ae New Member

    Joined:
    Mar 3, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Holy mother of god. I've been bashing my head against this for a week. Thank you!
Search tags for this page
android no private recovery resources for target device mako
,
ayuda no private recovery resources for target device mako
,
grep: build/target/board/generic/recovery.fstab: no such fil
,
libcore: no such file or directory
,

no private recovery resources for target device

,
no private recovery resources for target device android
,
no private recovery resources for target device blaze tablet
,
no private recovery resources for target device endeavoru
,
no private recovery resources for target device generic
,
no private recovery resources for target device maguro
,
no private recovery resources for target device mako
,
no private recovery resources for target device panda
,
no recovery.fstab for target device
,
no+private+recovery+resources+for target device
,
private recovery resources for target device