Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. re-running cmake with a different source
QtWS25 Last Chance

re-running cmake with a different source

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 7 Posters 3.8k 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.
  • A Offline
    A Offline
    agmar
    wrote on 24 Feb 2023, 12:10 last edited by
    #1

    Hi, i never managed to deploy Qt, so i tried just getting the code to another computer, which used to work , but now it just throws this error, no idea how to deal with it

    :-1: error: The source does not match the source used to
    generate cache. Re-run cmake with a different source directory

    C 1 Reply Last reply 24 Feb 2023, 12:31
    0
    • A agmar
      24 Feb 2023, 12:10

      Hi, i never managed to deploy Qt, so i tried just getting the code to another computer, which used to work , but now it just throws this error, no idea how to deal with it

      :-1: error: The source does not match the source used to
      generate cache. Re-run cmake with a different source directory

      C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 24 Feb 2023, 12:31 last edited by
      #2

      You somehow copied a build and/or source directory around and now the CMakeCache.txt points to another source and/or binary dir as you've calling it from. Remove the build dir and start from scratch,

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • I Offline
        I Offline
        ivanleoncz
        wrote on 22 Oct 2023, 20:52 last edited by
        #3

        Had the same problem today and I was going crazy here.
        Just want to say thank you to Christian for the answer.


        Hope that I'm not violating any guideline of the forum, but I'd like to provide pictorial example of what I've done on my environment (Ubuntu). Since this issue could be annoying, I wouldn't want anybody to run through the same problem of needing more instructions around the solution.


        I have a bunch of projects on a git project and I moved the project directory to (let's say) my home directory:

        $ pwd
        /home/ivanleoncz/github/c-cpp-exercises
        

        Here are all projects along with their build-* directories:

        $ ll
        total 116
        drwxrwxr-x 18 ivanleoncz ivanleoncz  4096 jul 30 20:41 ./
        drwxrwxr-x 11 ivanleoncz ivanleoncz  4096 jul  8 19:46 ../
        drwxrwxr-x  2 ivanleoncz ivanleoncz  4096 oct 22 14:27 Arrays/
        drwxrwxr-x  2 ivanleoncz ivanleoncz  4096 jun 30 18:55 ArraysCalculations/
        drwxrwxr-x  7 ivanleoncz ivanleoncz  4096 may 31 18:47 build-ArraysCalculations-Desktop-Debug/
        drwxrwxr-x  7 ivanleoncz ivanleoncz  4096 oct 22 14:27 build-Arrays-Desktop-Debug/
        drwxrwxr-x  7 ivanleoncz ivanleoncz  4096 jul  5 20:24 build-Calculator-cpp-Desktop-Debug/
        drwxrwxr-x  7 ivanleoncz ivanleoncz  4096 jun  4 20:49 build-SizeOf-Desktop-Debug/
        drwxrwxr-x  7 ivanleoncz ivanleoncz  4096 jul 30 22:03 build-strings-cpp-Desktop-Debug/
        drwxrwxr-x  7 ivanleoncz ivanleoncz  4096 jul 30 22:06 build-strings-v2-cpp-Desktop-Debug/
        drwxrwxr-x  2 ivanleoncz ivanleoncz  4096 jul  5 20:24 Calculator-cpp/
        drwxrwxr-x  2 ivanleoncz ivanleoncz  4096 jun 30 18:46 CountDigitsFromString/
        drwxrwxr-x  8 ivanleoncz ivanleoncz  4096 jul 24 22:51 .git/
        -rw-rw-r--  1 ivanleoncz ivanleoncz   376 jun 30 18:54 .gitignore
        drwxrwxr-x  2 ivanleoncz ivanleoncz  4096 jun 30 18:46 InputNumbersDynamic/
        drwxrwxr-x  2 ivanleoncz ivanleoncz  4096 jun 30 18:46 IterateOverString/
        -rw-rw-r--  1 ivanleoncz ivanleoncz 35149 may 31 18:43 LICENSE
        -rw-rw-r--  1 ivanleoncz ivanleoncz    49 may 31 20:41 README.md
        drwxrwxr-x  4 ivanleoncz ivanleoncz  4096 jun 30 18:54 SizeOf/
        drwxrwxr-x  2 ivanleoncz ivanleoncz  4096 jul 30 22:15 strings-cpp/
        drwxrwxr-x  2 ivanleoncz ivanleoncz  4096 jul 30 22:15 strings-v2-cpp/
        

        I just deleted all build-* directories:

        $ rm -rf build-*
        

        And for any of the projects, I just Rebuild them:

        Screenshot from 2023-10-22 14-44-02.png

        And running the project (CTRL+R) goes just fine.

        Regards,
        Ivan Leon
        https://doadm-notes.blogspot.com/

        1 Reply Last reply
        0
        • T Offline
          T Offline
          touchelos
          wrote on 5 Aug 2024, 04:34 last edited by
          #4

          Open your terminal then write the following commands:

          flutter clean
          
          flutter pub get
          
          flutter run
          
          P 1 Reply Last reply 5 Aug 2024, 13:11
          0
          • T touchelos
            5 Aug 2024, 04:34

            Open your terminal then write the following commands:

            flutter clean
            
            flutter pub get
            
            flutter run
            
            P Offline
            P Offline
            Pl45m4
            wrote on 5 Aug 2024, 13:11 last edited by
            #5

            @touchelos

            How is this topic even related to flutter? It's not mentioned at all.


            If debugging is the process of removing software bugs, then programming must be the process of putting them in.

            ~E. W. Dijkstra

            A 1 Reply Last reply 5 Aug 2024, 13:12
            0
            • P Pl45m4
              5 Aug 2024, 13:11

              @touchelos

              How is this topic even related to flutter? It's not mentioned at all.

              A Offline
              A Offline
              artwaw
              wrote on 5 Aug 2024, 13:12 last edited by
              #6

              @Pl45m4 another spam account posting on a long dead thread. I report at least three per day...

              For more information please re-read.

              Kind Regards,
              Artur

              P K 2 Replies Last reply 5 Aug 2024, 13:17
              0
              • A artwaw
                5 Aug 2024, 13:12

                @Pl45m4 another spam account posting on a long dead thread. I report at least three per day...

                P Offline
                P Offline
                Pl45m4
                wrote on 5 Aug 2024, 13:17 last edited by
                #7

                @artwaw

                What's the point of posting random, unrelated sh!t?
                I mean, what if I want to recover my lost BTC or want to buy some blue pills online?
                How do one know what "services" they are offering? xD


                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                A 1 Reply Last reply 5 Aug 2024, 13:21
                1
                • P Pl45m4
                  5 Aug 2024, 13:17

                  @artwaw

                  What's the point of posting random, unrelated sh!t?
                  I mean, what if I want to recover my lost BTC or want to buy some blue pills online?
                  How do one know what "services" they are offering? xD

                  A Offline
                  A Offline
                  artwaw
                  wrote on 5 Aug 2024, 13:21 last edited by
                  #8

                  @Pl45m4 I might be overly biased but judging by the amount of random posts like this one (some of them are "I have the same problem" line but never followed if anyone wants to assist) I think someone is trying to employ LLM. testing new iterations perhaps. But I am biased, so might be wrong.

                  For more information please re-read.

                  Kind Regards,
                  Artur

                  P 1 Reply Last reply 5 Aug 2024, 13:28
                  0
                  • A artwaw
                    5 Aug 2024, 13:21

                    @Pl45m4 I might be overly biased but judging by the amount of random posts like this one (some of them are "I have the same problem" line but never followed if anyone wants to assist) I think someone is trying to employ LLM. testing new iterations perhaps. But I am biased, so might be wrong.

                    P Offline
                    P Offline
                    Pl45m4
                    wrote on 5 Aug 2024, 13:28 last edited by
                    #9

                    @artwaw said in re-running cmake with a different source:

                    some of them are "I have the same problem" line but never followed if anyone wants to assist

                    Don't overestimate the attitude and cleverness of the common forum user :)
                    Some "real" persons post that they have a similar problem and never come back to the topic again...


                    If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                    ~E. W. Dijkstra

                    1 Reply Last reply
                    1
                    • A artwaw
                      5 Aug 2024, 13:12

                      @Pl45m4 another spam account posting on a long dead thread. I report at least three per day...

                      K Offline
                      K Offline
                      kshegunov
                      Moderators
                      wrote on 5 Aug 2024, 20:43 last edited by
                      #10

                      @artwaw said in re-running cmake with a different source:

                      @Pl45m4 another spam account posting on a long dead thread. I report at least three per day...

                      @Pl45m4 said in re-running cmake with a different source:

                      What's the point of posting random, unrelated sh!t?
                      How do one know what "services" they are offering? xD

                      What typically is the case, is we get backlink spam - at some point a benign looking post is edited to add links to some unrelated thing. If it is really obvious from the start, we delete the post directly, otherwise we may wait some time for the "spammy nature" of the post to manifest itself. In any case we try to give people a fair chance, if for example they'd missed the point of the discussion, posting in the wrong place or w/e.

                      Read and abide by the Qt Code of Conduct

                      1 Reply Last reply
                      1

                      • Login

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