Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android build fails if build process includes 'install' step

Android build fails if build process includes 'install' step

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 4 Posters 3.9k Views
  • 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.
  • P Offline
    P Offline
    prismatic
    wrote on 18 Jul 2013, 22:34 last edited by
    #1

    Hi. I'm using Qt 5.1 with QtCreator 2.8, trying to deploy a trivial 'helloworld' application on my Android device. After setting up my project according to

    http://doc-snapshot.qt-project.org/qt5-stable/qtdoc/android-support.html
    http://qt-project.org/doc/qtcreator-2.8/creator-developing-android.html

    And hitting build I get an error during the build process. The issue goes away if I remove or disable one of the Build Steps I added in my project: a make install. To clarify, when you set up a project you normally have two steps automatically added for building: qmake and make. I added another make step that calls "make install" and its this step that fails with the Android build.

    All make install does is copy a few files to the build directory. This works fine on my desktop.

    Why can't I use a make install build step? Is this a bug?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      flaviomarcio
      wrote on 19 Jul 2013, 01:18 last edited by
      #2

      You can give more information.

      This using linux or windows?
      You have the build log?
      You are trying to compile a project with Qtquick or QWidget?

      Flavio Portela

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prismatic
        wrote on 19 Jul 2013, 02:22 last edited by
        #3
        • Arch Linux
        • QtQuick with a simple qml file shown in QQuickView

        Here's the relevant part of the build log. I pastebinned the full thing here (http://pastebin.com/raw.php?i=5JE5QK2x)

        @
        22:21:29: The process "/usr/bin/make" exited normally.
        22:21:29: Starting: "/usr/bin/make" install
        mkdir: cannot create directory '/libs': Permission denied
        make: *** [install_target] Error 1
        22:21:29: The process "/usr/bin/make" exited with code 2.
        Error while building/deploying project qquick_helloworld_embedded (kit: Android for arm (GCC 4.7, Qt 5.1.1))
        When executing step 'Make'
        22:21:29: Elapsed time: 00:01.@

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 19 Jul 2013, 07:45 last edited by
          #4

          Hi,

          if I am reading the error right you are trying to put something in /libs which would be in your root directory and you can't write there.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            prismatic
            wrote on 19 Jul 2013, 15:32 last edited by
            #5

            I didn't explicitly tell QtCreator to install anything in '/libs'. The Android kit is doing something or defaulting to something which results in that error. Like I said earlier, the same build process works with the default desktop kit (it even works with the blackberry kit).

            1 Reply Last reply
            0
            • P Offline
              P Offline
              paxl
              wrote on 28 Aug 2013, 08:17 last edited by
              #6

              I don't know if you found a solution but I ran into the same problem and here is how I did to fix it.

              Here is my .pro :
              @ TEMPLATE = lib
              CONFIG += qt plugin
              QT += quick

              #include development files
              include (DeveloperAPIFiles/DevelopmentFiles.pri)

              TARGET = xbmc_plugin
              DESTDIR = xbmc_plugin_Library
              DESTDIRQML = qml_folder

              HEADERS +=
              XBMCPlugin.h
              IWebRequestDispatcher.h
              PlayableItemModel.h

              SOURCES +=
              XBMCPlugin.cpp
              PlayableItemModel.cpp

              OTHER_FILES +=
              XBMCPlugin.qml
              Menu.qml
              RemoteItem.qml
              AudioLibrary.qml
              Home.qml
              MoviesLibrary.qml
              ShowsLibrary.qml
              music.png
              movies.png
              remote.png
              shows.png
              empty_cd.png
              cdbox.png
              dvdbox.png
              smoke.png
              small_play.png
              shadow_separator_h.png
              JoystickControl.png
              ArtistLibrary.qml
              AlbumsLibrary.qml
              SongsLibrary.qml
              LibraryGridViewDelegate.qml
              MoviesGridView.qml
              MovieDetailView.qml
              player_play.png
              player_pause.png
              player_stop.png
              player_forward.png
              player_backward.png
              player_fforward.png
              player_fbackward.png
              AlbumDetailView.qml
              ArtistAlbumsView.qml
              PlaylistDelegate.qml
              simple_arrow.png
              ArrowButton.qml
              PlayerControls.qml
              RemoteControls.qml

              INCLUDEPATH += $$PWD

              include (./Audio/Audio.pri)
              include (./Video/Video.pri)
              include (./Player/Player.pri)
              include (./Remote/Remote.pri)

              deploy qml files to correct dir

              qml_folder.files = $$OTHER_FILES
              qml_folder.path = $$DESTDIR
              @

              And I would normally build my project by running qmake, make and then make install.

              However when building for Android it seems that make install runs an extra step that copies your TARGET to $(INSTALL_ROOT)/libs/armeabi-v7a/
              where INSTALL_ROOT has to be provided otherwise it uses nothing hence the /libs error.

              I found two ways to solve the problem. You can either call your make install and specify the INSTALL_ROOT argument like that :
              make INSTALL_ROOT="/home/lemire_p/work/tepee3d/android" install
              or in my case just run make install_qml_folder which still moves my TARGET and resources to the path specified by DESTDIR.

              In any case, I hope this might help you.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved