Problem Building AOSP

This is a discussion on Problem Building AOSP within the Droid Development forums, part of the Droid Hacking category; 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 ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Problem Building AOSP

  1. Senior Droid
    VingInMedina's Avatar
    Member #
    28534
    Join Date
    Jan 2010
    Location
    Medina, Ohio
    Posts
    166
    Liked
    3 times
    Phone
    Galaxy Nexus, OG Droid (ret)
    #1

    Question Problem Building AOSP

    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. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. Developer
    tcrews's Avatar
    Member #
    31907
    Join Date
    Jan 2010
    Location
    Lexington, SC
    Posts
    905
    Liked
    5 times
    Twitter
    SnkBitten
    Phone
    Motorola Droid 4
    DroidForums.net Developer
    Premium Member
    #2
    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.
    Tom Crews
    SnkBitten - http://android.snkbitten.com/ (for OG Droid)
    Current : Droid 4 + Root
    Droid 3 + Root
    Motorola Xoom + Root + CWM + ICS
    Logitech Revue + 3.1 OS update

  4. Senior Droid
    VingInMedina's Avatar
    Member #
    28534
    Join Date
    Jan 2010
    Location
    Medina, Ohio
    Posts
    166
    Liked
    3 times
    Phone
    Galaxy Nexus, OG Droid (ret)
    #3
    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.
  5. Developer
    tcrews's Avatar
    Member #
    31907
    Join Date
    Jan 2010
    Location
    Lexington, SC
    Posts
    905
    Liked
    5 times
    Twitter
    SnkBitten
    Phone
    Motorola Droid 4
    DroidForums.net Developer
    Premium Member
    #4
    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.
    Tom Crews
    SnkBitten - http://android.snkbitten.com/ (for OG Droid)
    Current : Droid 4 + Root
    Droid 3 + Root
    Motorola Xoom + Root + CWM + ICS
    Logitech Revue + 3.1 OS update

  6. Senior Droid
    VingInMedina's Avatar
    Member #
    28534
    Join Date
    Jan 2010
    Location
    Medina, Ohio
    Posts
    166
    Liked
    3 times
    Phone
    Galaxy Nexus, OG Droid (ret)
    #5
    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.
  7. Senior Droid
    VingInMedina's Avatar
    Member #
    28534
    Join Date
    Jan 2010
    Location
    Medina, Ohio
    Posts
    166
    Liked
    3 times
    Phone
    Galaxy Nexus, OG Droid (ret)
    #6
    Found it.

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

    Jeeze.

    Thanks tcrews for your help!
  8. Master Droid
    thinkmega's Avatar
    Member #
    76357
    Join Date
    Jun 2010
    Posts
    284
    Liked
    1 times
    Phone
    Motorola Droid
    #7
    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.
  9. Senior Droid
    VingInMedina's Avatar
    Member #
    28534
    Join Date
    Jan 2010
    Location
    Medina, Ohio
    Posts
    166
    Liked
    3 times
    Phone
    Galaxy Nexus, OG Droid (ret)
    #8
    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.
  10. Droid Newbie
    Mioze7Ae's Avatar
    Member #
    176029
    Join Date
    Mar 2011
    Posts
    1
    Phone
    Milestone XT720
    #9
    Quote Originally Posted by VingInMedina View Post
    Found it.

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

    Jeeze.

    Thanks tcrews for your help!
    Holy mother of god. I've been bashing my head against this for a week. Thank you!

Sponsors

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Rom Building
    By Droidnewbster in forum Droid Hacks
    Replies: 4
    Last Post: 06-28-2010, 07:33 PM
  2. is there a tutorial for building a rom
    By tiggerxplur in forum Android Roms
    Replies: 0
    Last Post: 06-26-2010, 08:41 AM
  3. Kernel building help
    By jamezelle in forum Droid Hacks
    Replies: 4
    Last Post: 04-12-2010, 08:14 AM
  4. Building a ROM, please help me.
    By dick.fickling in forum Droid Hacks
    Replies: 14
    Last Post: 03-19-2010, 05:15 PM

Search tags for this page

add busybox to aosp
,
add busybox to aosp build
,
android build no private resources
,
android no private recovery resources
,
android no private recovery resources for target device
,
aosp makefile
,
build/core/makefile:21: warning: overriding commands for tar
,
find: `../../libcore/dalvik/src/main/java/dalvik': no such f
,
how to add busybox to aosp
,
libcore: no such file or directory
,
no private recovery resources
,

no private recovery resources for target device

,
no private recovery resources for target device generic
,
no private recovery resources for target device generic no r
,
no recovery.fstab for target device generic
Click on a term to search our site for related topics.

Tags for this Thread