UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Crossbuilder - mk-build-deps

    Scheduled Pinned Locked Moved App Development
    mk-build-depscrossbuilder
    5 Posts 4 Posters 1.3k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • E Offline
        erlend
        last edited by

        Hi!

        I'm trying to get the crossbuilder working on the example in the documentation. But I'm stuck on an some thing to do with mk-build-deps??

        So I'm using qemu/kvm running Ubuntu 18.04.3.... fresh install...

         crossbuilder setup-lxd
         cd ~/src/git/address-book-app
        

        Then

          bash -x crossbuilder
        

        a lot of output... but the last command is:

        + lxc exec address-book-app-usdk-16-04-amd64-armhf-dev -- sh -c 'mk-build-deps                 -t '\''apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'\''                 -i --host-arch armhf                 /home/demo/patched_debian_control'
        dpkg-architecture: warning: specified GNU system type arm-linux-gnueabihf does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
        dh_testdir
        dh_testroot
        dh_prep
        dh_testdir
        dh_testroot
        dh_install
        dh_installdocs
        dh_installchangelogs
        dh_compress
        dh_fixperms
        dh_installdeb
        dh_gencontrol
        dpkg-gencontrol: warning: File::FcntlLock not available; using flock which is not NFS-safe
        dh_gencontrol debug symbol wrapper: all non-arch-all packages for this build platform armhf: address-book-app-cross-build-deps 
        dh_gencontrol debug symbol wrapper: packages to act on: address-book-app-cross-build-deps 
        dh_gencontrol debug symbol wrapper: ignored packages: 
        dh_gencontrol debug symbol wrapper: no debian/address-book-app-cross-build-deps-dbgsym, skipping package address-book-app-cross-build-deps
        dh_md5sums
        dh_builddeb
        dpkg-deb: building package 'address-book-app-cross-build-deps' in '../address-book-app-cross-build-deps_1.0_armhf.deb'.
        
        The package has been created.
        Attention, the package has been created in the current directory,
        not in ".." as indicated by the message above!
        Selecting previously unselected package address-book-app-cross-build-deps:armhf.
        (Reading database ... 53932 files and directories currently installed.)
        Preparing to unpack address-book-app-cross-build-deps_1.0_armhf.deb ...
        Unpacking address-book-app-cross-build-deps:armhf (1.0) ...
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        Correcting dependencies...Starting pkgProblemResolver with broken count: 1
        Starting 2 pkgProblemResolver with broken count: 1
        Investigating (0) address-book-app-cross-build-deps [ armhf ] < 1.0 > ( devel )
        Broken address-book-app-cross-build-deps:armhf Depends on dh-translations [ armhf ] < none ->  > ( none )
          Removing address-book-app-cross-build-deps:armhf because I can't find dh-translations:armhf
        Done
         Done
        Starting pkgProblemResolver with broken count: 0
        Starting 2 pkgProblemResolver with broken count: 0
        Done
        The following additional packages will be installed:
          libgl1-mesa-dev:armhf libgl1-mesa-glx:armhf mesa-common-dev:armhf
        The following packages will be REMOVED:
          address-book-app-cross-build-deps:armhf
        The following NEW packages will be installed:
          libgl1-mesa-dev:armhf libgl1-mesa-glx:armhf mesa-common-dev:armhf
        0 upgraded, 3 newly installed, 1 to remove and 16 not upgraded.
        1 not fully installed or removed.
        Need to get 666 kB of archives.
        After this operation, 4218 kB of additional disk space will be used.
        Get:1 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf libgl1-mesa-glx armhf 18.0.5-0ubuntu0~16.04.1 [118 kB]
        Get:2 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf mesa-common-dev armhf 18.0.5-0ubuntu0~16.04.1 [543 kB]
        Get:3 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf libgl1-mesa-dev armhf 18.0.5-0ubuntu0~16.04.1 [4466 B]
        Fetched 666 kB in 2s (332 kB/s)               
        (Reading database ... 53936 files and directories currently installed.)
        Removing address-book-app-cross-build-deps:armhf (1.0) ...
        Selecting previously unselected package libgl1-mesa-glx:armhf.
        (Reading database ... 53932 files and directories currently installed.)
        Preparing to unpack .../libgl1-mesa-glx_18.0.5-0ubuntu0~16.04.1_armhf.deb ...
        Unpacking libgl1-mesa-glx:armhf (18.0.5-0ubuntu0~16.04.1) ...
        Selecting previously unselected package mesa-common-dev:armhf.
        Preparing to unpack .../mesa-common-dev_18.0.5-0ubuntu0~16.04.1_armhf.deb ...
        Unpacking mesa-common-dev:armhf (18.0.5-0ubuntu0~16.04.1) ...
        Selecting previously unselected package libgl1-mesa-dev:armhf.
        Preparing to unpack .../libgl1-mesa-dev_18.0.5-0ubuntu0~16.04.1_armhf.deb ...
        Unpacking libgl1-mesa-dev:armhf (18.0.5-0ubuntu0~16.04.1) ...
        Processing triggers for libc-bin (2.23-0ubuntu11) ...
        Setting up libgl1-mesa-glx:armhf (18.0.5-0ubuntu0~16.04.1) ...
        update-alternatives: using /usr/lib/arm-linux-gnueabihf/mesa/ld.so.conf to provide /etc/ld.so.conf.d/arm-linux-gnueabihf_GL.conf (arm-linux-gnueabihf_gl_conf) in auto mode
        Setting up mesa-common-dev:armhf (18.0.5-0ubuntu0~16.04.1) ...
        Setting up libgl1-mesa-dev:armhf (18.0.5-0ubuntu0~16.04.1) ...
        Processing triggers for libc-bin (2.23-0ubuntu11) ...
        mk-build-deps: Unable to install address-book-app-cross-build-deps at /usr/bin/mk-build-deps line 402.
        mk-build-deps: Unable to install all build-dep packages
        + rm -r /tmp/crossbuilder.caWdHt
        

        any ideas?

        W 1 Reply Last reply Reply Quote 1
        • U Offline
          UniSuperBox
          last edited by UniSuperBox

          The real error is here:

          Removing address-book-app-cross-build-deps:armhf because I can't find dh-translations:armhf

          This means that the dh-translations package doesn't exist for armhf, and it has not specified how it should be installed for cross-building situations.

          Looking at the dh-translations package in xenial on the package tracker, it only has a package available for the all architecture. This means that it can run on any architecture.

          You can fix this error, therefore, by specifying the architecture you'd like to install in the debian/control file. Add :all after dh-translations, under the Build-Depends: heading. Then try building again.

          1 Reply Last reply Reply Quote 3
          • W Offline
            wdehoog @erlend
            last edited by

            @erlend This issue is caused by some multilib thing. I have this issue for other packages. It sometimes help to explicitely set the platform. I would try to edit the debian/control file and see if it works with dh-translations:all

            Please don't think I understand this. I keep on changing stuff till it works.

            And open an issue on github (for the app or for crossbuilder)

            1 Reply Last reply Reply Quote 0
            • E Offline
              erlend
              last edited by erlend

              Thank you both!

              It seems to have worked. 🙂

              However I got a new error.... (but later in the script)... And then I fixed that one too...

              Seems the dh-translations was still missing... but now I have fixed it....

              And managed to compile it! ☺

              D 1 Reply Last reply Reply Quote 2
              • D Offline
                doniks @erlend
                last edited by

                I'm late to this party, but @erlend is there something that should be fixed in the docs?

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post