[GUIDE] Building Pure Nexus

Search This thread

huhuang03

Member
Jun 22, 2018
6
0
Hello everyone,

I am encountering an issue and cannot figure out how to fix it:

Using /Volumes/android/purenexus/external/busybox as source for busybox
HOSTCC scripts/basic/fixdep
couldn't understand kern.osversion `16.1.0'
GEN /Volumes/android/purenexus/out/target/product/angler/obj/busybox/full/Makefile
target C++: libperfprofdcore <= system/extras/perfprofd/configreader.cc
ld: warning: object file (/var/folders/m8/w0cf3cms7z51rtsq0l8q6yqh0000gn/T//ccQ8zcDr.o) was built for newer OSX version (10.12) than being linked (10.4)
/bin/sh: line 1: 62663 Bus error: 10 scripts/basic/fixdep scripts/basic/.fixdep.d scripts/basic/fixdep '/Volumes/android/purenexus/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1/bin/i686-apple-darwin11-gcc -Wp,-MD,scripts/basic/.fixdep.d -Iscripts/basic -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/basic/fixdep /Volumes/android/purenexus/external/busybox/scripts/basic/fixdep.c ' > scripts/basic/.fixdep.tmp
make[4]: *** [scripts/basic/fixdep] Error 138
make[3]: *** [scripts_basic] Error 2
make[3]: *** Waiting for unfinished jobs....
target C++: libperfprofdcore <= system/extras/perfprofd/cpuconfig.cc
target C++: libperfprofdcore <= system/extras/perfprofd/perfprofdcore.cc
target C++: libperfprofdcore <= /Volumes/android/purenexus/out/target/product/angler/gen/STATIC_LIBRARIES/libperfprofdcore_intermediates/proto/system/extras/perfprofd/perf_profile.pb.cc
target C++: libperfprofdutils <= system/extras/perfprofd/perfprofdutils.cc
target C: procmem <= system/extras/procmem/procmem.c
target C: procrank <= system/extras/procrank/procrank.c
target C: puncture_fs <= system/extras/puncture_fs/puncture_fs.c
target C++: rawbu <= frameworks/native/cmds/rawbu/backup.cpp
target C: sane_schedstat <= system/extras/sane_schedstat/sane_schedstat.c
make[2]: *** [include/autoconf.h] Error 2
make[1]: *** [prepare] Error 2
make: *** [/Volumes/android/purenexus/out/target/product/angler/obj/busybox/full/.config] Error 2
make: *** Deleting file `/Volumes/android/purenexus/out/target/product/angler/obj/busybox/full/.config'
make: *** Waiting for unfinished jobs....

#### make failed to build some targets (08:28 (mm:ss)) ####

Forgot to mention: NINJA disabled, CCACHE on, JACK set to 16GB

As far as i understand it fails at building busybox. Is there any way to step over, or place it myself? Or maybe fix the error :))
Any help is appreciated :)
Thanks

have you solve this problem? I occur this also.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 61
    Introduction
    Alright guys, there was a lot of talk about building Pure Nexus in the main thread, which was a little irritating for some so now we get our own thread! In this post, I will be giving you some resources to go over in order to help you with compilation. If you have any questions, just ask!

    If you compile successfully, feel free to share your accomplishment and your computer specs :)

    Compilation Guide
    This is available on my Github, where it may be a little more up to date.

    0. Getting started

    In this guide, I will go over how to build Pure Nexus on your Linux machine. This particular tutorial will focus on Ubuntu 16.04 (Mint 18 is also good) since that is what Google recommends but this should work with any version of Linux (here are steps for setup with Arch Linux, which will cover step 1); it does need to be 64-bit however. I will leave the installation of that up to you, Google is a wonderful resource. If you don't have a good computer but still want to build, check out this thread on XDA: http://xdaforums.com/chef-central/android/guide-how-to-build-rom-google-cloud-t3360430

    1. Set up your environment

    1. Automatically

    Code:
    sudo apt-get install git-core
    git clone https://github.com/akhilnarang/scripts
    cd scripts
    ls
    bash <script-name>
    <script-name> should be one of the scripts in the folder for your particular architecture.

    2. Manually

    1. Install Java 8
    Code:
    sudo apt-get update
    sudo apt-get install openjdk-8-jdk
    sudo apt-get install openjdk-8-jre
    2. Install other build tools
    Code:
    sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip

    2. Configure repo and git

    If you have any problems with the below commands, try running as root:
    Code:
    sudo -s
    Git is an open source version control system which is incredibly robust for tracking changes across repositories. Repo is Google's tool for working with Git in the context of Android. More reading if you are interested: https://source.android.com/source/developing.html

    Run these commands to get repo working (only do this if you did the manual set up method above:
    Code:
    mkdir ~/bin
    PATH=~/bin:$PATH
    curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    chmod a+x ~/bin/repo
    Run these commands to get git working:
    Code:
    git config --global user.name "Your Name"
    git config --global user.email "you@example.com"

    3. Download the source

    First, before downloading the source, create a folder for the source and move into it.
    Code:
    mkdir ~/<foldername> (eg. mkdir ~/PN or ~/PureNexus)
    cd ~/<foldername>

    Then, we need to grab the manifest and sync down the repositories. Here are the commands to do this for Pure Nexus for Nougat (make sure you are in the source folder you made above):
    Code:
    repo init -u https://github.com/PureNexusProject/manifest.git -b android-7.1
    repo sync --force-sync
    NOTE: The value for the -b flag, "android-7.1", may change; you will need to go to the manifest's page and see what the branch currently is.

    Here is the process generally for other ROMs:

    When you go to build a ROM, you must download its source. All, if not most, ROMs will have their source code available on Github. To properly download the source, follow these steps:
    1. Go to your ROM's Github (e.g. http://github.com/PureNexusProject)
    2. Search for a manifest (usually called manifest or android_manifest).
    3. Go into the repo and make sure you are in the right branch (located right under the Commits tab).
    4. Go into the README and search for a repo init command. If one exists, copy and paste it into the terminal and hit enter.
    5. If one does not exist, you can make one with this formula:
      Code:
      repo init -u <url_of_manifest_repo>.git -b <branch_you_want_to_build>
      For example:
      Code:
      repo init -u http://github.com/PureNexusProject/manifest.git -b android-7.1
    6. After the repo has been initialized, run this command to download the source:
      Code:
      repo sync --force-sync
    7. This process can take a while depending on your internet connection.


    4. Build it!

    At this point, it'd be a good idea to set up ccache. ccache is a compiler cache, it stores previously compiled files in a directory and pulls from that instead of recompiling if nothing has changed. This speeds up compilation a LOT. If you want to use it, follow the below steps:
    1. Open up your .bashrc file in your home directory using a text editor or nano and append this to the end of it:
      Code:
      export USE_CCACHE=1
      Then type:
      Code:
      source ~/.bashrc
    2. After that, run one of the below command (replacing the # with how many GBs of ccache you want, 50 is recommended)
      Use this one if you used the manual method of set up in section 1:
      Code:
      prebuilts/misc/linux-x86/ccache/ccache -M #G
      Use this one if you used the automatic method of set up in section 1:
      Code:
      ccache -M #G

    After that, it's time to build!
    Code:
    . build/envsetup.sh
    breakfast angler
    mka bacon
    After that, your computer will build the flashable zip file and if you see something that says make completed, you've done it!

    Any time that you want to rebuild, type the following commands:
    Code:
    repo sync --force-sync
    . build/envsetup.sh
    breakfast angler
    mka clobber
    mka bacon
    I also have a script to do this on my Github here



    Frequently Asked Questions
    1.1 Q: I got an error, what do I do??
    1.1 A: Well to start, if it is anything with Ninja, I would go ahead and disable it. You can add this to your .bashrc file:
    Code:
    export USE_NINJA=false
    Then type this
    Code:
    source ~/.bashrc
    . build/envsetup.sh
    breakfast angler
    mka clobber
    mka bacon
    If it is saying you ran out of memory, follow this post.

    If it isn't Ninja related, check out @AzraelsKiss's post here, where he has documented a few common issues. If none of those apply, post here with a detailed list of what you have done and we will do our best to help you.

    1.2 Q: Can you guys share your personal builds?
    1.2 A: No, personal builds are just that: personal. Beans releases whenever he feels that the release is ready for the masses and if a bunch of personal builds are floating around, that tarnishes the Pure Nexus name. We are more than happy to help get you up and running but we will not be sharing our builds. Thanks for understanding!

    MOD EDIT - THIS IS A DEVELOPER DISCUSSION. NOT FOR ORDINARY USERS. There is No Rom for you to Flash. Nor will there be any support for you. Any ETA or other NON-DEVELOPMENT posts here will be removed without warning!


    XDA:DevDB Information
    A Guide to Building Pure Nexus for Nougat, ROM for the Huawei Nexus 6P

    Contributors
    nathanchance, BeansTown106
    Source Code: https://github.com/PureNexusProject

    ROM OS Version: 7.x Nougat
    ROM Kernel: Linux 3.10.x
    Based On: AOSP

    Version Information
    Status: Stable

    Created 2016-09-15
    Last Updated 2017-01-15
    24
    Building PureNexus Nougat

    RESERVED
    21
    For those of you that are building PN Nougat, are some minor customizations implemented yet? I ask since I am compiling a copy for myself right now.
    Advanced reboot menu, ADB over network, and stock nav bar tuner and night mode re-enabled are the major ones right now.
    14
    Pure Nexus source has been reopened and as a result, so has this thread!

    Let me be very clear here: this thread is to help you build Pure Nexus for yourself. You should not be sharing personal builds as it is disrespectful to Beans and his release cycle. He releases when the ROM feels ready, not any time sooner and putting builds out in place of him goes against this philosophy.

    With that out of the way, sync up and get to building! :highfive: