Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-22465

Failed when I try to compile with cmake

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • Qt Creator 4.10.0-beta1
    • Building Qt Creator
    • None
    • Linux/X11

    Description

      Hi,

      When I try to build qt-creator with cmake I have this error:

      Scanning dependencies of target 3rd_cplusplus
      [ 0%] Building CXX object src/libs/3rdparty/cplusplus/CMakeFiles/3rd_cplusplus.dir/AST.cpp.o
      In file included from /compile/qt/qt-creator/src/libs/3rdparty/cplusplus/CPlusPlusForwardDeclarations.h:36,
      from /compile/qt/qt-creator/src/libs/3rdparty/cplusplus/AST.h:23,
      from /compile/qt/qt-creator/src/libs/3rdparty/cplusplus/AST.cpp:21:
      /opt/qt5.13/include/QtCore/qglobal.h:1204:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."

      1. error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
        ^~~~~
        make[2]: *** [src/libs/3rdparty/cplusplus/CMakeFiles/3rd_cplusplus.dir/build.make:63: src/libs/3rdparty/cplusplus/CMakeFiles/3rd_cplusplus.dir/AST.cpp.o] Error 1
        make[1]: *** [CMakeFiles/Makefile2:291: src/libs/3rdparty/cplusplus/CMakeFiles/3rd_cplusplus.dir/all] Error 2
        make: *** [Makefile:130: all] Error 2

      I build my own Qt

      I use cmake 3.13.4.

       

      Regards

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cadam Cristian Adam
            montel Montel Laurent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes