UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. erlend
    3. Best
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 14
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Crossbuilder - mk-build-deps

      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! ☺

      posted in App Development
      E
      erlend
    • RE: MirOil-for-Lomiri

      I'm trying to find a good way to solve qtmir tests. For the test to work they need a lot of mocks that are based on internal mir stuff. And since they are used directly into mir it is not possible to build wrappers.

      Include file Object test file Defined in
      mir/main_loop.h mir::MainLoop tests/framework/mock_main_loop.h src/include/server/mir/main_loop.h
      mir/scene/prompt_session.h mir::scene::PromptSession tests/framework/mock_prompt_session.h src/include/server/mir/scene/prompt_session.h
      mir/scene/surface.h> mir::scene::Surface tests/framework/mock_surface.h src/include/server/mir/scene/surface.h
      mir/shell/persistent_surface_store.h mir::shell::PersistentSurfaceStore tests/framework/mock_persistent_surface_store.h src/include/server/mir/shell/persistent_surface_store.h
      mir/scene/session.h mir::scene::Session tests/framework/mock_mir_session.h src/include/server/mir/scene/session.h

      So the best solution (or least bad) that I have come up with is...
      to move all those mocks to miroil and make them accessible through a MockFactory... Something like:

      class MockFactory
      {
          auto get_mock_surface()                  -> std::shared_ptr<mir::scene::Surface>;
          auto get_mock_main_loop()                -> std::shared_ptr<mir::MainLoop>;
          auto get_mock_prompt_session()           -> std::shared_ptr<mir::scene::PromptSession>;
          auto get_mock_persistent_surface_store() -> std::shared_ptr<mir::shell::PersistentSurfaceStore>;
          auto get_mock_session()                  -> std::shared_ptr<mir::scene::Session>;    
          
          std::shared_ptr<mir::scene::Surface>                   surfaces;
          std::shared_ptr<mir::MainLoop>                         main_loops;
          std::shared_ptr<mir::scene::PromptSession>             prompt_sessions;
          std::shared_ptr<mir::shell::PersistentSurfaceStore>    persistent_surface_stores;
          std::shared_ptr<mir::scene::Session>                   sessions;       
      };
      

      The problem is that qtmir does not know the destructor of this objects, to they will have to be deleted inside miroil.
      Therefore I have added a reference in MockFactor to the objects. Which are deleted by MockFactory. This will only work if MockFactory is the last object to be deleted, so we have to make sure it is.

      So do you guys see any better solutions than this?

      posted in Lomiri (was Unity8)
      E
      erlend
    • Crossbuilder - mk-build-deps

      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?

      posted in App Development mk-build-deps crossbuilder
      E
      erlend