[Guide]How to Compile PAC Rom

Search This thread

iurnait

Inactive Recognized Developer
Jun 21, 2012
869
1,152
Southern California
I still got the same error 1 (make: *** [/home/guillaume/pac/out/target/product/shooteru/obj/SHARED_LIBRARIES/libOmxVenc_intermediates/src/omx_video_base.o] Error 1) that keep me from building this ROM ... I search everywhere, ask one from my device' forum but the dependencies seem good so I have no clues from where come this error ...

But I noticed that at the beginning of the script I've got this message :

Code:
Lunching device
Looking for dependencies
Dependencies file not found, bailing out.

Is that normal ??
Thanks anyone for your help :)


Next time, when pasting your error, grab a few more lines. The real error message will tell you what file has a problem, what line the problem is on, and what the problem is. As for the "Dependencies file not found," that's perfectly normal as that does not have anything to do with pac (its for if you have a cm.dependencies file).

For solving your problem, could you show us your dependencies file that you created in vendor/pac/dependencies?
 
  • Like
Reactions: Lyok0ne

Dilesh Perera

Senior Member
May 26, 2012
1,802
943
Colombo
Xiaomi Poco F1
Xiaomi Poco F3
Hi guys

this may sound noob . but i cant figure out how this happens

i created ubuntu partition of my machine . i have set 65 GB for that. and reserved 10GB for ccache . my .repo size is 25 Gb

but now the free amount of the size reduced to some MBs while i try building the ROM. it exit cos of not enough disk space.

guess there are unwanted pilled up in my maching while i try to build earlier. how can i find and remove them :)
 

iurnait

Inactive Recognized Developer
Jun 21, 2012
869
1,152
Southern California
Hi guys

this may sound noob . but i cant figure out how this happens

i created ubuntu partition of my machine . i have set 65 GB for that. and reserved 10GB for ccache . my .repo size is 25 Gb

but now the free amount of the size reduced to some MBs while i try building the ROM. it exit cos of not enough disk space.

guess there are unwanted pilled up in my maching while i try to build earlier. how can i find and remove them :)

Ubuntu comes with a disk usage analyzer to help you see what is taking up space. However, you may need to expand your partition as the outputs do take up some space
 

Abhinav1997

Inactive Recognized Developer / Retired Forum Mod
Jul 29, 2012
2,590
5,306
I tried building for 3 devices officially supported by CM but it shows-
Code:
Package Complete: /home/abhinav2/pac/out/target/product/mint/cm-11-20140309-UNOFFICIAL-mint.zip

/home/abhinav2/pac/out/target/product/mint/pac_mint-ota-eng.abhinav2.zip doesn't exist!

2 problems, it shows eng while my build is userdebug. Second the ota package is named as- pac_mint-ota-b52b07bc52.zip and not pac_mint-ota-eng(or userdebug).abhinav2.zip so isn't it weird? Any ideas? The devices were mint, nicki and tsubasa.

EDIT: Most probably due to this- https://github.com/PAC-man/android_build/commit/0b4591427e1f2ee5e85a0136e57b72e277b422fb I'll revert it and do a clean build

Cheers,
AJ
 
Last edited:

asokhaki

Senior Member
Jul 23, 2013
90
17
This is an error im getting any ideas ive tried som Make clean commands and resynced every repo ( not the vendor and my device tree ).



Export includes file: external/vim/src/Android.mk -- /home/asokhaki/android/out/target/product/find5/obj/EXECUTABLES/vim_intermediates/export_includes
make: *** No rule to make target `vendor/cm/proprietary/Term.apk', needed by `/home/asokhaki/android/out/target/product/find5/system/app/Term.apk'. Stop.
make: *** Waiting for unfinished jobs....

Anyone have any clue how to fix this ?
 

Abhinav1997

Inactive Recognized Developer / Retired Forum Mod
Jul 29, 2012
2,590
5,306
This is an error im getting any ideas ive tried som Make clean commands and resynced every repo ( not the vendor and my device tree ).



Export includes file: external/vim/src/Android.mk -- /home/asokhaki/android/out/target/product/find5/obj/EXECUTABLES/vim_intermediates/export_includes
make: *** No rule to make target `vendor/cm/proprietary/Term.apk', needed by `/home/asokhaki/android/out/target/product/find5/system/app/Term.apk'. Stop.
make: *** Waiting for unfinished jobs....

Anyone have any clue how to fix this ?

You need prebuilt files. You can do this-
Code:
cd vendor/cm
./get-prebuilts
cd ../..
#CONTINUE BUILD

But DO NOT do it. Instead use their build script. Use this instead-
Code:
./build-pac.sh YOUR_DEVICE_NAME

It'll do everything for u :)

Cheers,
AJ
 

asokhaki

Senior Member
Jul 23, 2013
90
17
You need prebuilt files. You can do this-
Code:
cd vendor/cm
./get-prebuilts
cd ../..
#CONTINUE BUILD

But DO NOT do it. Instead use their build script. Use this instead-
Code:
./build-pac.sh YOUR_DEVICE_NAME

It'll do everything for u :)

Cheers,
AJ

target StaticLib: components_tracing_gyp (/home/asokhaki/android/out/target/product/find5/obj/STATIC_LIBRARIES/components_tracing_gyp_intermediates/components_tracing_gyp.a)
target StaticLib: ipc_ipc_gyp (/home/asokhaki/android/out/target/product/find5/obj/STATIC_LIBRARIES/ipc_ipc_gyp_intermediates/ipc_ipc_gyp.a)
^Cmake: *** Deleting file `/home/asokhaki/android/out/target/product/find5/obj/STATIC_LIBRARIES/ipc_ipc_gyp_intermediates/ipc_ipc_gyp.a'



Should i just brunch again or ??
BTW Thanks for before and Thanks in advance !
 

iurnait

Inactive Recognized Developer
Jun 21, 2012
869
1,152
Southern California
target StaticLib: components_tracing_gyp (/home/asokhaki/android/out/target/product/find5/obj/STATIC_LIBRARIES/components_tracing_gyp_intermediates/components_tracing_gyp.a)
target StaticLib: ipc_ipc_gyp (/home/asokhaki/android/out/target/product/find5/obj/STATIC_LIBRARIES/ipc_ipc_gyp_intermediates/ipc_ipc_gyp.a)
^Cmake: *** Deleting file `/home/asokhaki/android/out/target/product/find5/obj/STATIC_LIBRARIES/ipc_ipc_gyp_intermediates/ipc_ipc_gyp.a'



Should i just brunch again or ??
BTW Thanks for before and Thanks in advance !

When was your last sync? we pushed a few changes for the find 5 yesterday,
 

asokhaki

Senior Member
Jul 23, 2013
90
17
You need prebuilt files. You can do this-
Code:
cd vendor/cm
./get-prebuilts
cd ../..
#CONTINUE BUILD

But DO NOT do it. Instead use their build script. Use this instead-
Code:
./build-pac.sh YOUR_DEVICE_NAME

It'll do everything for u :)

Cheers,
AJ

When was your last sync? we pushed a few changes for the find 5 yesterday,

