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. Can't compile llvm for QtCreator

Can't compile llvm for QtCreator

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 4 Posters 2.2k 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.
  • martinv_M Offline
    martinv_M Offline
    martinv_
    wrote on last edited by
    #1

    Hello,

    QtCreator sources cloned from code.qt.io/cgit contain a README.md with the following instructions to build llvm (I'm using Linux):

    Build LLVM/Clang by roughly following the instructions at
    http://llvm.org/docs/GettingStarted.html#git-mirror:

    1. Clone LLVM and checkout a suitable branch
      git clone -b release_60-based https://code.qt.io/clang/llvm

    2. Clone Clang into llvm/tools/clang and checkout a suitable branch
      git clone -b release_60-based https://code.qt.io/clang/clang llvm/tools/clang

    3. Build and install LLVM/Clang
      mkdir build
      cd build

      For Linux/macOS:
      cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<installation location> -DLLVM_ENABLE_RTTI=ON ../llvm
      make install

    When I run make, the compilation goes fine until 91% and then I get the following error:

    [ 91%] Linking CXX executable ../../../../bin/clang
    /usr/bin/ld: cannot find -lclazyPlugin
    collect2: error: ld returned 1 exit status
    make[2]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/build.make:296: bin/clang-6.0] Error 1
    make[1]: *** [CMakeFiles/Makefile2:23647: tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2
    make: *** [Makefile:152: all] Error 2

    Is there a workaround? Should I just wait for a fix to appear in the source tree? The CMakeLists.txt of llvm cloned from
    the above address does not have any configuration options regarding CLazy plugin.

    Kind regards,

    Martin

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

      Hi,

      What branch of Qt Creator did you try to build ?

      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
      • martinv_M Offline
        martinv_M Offline
        martinv_
        wrote on last edited by
        #3

        Hi,

        this was QtCreator master cloned from git://code.qt.io/qt-creator/qt-creator.git

        I use QtCreator for C++ code development, but don't develop QtCreator itself - I just need the 'vanilla' version and don't really have a reason to check out other branches.

        I'm surprised nobody else observed this.

        Btw., I'm compiling llvm to have it as C++ code model in QtCreator, but the error occurs before I even get to compiling QtCreator. The only link to QtCreator is that

        1. I followed the instructions in its Readme
        2. I tried to compile llvm sources checked out from your server (https://code.qt.io/clang/llvm). I suppose these are somehow modified compared to the original llvm sources. QtCreator branch should be irrelevant here.

        Cheers,

        Martin

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

          You should rather build the branch that matches the version you want to use.

          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
          • martinv_M Offline
            martinv_M Offline
            martinv_
            wrote on last edited by martinv_
            #5

            I want to use any branch that works. I tried to recompile QtCreator recently and got an error saying that I need to upgrade my LLVM installation to 6.0, and that's what I'm trying to do. You can hardly blame me for following the instructions in QtCreator README.

            There's no attempt to experiment or tweak things here. The defaults don't work for me.

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

              I'm not blaming you. That was rather a suggestion to follow the current "stable branch" rather than master that is the "development" branch.

              By the way, why not use the pre-built version of LLVM as suggested in the Readme file ?

              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
              1
              • L Offline
                L Offline
                ldog
                wrote on last edited by
                #7

                I have signed up for this forum just to say I have the exact same issue as OP and since he hasn't resolved and I haven't been able to either, I hope someone can help us.

                It's likely that others have come across the same issue as well.

                aha_1980A 1 Reply Last reply
                0
                • L ldog

                  I have signed up for this forum just to say I have the exact same issue as OP and since he hasn't resolved and I haven't been able to either, I hope someone can help us.

                  It's likely that others have come across the same issue as well.

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by aha_1980
                  #8

                  @ldog, just citing @SGaist

                  By the way, why not use the pre-built version of LLVM as suggested in the Readme file ?

                  regards

                  Qt has to stay free or it will die.

                  L 1 Reply Last reply
                  0
                  • aha_1980A aha_1980

                    @ldog, just citing @SGaist

                    By the way, why not use the pre-built version of LLVM as suggested in the Readme file ?

                    regards

                    L Offline
                    L Offline
                    ldog
                    wrote on last edited by
                    #9

                    @aha_1980 Thanks for the suggestion, I haven't tried the prebuilt yet, but I've been able to resolve this issue by compiling the source of LLVM and Clang 6.0 from http://releases.llvm.org/download.html

                    I don't know why the two sources would differ so much, it might be worth investigating.

                    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