Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Proper use of prefix, extprefix, and sysroot during configure
Forum Updated to NodeBB v4.3 + New Features

Proper use of prefix, extprefix, and sysroot during configure

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 2 Posters 11.0k Views 1 Watching
  • 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.
  • X Offline
    X Offline
    Xooch
    wrote on last edited by
    #1

    I'm at a loss for the proper way to call configure and make use of prefix, extprefix, sysroot, etc. I always end up with a misconfigured system. Here is my situation (paths are shortened a bit to make this easier to read):

    • I have a sysroot in /home/steve/sysroot.
    • I want to install into /home/steve/nfs, which is the NFS root of my ARM device.

    When I run "make install", I end up with files installed into:

    • /home/steve/nfs/*
    • /home/steve/nfs/home/steve/nfs/*
    • /home/steve/sysroot/home/steve/nfs/*

    I've been able to circumvent this (I think) by making symlinks in the second two locations, pointing back to the first.

    When I add the qmake to Creator (or write a program to query the paths using "QLibraryInfo::location(QLibraryInfo::PrefixPath)", for example), the paths all begin /home/steve/nfs, when they really should begin with "/".

    Using the example paths above, my configure command line would be something like

    • ./configure -sysroot /home/steve/sysroot -prefix /home/steve/nfs -extprefix /home/steve/nfs <other stuff>

    I've tried different ways of doing this, like completely omitting extprefix or prefix. When I try to use "-prefix /", I get the following error when I try to run make:

    @/home/steve/qt-arm-5.3.0/qtbase/mkspecs/features/qt_module_pris.prf:116: Cannot write file /home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/mkspecs/modules-inst/qt_lib_bootstrap_private.pri: Cannot create parent directory.@

    It's strange that a simple "make" would try to do something with the target. I've re-run this as root (not very safe), but it will fail much later on with something else (I forget the error).

    What is the proper way to call configure in my situation?

    Note: There is already a post about this problem "here":http://qt-project.org/forums/viewthread/43676/, which I would like to delete since this post more clearly states the problem, but I can't figure out how...

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      From what I read in the configure help I think that you need to use extprefix and don't use prefix. Because prefix will be appended to sysroot and extprefix will not.
      @
      -prefix <dir> ...... This will install everything relative to <dir> (default /usr/local/Qt-5.3.0, $PWD if -developer-build is active)

      -extprefix <dir> ... When -sysroot is used, install everything to <dir>, rather than into SYSROOT/PREFIX.

      -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot and also sets pkg-config paths.
      @

      Try this command line:
      @
      ./configure -sysroot /home/steve/sysroot -extprefix /home/steve/nfs <other stuff>
      @

      1 Reply Last reply
      1
      • X Offline
        X Offline
        Xooch
        wrote on last edited by
        #3

        Yeah, from what I read in the help I had that impression too. I just tried it again to be sure, no luck. Omitting -prefix results in the same paths.

        The worst part of all this? It takes quite a long time for each iteration to see if it worked or not, since Qt needs to be built.

        I should also mention that I'm starting with a freshly untarred source tree every single time, just in case.

        1 Reply Last reply
        0
        • X Offline
          X Offline
          Xooch
          wrote on last edited by
          #4

          So, omitting -prefix results in the paths being:

          @QLibraryInfo::PrefixPath = /usr/local/Qt-5.3.0
          QLibraryInfo::DocumentationPath = /usr/local/Qt-5.3.0/doc
          QLibraryInfo::HeadersPath = /usr/local/Qt-5.3.0/include
          QLibraryInfo::LibrariesPath = /usr/local/Qt-5.3.0/lib
          QLibraryInfo::LibraryExecutablesPath = /usr/local/Qt-5.3.0/libexec
          QLibraryInfo::BinariesPath = /usr/local/Qt-5.3.0/bin
          QLibraryInfo::PluginsPath = /usr/local/Qt-5.3.0/plugins
          QLibraryInfo::ImportsPath = /usr/local/Qt-5.3.0/imports
          QLibraryInfo::Qml2ImportsPath = /usr/local/Qt-5.3.0/qml
          QLibraryInfo::ArchDataPath = /usr/local/Qt-5.3.0
          QLibraryInfo::DataPath = /usr/local/Qt-5.3.0
          QLibraryInfo::TranslationsPath = /usr/local/Qt-5.3.0/translations
          QLibraryInfo::ExamplesPath = /usr/local/Qt-5.3.0/examples
          QLibraryInfo::TestsPath = /usr/local/Qt-5.3.0/tests
          QLibraryInfo::SettingsPath = /usr/local/Qt-5.3.0/etc/xdg@

          On my target, the files were installed to / instead of /usr/local/Qt-5.3.0. So, they're still not correct, and the files are not where it thinks they are.

          The paths reported by Creator are also wrong (unless they're supposed to be the host's view of things, in which case it might be correct...?) are:

          @QT_HOST_BINS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/bin
          QT_HOST_DATA=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS
          QT_HOST_LIBS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/lib
          QT_HOST_PREFIX=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS
          QT_INSTALL_ARCHDATA=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS
          QT_INSTALL_BINS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/bin
          QT_INSTALL_CONFIGURATION=/usr/local/Qt-5.3.0/etc/xdg
          QT_INSTALL_DATA=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS
          QT_INSTALL_DEMOS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/examples
          QT_INSTALL_DOCS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/doc
          QT_INSTALL_EXAMPLES=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/examples
          QT_INSTALL_HEADERS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/include
          QT_INSTALL_IMPORTS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/imports
          QT_INSTALL_LIBEXECS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/libexec
          QT_INSTALL_LIBS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/lib
          QT_INSTALL_PLUGINS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/plugins
          QT_INSTALL_PREFIX=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS
          QT_INSTALL_QML=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/qml
          QT_INSTALL_TESTS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/tests
          QT_INSTALL_TRANSLATIONS=/home/steve/ti-sdk-am335x-evm-07.00.00.00/targetNFS/translations
          QT_SYSROOT=/home/steve/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi@

          Qt be confused.

          1 Reply Last reply
          0
          • X Offline
            X Offline
            Xooch
            wrote on last edited by
            #5

            Has anyone done a cross-compiled Qt5 for embedded like this? Someone must have...

            1 Reply Last reply
            0
            • X Offline
              X Offline
              Xooch
              wrote on last edited by
              #6

              Bump... ? LOL

              Anyone have any ideas on this problem?

              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