Last sync sir was about 3h ago. So should i brunch again?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 49
    Hey guys, so a lot of you have be eagerly anticipating the release of PAC-4.4. Others of you may be seeking pac for a device that is not supported at this moment. So I thought I would take this opportunity to write a guide on how to compile PAC.

    In order to compile Android, I recommend that you use a Linux distro. For the purposes of this guide, I shall be using Ubuntu 13.10. It is pretty easy to set up, even as a dual boot with windows.

    The first thing you need to do, once you have installed Ubuntu, is to set it up to be able to compile Android. There are a lot of guides that show you how to do this, and this guide has pretty clear instructions. Follow all of his directions until you reach the point where he tells you to initialize the repository (The command he has as an example there is repo init -u git://github.com/AOKP/platform_manifest.git -b jb-mr2. Do not run this command or you will have downloaded the AOKP sources instead of the PAC sources)

    To download the pac sources, we need to initialize the repository first. For this guide, I will be downloading the pac source to ~/android/pac. Run:
    Code:
    mkdir -p ~/android/pac
    cd ~/android/pac
    repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4

    Now it is time to download the source itself. Keep in mind that the source is rather large (~10+ GB), so you might want to make yourself a cup of tea (or 10 cups if you have a crappy isp) while waiting. Run:
    Code:
    repo sync

    Now, it is time to do the actually compiling. If your device is already supported by PAC, please skip directly to post 3. Else, go to post 2.
    28
    Adding Support for a device

    To add support for your device, the first thing you need to do is to hunt down your device tree. If you are not sure where your device tree is located, google it or ask in your device's subforum. Now, it is time to add the files required to build.

    From the root of directory where you have downloaded the pac source (~/android/pac), go to the vendor/pac directory. This is where we will be making the changes necessary to build for your device. Here are the files that need to be modified/added. Obviously, substitute your devices codename for CODENAME.

    1. dependencies/CODENAME.dependencies
    This file grabs your device and kernel tree. Look at the dependencies file of a device that is similar to yours to figure out what you need to place in here. A list of all the devices we support and their respective codenames can be found here. Again, if you are unsure about what to place here, you may want to ask for help in your devices subforum. Whenever possible, try to use the CM device tree. For the vendor files, keep the account name as "Pinky-Inky-and-Clyde" but change the repository to the appropriate OEM (check here for repos). Do not worry if the vendor files for your device are not in that repository. We will be adding them later.

    Here is a sample CODENAME.dependencies file for a Samsung device (note that the account names are case sensitive):
    Code:
    [
      {
        "account":      "Pinky-Inky-and-Clyde",
        "repository":   "proprietary_vendor_samsung",
        "target_path":  "vendor/samsung",
        "revision":     "cm-11.0"
        },
      {
        "account":      "CyanogenMod",
        "repository":   "android_device_samsung_CODENAME",
        "target_path":  "device/samsung/CODENAME",
        "revision":     "cm-11.0"
      },
      {
        "account":      "CyanogenMod",
        "repository":   "android_kernel_samsung_CODENAME",
        "target_path":  "kernel/samsung/CODENAME",
        "revision":     "master"
      },
      {
        "account":      "CyanogenMod",
        "repository":   "android_hardware_samsung",
        "target_path":  "hardware/samsung",
        "revision":     "cm-11.0"
      }
    ]

    Once you have done this, go to the root of your pac source (~/android/pac for this guide), and run
    Code:
    ./vendor/pac/tools/getdependencies.py CODENAME
    This will attempt to create the file .repo/local_manifests/roomservice.xml and then sync up the sources. If you have to make changes to your dependencies, please remove the roomservice.xml file and re-run the script again to ensure that no incorrect repositories are left lingering.
    Go to the vendor files directory (~/android/pac/vendor/YOUR_OEM), and search for the vendor files of your device. If they are not there, you will have to search for them online and copy them into the folder.
    Alternatively, if your device has an extract-files.sh script, in the device tree (located in device/OEM/CODENAME), you can hook up your device via usb and run that command to grab the vendor files directly from your device. In this case, connect your device and run:
    Code:
    cd device/OEM/CODENAME
    ./extract-files.sh

    2. products/pac_CODENAME.mk
    Again, look at the same file for a device that is similar to yours and make the appropriate changes for your device.

    Here is a sample pac_CODENAME.mk file for a hdpi device:
    Code:
    # Check for target product
    ifeq (pac_CODENAME,$(TARGET_PRODUCT))
    
    # OVERLAY_TARGET adds overlay asset source
    OVERLAY_TARGET := pa_hdpi
    
    # PAC device overlay
    PRODUCT_PACKAGE_OVERLAYS += vendor/pac/overlay/pac/hdpi_480x800
    
    # PAC boot logo
    PRODUCT_COPY_FILES += \
        vendor/pac/prebuilt/common/bootlogo/pac_logo_480x800.rle:root/logo.rle
    
    # Copy bootanimation
    PRODUCT_COPY_FILES += \
        vendor/pac/prebuilt/480x800/bootanimation.zip:system/media/bootanimation.zip
    
    # include PAC common configuration
    include vendor/pac/config/pac_common.mk
    
    # Inherit CM device configuration
    $(call inherit-product, device/samsung/CODENAME/cm.mk)
    
    PRODUCT_NAME := pac_CODENAME
    
    endif
    Note: for the PAC device overlay, look inside vendor/pac/overlay/pac for the available overlays. Likewise, for the bootanimation and boot logo, look in their respective directories for the available sizes.

    3. vendorsetup.sh
    Add a line that looks something like this in the appropriate area of this file (under the appropriate OEM, and in alphabetical order, please).
    Code:
    add_lunch_combo pac_CODENAME-userbebug

    --- The below files are not necessary for successful compilation, but are required if you submit your device for official PAC support. ---
    4. Contributors
    5. Nightly.xml
    6. XDAThreads
    7. devices-breakdown.xml

    For these files, follow the format of the other devices.
    26
    Building PAC

    Now that we got all of the housekeeping out of the way, it is time to build the rom!

    Open up a terminal and change directory to the base of where you downloaded the PAC source to begin compiling. Run (substitute your device's codename for CODENAME):
    Code:
    ./build-pac.sh CODENAME

    There are some additional options available in the build script. To see them all, simply run:
    Code:
    ./build-pac.sh
    If everything goes well, your build should be starting. Go take a walk or something while it is building. This may take a while if you have a computer with weak specs.
    16
    Submitting your device for official support

    Once you have successfully built PAC for your device and tested it, you can submit your changes to our gerrit for official support and automatic nightly builds.

    In order to do this, you need to first sign up on our gerrit and get your ssh keys set up. So head on over to http://review.pac-rom.com/ to register for an account. Next, we need to generate an ssh key pair in order to push changes to gerrit. To check if you already have a key pair generated, run
    Code:
    ls ~/.ssh
    If it shows a id_rsa.pub, you already have your keys generated and you can skip to the adding your ssh key to gerrit part.

    On the other hand, if there is nothing in your .ssh folder, run
    Code:
    ssh-keygen -t rsa -C "your_email@example.com"
    When you run this command, it will ask you where you want to save this file. Just hit enter. Next, it will ask you for a passphrase for your private key. Enter a passphrase here that you can remember.

    Now, it is time to add your public key to our gerrit. To copy your public key over, run:
    Code:
    sudo apt-get install xclip
    xclip -sel clip < ~/.ssh/id_rsa.pub
    (Alternatively, you can cat the file and just copy it, but the above mentioned way avoids any missing characters while copying.)

    Now, login to our gerrit and go to your account settings > ssh public keys. Click on add, and paste the key and save.

    It is time to upload your changes. We have a script to make this process easier. To grab the script, run:
    Code:
    cd ~/bin
    wget http://pac-rom.com/downloads/pac-review
    chmod a+x pac-review

    Now, run:
    Code:
    cd ~/android/pac
    cd vendor/pac
    git add -A
    git commit

    This should open up a text editor (probably nano) where you can put a commit message. For our purposes, just write something along the lines of "Add support for ___." To save the file, hit Ctrl + o. To exit, hit Ctrl + x. Then, run:
    Code:
    pac-review -p

    Follow the prompts and your changes should be automatically pushed and a link will show to your change on gerrit.

    If you realize that you made a mistake in your commit, DO NOT submit a new change. Instead, make your changes, then run:
    Code:
    git add -A
    git commit --amend

    Update your commit message if necessary and then push with the pac-review script. This will create a new patchset on our gerrit instead of creating a new commit.

    And that is all! If you have any questions, dont hesitate to ask them here. Ill try to get back to you as soon as possible
    6
    Hey iurnait, I didn't find any instructions on pac's github on how to clone the entire trees. Please help.

    cd into the directory where you are working, and then run
    Code:
    repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4

    then run
    Code:
    repo sync