Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator 4.7.0 and LD_LIBRARY_PATH
Forum Updated to NodeBB v4.3 + New Features

QtCreator 4.7.0 and LD_LIBRARY_PATH

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 3 Posters 3.6k 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.
  • M Offline
    M Offline
    maurofaresoftware.it
    wrote on last edited by
    #1

    Hi all.
    My name's Mauro and I write you from Italy.
    I have just updated QtCreator to the latest stable version 4.7.0.
    My project is based on CMake I use the Qt 5.6.3 placed in /opt/Qt-5.6.3.

    When I try to compile my project /opt/Qt-5.6.3/bin/uic fails because miss a symbol.

    the LD_LIBRARY_PATH environment variable is assigned to the path of QtCreator by QtCreator itself.
    If I assign LD_LIBRARY_PATH to empty value "", QtCreator works well and /opt/Qt-5.6.3/bin/uic does not crash.

    Why QtCreator sets LD_LIBRARY_PATH to its own local lib folder?
    Where I can change this configuration?

    Best regards,
        MZ

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, Qt Creator sets LD_LIBRARY_PATH according to what kit is installed, you can check in Build Settings, Manage Kits (for example. in my Qt Creator the kit is "Desktop Qt 5.11.1 GCC 64-bit").

      The reason it does that is to allow your Qt app to load its .so (dll) files correctly for the selected kit when you Run your app from Qt Creator. On Windows Qt Creator also does this, it adds the directories where the .dll files are to the PATH and then launches your app.

      Perhaps your Qt Creator does not have Qt 5.6.3 installed? If so, that could explain why your 5.6.3 app fails.

      1 Reply Last reply
      4
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        Could you try starting creator with the creator.sh file located in same folder as the Creator executable
        and see if the crashing issue remains ?

        hskoglundH 1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          Could you try starting creator with the creator.sh file located in same folder as the Creator executable
          and see if the crashing issue remains ?

          hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #4

          @mrjj Nice! Didn't know about qtcreator.sh.

          That .sh file is useful when you have multiple Qt Creators installed on your system, and LD_LIBRARY_PATH contains entries to one of them, then qtcreator.sh prefixes those entries with the correct ones.

          mrjjM 1 Reply Last reply
          1
          • hskoglundH hskoglund

            @mrjj Nice! Didn't know about qtcreator.sh.

            That .sh file is useful when you have multiple Qt Creators installed on your system, and LD_LIBRARY_PATH contains entries to one of them, then qtcreator.sh prefixes those entries with the correct ones.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @hskoglund
            oh we must have posted at same time as i didn't see your post with the
            explanation of why Creator does it.
            And good info for the .sh file. was not sure what is does but the description in the top
            sounds liked fixing LD_LIBRARY_PATH isses. But now i understand whats its actually for . thank you.

            hskoglundH 1 Reply Last reply
            0
            • mrjjM mrjj

              @hskoglund
              oh we must have posted at same time as i didn't see your post with the
              explanation of why Creator does it.
              And good info for the .sh file. was not sure what is does but the description in the top
              sounds liked fixing LD_LIBRARY_PATH isses. But now i understand whats its actually for . thank you.

              hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #6

              @mrjj Actually my post yesterday is a bit confusing, because I wrote about what happens when launching a Qt program from inside Qt Creator and the problems with wrong .dll/so-files for that program (and not for Qt Creator itself).

              But @maurofaresoftware-it speaks about failure when compiling, so it could be some entry in his LD_LIBRARY_PATH that disturbs the 4.7.0. Qt Creator from functioning 100%, like another (older) installation of Qt Creator in /opt somewhere. That's why your suggestion of using qtcreator.sh is a good one :-)

              mrjjM 1 Reply Last reply
              0
              • hskoglundH hskoglund

                @mrjj Actually my post yesterday is a bit confusing, because I wrote about what happens when launching a Qt program from inside Qt Creator and the problems with wrong .dll/so-files for that program (and not for Qt Creator itself).

                But @maurofaresoftware-it speaks about failure when compiling, so it could be some entry in his LD_LIBRARY_PATH that disturbs the 4.7.0. Qt Creator from functioning 100%, like another (older) installation of Qt Creator in /opt somewhere. That's why your suggestion of using qtcreator.sh is a good one :-)

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @hskoglund
                hi
                That was also my feeling with uic failing but i was not sure how to go about
                debugging it. and i recalled the .sh file and though it might set something in there
                but turns out normally it was not used but kinda sounded like expected to be used with
                LD_LIBRARY_PATH conflicts but it was unclear to me what it actually did but
                i assumed it to be safe to try :)

                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