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. make install builds everything
Forum Updated to NodeBB v4.3 + New Features

make install builds everything

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 3 Posters 862 Views 3 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.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by Mark81
    #1

    I'm cross-compiling Qt5.13 for an ARM target.
    I set up the toolchain, downloaded the sources, configured and built only the modules I need:

    $ ./configure -release -device linux-arm-stm32mp1-g++ -device-option CROSS_COMPILE=/local/STM32MP15-Ecosystem-v1.0.0/Developer-Package/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/arm-openstlinux_weston-linux-gnueabi- -sysroot /local/STM32MP15-Ecosystem-v1.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_weston-linux-gnueabi -opensource -confirm-license -make libs -prefix /usr/local/qt5-STM32MP1 -extprefix ~/qt5-STM32MP1 -hostprefix ~/qt5-STM32MP1 -v -nomake examples -nomake tests -reduce-exports -no-pch -no-use-gold-linker
    
    $ make module-qtbase
    $ make module-qtserialport
    $ make module-qtserialbus
    $ make module-qtwebsockets
    

    Then I typed make install to copy the binaries to the "extprefix" path. Instead, it built everything (ran for several hours) and of course it failed on some modules.... but I don't want them!

    Should not make install just copy the built files to the defined output directory?

    Pablo J. RoginaP 1 Reply Last reply
    0
    • M Mark81

      I'm cross-compiling Qt5.13 for an ARM target.
      I set up the toolchain, downloaded the sources, configured and built only the modules I need:

      $ ./configure -release -device linux-arm-stm32mp1-g++ -device-option CROSS_COMPILE=/local/STM32MP15-Ecosystem-v1.0.0/Developer-Package/SDK/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/bin/arm-openstlinux_weston-linux-gnueabi/arm-openstlinux_weston-linux-gnueabi- -sysroot /local/STM32MP15-Ecosystem-v1.0.0/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_weston-linux-gnueabi -opensource -confirm-license -make libs -prefix /usr/local/qt5-STM32MP1 -extprefix ~/qt5-STM32MP1 -hostprefix ~/qt5-STM32MP1 -v -nomake examples -nomake tests -reduce-exports -no-pch -no-use-gold-linker
      
      $ make module-qtbase
      $ make module-qtserialport
      $ make module-qtserialbus
      $ make module-qtwebsockets
      

      Then I typed make install to copy the binaries to the "extprefix" path. Instead, it built everything (ran for several hours) and of course it failed on some modules.... but I don't want them!

      Should not make install just copy the built files to the defined output directory?

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @mark81 said in make install builds everything:

      Should not make install just copy the built files to the defined output directory?

      And how the install target in your Makefile knows that (from your very example above) you just built modules qtbase and qtserialbus but that you forgot to build modules qtserialport and qtwebsockets?

      So in that case you'll want it to build the remaining modules and then, and only then, install all the built files.

      But for that example to work, you'll need to make your install target dependent on the all other targets: module-qtbase, module-qtserialport, module-qtserialbus, module-qtwebsockets, right?

      Well, it seems that the Qt developers did exactly the same making their install target dependent on all the modules they decided.

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      M 1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        You have to call make install for each subdir separately.

        A simpler option would be to tell configure the modules you want to skip and then it would only build what you asked for.

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

        M 1 Reply Last reply
        2
        • Pablo J. RoginaP Pablo J. Rogina

          @mark81 said in make install builds everything:

          Should not make install just copy the built files to the defined output directory?

          And how the install target in your Makefile knows that (from your very example above) you just built modules qtbase and qtserialbus but that you forgot to build modules qtserialport and qtwebsockets?

          So in that case you'll want it to build the remaining modules and then, and only then, install all the built files.

          But for that example to work, you'll need to make your install target dependent on the all other targets: module-qtbase, module-qtserialport, module-qtserialbus, module-qtwebsockets, right?

          Well, it seems that the Qt developers did exactly the same making their install target dependent on all the modules they decided.

          M Offline
          M Offline
          Mark81
          wrote on last edited by Mark81
          #4

          @pablo-j-rogina said in make install builds everything:

          And how the install target in your Makefile knows that (from your very example above) you just built modules qtbase and qtserialbus but that you forgot to build modules qtserialport and qtwebsockets?

          Well, make builds executables and make install copies them to the output directory. If there are no executables (because I forgot to build or because I don't want something) there's nothing to copy. Instead it runs make for me... I don't get the point!
          Following this approach is not needed at all to run make... just run make install.

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            You have to call make install for each subdir separately.

            A simpler option would be to tell configure the modules you want to skip and then it would only build what you asked for.

            M Offline
            M Offline
            Mark81
            wrote on last edited by
            #5

            @sgaist said in make install builds everything:

            You have to call make install for each subdir separately.

            Like make install module-qtbase? Or do you mean I have to enter each directory and run make install?
            It's funny that the docs explain how to build a single module but then just say "run make install".

            A simpler option would be to tell configure the modules you want to skip and then it would only build what you asked for.

            This makes more sense to me. Thanks.

            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