namhyung / uftrace

Function graph tracer for C/C++/Rust/Python
https://uftrace.github.io/slide/
GNU General Public License v2.0
3.04k stars 473 forks source link

trying to prepare android build environment with failures #1105

Open honggyukim opened 4 years ago

honggyukim commented 4 years ago

The following command is from https://github.com/namhyung/uftrace/wiki/uftrace-on-Android#with-cuttlefish-virtual-device.

With cuttlefish Virtual Device

  1. Build cuttlefish host tool (like emulator)
    git clone https://github.com/google/android-cuttlefish
    cd android-cuttlefish
    debuild -i -us -uc -b
    sudo dpkg -i ../cuttlefish-common_*_amd64.deb
    sudo apt-get install -f

    However, it gets failed as follows in Ubuntu machine:

    $ debuild -i -us -uc -b
    dpkg-buildpackage -rfakeroot -D -us -uc -i -b
    dpkg-buildpackage: source package cuttlefish-common
    dpkg-buildpackage: source version 0.9.10
    dpkg-buildpackage: source distribution UNRELEASED
    dpkg-buildpackage: source changed by Cody Schuffelen <schuffelen@google.com>
    dpkg-source -i --before-build android-cuttlefish
    dpkg-buildpackage: host architecture amd64
    dpkg-checkbuilddeps: error: Unmet build dependencies: config-package-dev (>= 4.5~)
    dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
    dpkg-buildpackage: warning: (Use -d flag to override.)
    debuild: fatal error at line 1376:
    dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed

    The above problem is fixed by installing config-package-dev.

    
    $ sudo apt install config-package-dev
    ...
    $ debuild -i -us -uc -b
    dpkg-buildpackage -rfakeroot -D -us -uc -i -b
    dpkg-buildpackage: source package cuttlefish-common
    dpkg-buildpackage: source version 0.9.10
    dpkg-buildpackage: source distribution UNRELEASED
    dpkg-buildpackage: source changed by Cody Schuffelen <schuffelen@google.com>
    dpkg-source -i --before-build android-cuttlefish
    dpkg-buildpackage: host architecture amd64
    fakeroot debian/rules clean
    test -x debian/rules
    dh_clean
    ...
    Now running lintian...
    E: cuttlefish-integration: copyright-should-refer-to-common-license-file-for-apache-2
    E: cuttlefish-integration: maintainer-address-malformed Cuttlefish Team <https://android-review.googlesource.com/#/c/platform/device/google/cuttlefish>
    W: cuttlefish-integration: binary-without-manpage usr/bin/adbshell
    E: cuttlefish-common: copyright-should-refer-to-common-license-file-for-apache-2
    E: cuttlefish-common: maintainer-address-malformed Cuttlefish Team <https://android-review.googlesource.com/#/c/platform/device/google/cuttlefish>
    W: cuttlefish-common: script-with-language-extension usr/bin/install_zip.sh
    E: cuttlefish-common: duplicate-updaterc.d-calls-in-postinst cuttlefish-common
    W: cuttlefish-common: binary-without-manpage usr/bin/install_zip.sh
    Finished running lintian.

$ ls -lrt .. total 36 drwxrwxr-x 5 honggyu honggyu 4096 Jan 31 16:11 android-cuttlefish -rw-r--r-- 1 honggyu honggyu 8080 Jan 31 16:15 cuttlefish-common_0.9.10_amd64.deb -rw-r--r-- 1 honggyu honggyu 8212 Jan 31 16:15 cuttlefish-integration_0.9.10_amd64.deb -rw-r--r-- 1 honggyu honggyu 1537 Jan 31 16:15 cuttlefish-common_0.9.10_amd64.changes -rw-r--r-- 1 honggyu honggyu 6871 Jan 31 16:15 cuttlefish-common_0.9.10_amd64.build

The installation is failed as follows:

$ sudo dpkg -i ../cuttlefish-common_0.9.10_amd64.deb (Reading database ... 431543 files and directories currently installed.) Preparing to unpack cuttlefish-common_0.9.10_amd64.deb ... Unpacking cuttlefish-common (0.9.10) over (0.9.10) ... dpkg: dependency problems prevent configuration of cuttlefish-common: cuttlefish-common depends on f2fs-tools; however: Package f2fs-tools is not installed. cuttlefish-common depends on libarchive-tools | bsdtar; however: Package libarchive-tools is not installed. Package bsdtar is not installed.

dpkg: error processing package cuttlefish-common (--install): dependency problems - leaving unconfigured Processing triggers for systemd (229-4ubuntu21.21) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing: cuttlefish-common

honggyukim commented 4 years ago

@DanielTimLee Could you please take a look at this?

henrychoi7 commented 4 years ago

@honggyukim I just fixed the installation sequence in the Wiki. It will work if you follow the instruction from debuild again.

honggyukim commented 4 years ago

@henrychoi7 Thanks.