h4tr3d / cmakeprojectmanager2

Enhanced CMake Project Manager plugin for Qt Creator
74 stars 9 forks source link

Build error with QtC 4.5 #18

Closed akontsevich closed 6 years ago

akontsevich commented 6 years ago

Have error building cmakeprojectmanager2 against Qt Creator 4.5. Was able to build successfully previously. Error message below. Which revision/branch I can use to build against Qt Creator 4.5?

In file included from ../cmakeprojectmanager2/cmakerunconfiguration.cpp:26:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:58:10: error: 'void CMakeProjectManager::Internal::CMakeRunConfiguration::initialize(Core::Id)' marked 'override', but does not override
     void initialize(Core::Id id) override;
          ^~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.cpp: In constructor 'CMakeProjectManager::Internal::CMakeRunConfigurationFactory::CMakeRunConfigurationFactory(QObject*)':
../cmakeprojectmanager2/cmakerunconfiguration.cpp:224:5: error: 'registerRunConfiguration' was not declared in this scope
     registerRunConfiguration<CMakeRunConfiguration>();
     ^~~~~~~~~~~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.cpp:224:5: note: suggested alternative: 'CMakeRunConfigurationFactory'
     registerRunConfiguration<CMakeRunConfiguration>();
     ^~~~~~~~~~~~~~~~~~~~~~~~
     CMakeRunConfigurationFactory
../cmakeprojectmanager2/cmakerunconfiguration.cpp:224:51: error: expected primary-expression before '>' token
     registerRunConfiguration<CMakeRunConfiguration>();
                                                   ^
../cmakeprojectmanager2/cmakerunconfiguration.cpp:224:53: error: expected primary-expression before ')' token
     registerRunConfiguration<CMakeRunConfiguration>();
                                                     ^
../cmakeprojectmanager2/cmakerunconfiguration.cpp:225:5: error: 'setSupportedProjectType' was not declared in this scope
     setSupportedProjectType<CMakeProject>();
     ^~~~~~~~~~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.cpp:225:41: error: expected primary-expression before '>' token
     setSupportedProjectType<CMakeProject>();
                                         ^
../cmakeprojectmanager2/cmakerunconfiguration.cpp:225:43: error: expected primary-expression before ')' token
     setSupportedProjectType<CMakeProject>();
                                           ^
../cmakeprojectmanager2/cmakerunconfiguration.cpp: In member function 'virtual QList<Core::Id> CMakeProjectManager::Internal::CMakeRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target*, ProjectExplorer::IRunConfigurationFactory::CreationMode) const':
../cmakeprojectmanager2/cmakerunconfiguration.cpp:232:10: error: 'canHandle' was not declared in this scope
     if (!canHandle(parent))
          ^~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.cpp: In member function 'virtual bool CMakeProjectManager::Internal::CMakeRunConfigurationFactory::canCreate(ProjectExplorer::Target*, Core::Id) const':
../cmakeprojectmanager2/cmakerunconfiguration.cpp:249:10: error: 'canHandle' was not declared in this scope
     if (!canHandle(parent))
          ^~~~~~~~~
In file included from ../cmakeprojectmanager2/cmakebuildstep.cpp:33:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:58:10: error: 'void CMakeProjectManager::Internal::CMakeRunConfiguration::initialize(Core::Id)' marked 'override', but does not override
     void initialize(Core::Id id) override;
          ^~~~~~~~~~
In file included from ../cmakeprojectmanager2/cmakeproject.cpp:32:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:58:10: error: 'void CMakeProjectManager::Internal::CMakeRunConfiguration::initialize(Core::Id)' marked 'override', but does not override
     void initialize(Core::Id id) override;
          ^~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.cpp: In member function 'virtual bool CMakeProjectManager::Internal::CMakeRunConfigurationFactory::canClone(ProjectExplorer::Target*, ProjectExplorer::RunConfiguration*) const':
../cmakeprojectmanager2/cmakerunconfiguration.cpp:257:10: error: 'canHandle' was not declared in this scope
     if (!canHandle(parent))
          ^~~~~~~~~
In file included from ../cmakeprojectmanager2/cmakeprojectplugin.cpp:35:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:58:10: error: 'void CMakeProjectManager::Internal::CMakeRunConfiguration::initialize(Core::Id)' marked 'override', but does not override
     void initialize(Core::Id id) override;
          ^~~~~~~~~~
../cmakeprojectmanager2/cmakeprojectplugin.cpp: In member function 'virtual bool CMakeProjectManager::Internal::CMakeProjectPlugin::initialize(const QStringList&, QString*)':
../cmakeprojectmanager2/cmakeprojectplugin.cpp:74:31: error: invalid new-expression of abstract class type 'CMakeProjectManager::Internal::CMakeRunConfigurationFactory'
     addAutoReleasedObject(new CMakeRunConfigurationFactory);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../cmakeprojectmanager2/cmakeprojectplugin.cpp:35:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:81:7: note:   because the following virtual functions are pure within 'CMakeProjectManager::Internal::CMakeRunConfigurationFactory':
 class CMakeRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../src/plugins/projectexplorer/runnables.h:28:0,
                 from ../cmakeprojectmanager2/cmakerunconfiguration.h:28,
                 from ../cmakeprojectmanager2/cmakeprojectplugin.cpp:35:
../../src/plugins/projectexplorer/runconfiguration.h:296:31: note:      virtual ProjectExplorer::RunConfiguration* ProjectExplorer::IRunConfigurationFactory::clone(ProjectExplorer::Target*, ProjectExplorer::RunConfiguration*)
     virtual RunConfiguration *clone(Target *parent, RunConfiguration *product) = 0;
                               ^~~~~
../../src/plugins/projectexplorer/runconfiguration.h:320:31: note:      virtual ProjectExplorer::RunConfiguration* ProjectExplorer::IRunConfigurationFactory::doCreate(ProjectExplorer::Target*, Core::Id)
     virtual RunConfiguration *doCreate(Target *parent, Core::Id id) = 0;
                               ^~~~~~~~
../../src/plugins/projectexplorer/runconfiguration.h:321:31: note:      virtual ProjectExplorer::RunConfiguration* ProjectExplorer::IRunConfigurationFactory::doRestore(ProjectExplorer::Target*, const QVariantMap&)
     virtual RunConfiguration *doRestore(Target *parent, const QVariantMap &map) = 0;
                               ^~~~~~~~~
g++ -c -pipe -Wno-noexcept-type -O2 -std=gnu++1y -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DCMAKEPROJECTMANAGER_LIBRARY -D'RELATIVE_PLUGIN_PATH="../lib/qtcreator/plugins"' -D'RELATIVE_LIBEXEC_PATH="../libexec/qtcreator"' -D'RELATIVE_DATA_PATH="../share/qtcreator"' -D'RELATIVE_DOC_PATH="../share/doc/qtcreator"' -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_CREATOR -DQT_NO_CAST_TO_ASCII -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_DISABLE_DEPRECATED_BEFORE=0x050600 -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQMAKE_AS_LIBRARY -DPROPARSER_THREAD_SAFE -DPROEVALUATOR_THREAD_SAFE -DPROEVALUATOR_CUMULATIVE -DPROEVALUATOR_DUAL_VFS -DPROEVALUATOR_SETENV -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/aleksey/Qt/Tools/QtCreator/src/qt-creator/qt-creator-build/cmakeprojectmanager2-build/src -I../../src -I../../src/libs -I/home/aleksey/Qt/Tools/QtCreator/src/qt-creator/tools -I../../src/plugins -I../../src/shared -I../../src/libs/3rdparty -I. -I../../src/plugins/texteditor -I/home/aleksey/Qt/5.9.3/gcc_64/include -I/home/aleksey/Qt/5.9.3/gcc_64/include/QtWidgets -I/home/aleksey/Qt/5.9.3/gcc_64/include/QtGui -I/home/aleksey/Qt/5.9.3/gcc_64/include/QtConcurrent -I/home/aleksey/Qt/5.9.3/gcc_64/include/QtNetwork -I/home/aleksey/Qt/5.9.3/gcc_64/include/QtCore -I.moc/release-shared -isystem /usr/include/libdrm -I/home/aleksey/Qt/5.9.3/gcc_64/mkspecs/linux-g++ -o .obj/release-shared/cmaketool.o ../cmakeprojectmanager2/cmaketool.cpp
make: *** [Makefile:7744: .obj/release-shared/cmakerunconfiguration.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:6928: .obj/release-shared/cmakeprojectplugin.o] Error 1
make: *** [Makefile:5801: .obj/release-shared/cmakebuildstep.o] Error 1
make: *** [Makefile:6356: .obj/release-shared/cmakeproject.o] Error 1
akontsevich commented 6 years ago

Using following script to build:

#!/bin/bash

# Clone Qt Creator repo
git clone https://github.com/qtproject/qt-creator.git qt-creator
cd qt-creator
git checkout 4.5

# Build Qt Creator
cd ..
mkdir qt-creator-build
cd qt-creator-build
~/Qt/5.9.3/gcc_64/bin/qmake IDE_PACKAGE_MODE=1 LLVM_INSTALL_DIR=/usr/lib64  CONFIG+=qbs_enable_project_file_updates ../qt-creator/qtcreator.pro
make -j8

# Clone cmakeprojectmanager2
cd ..
git clone https://github.com/h4tr3d/cmakeprojectmanager2.git cmakeprojectmanager2

# Build cmakeprojectmanager2
mkdir cmakeprojectmanager2-build
cd cmakeprojectmanager2-build
export QTC_SOURCE=~/Qt/Tools/QtCreator/src/qt-creator
export QTC_BUILD=~/Qt/Tools/QtCreator/src/qt-creator-build/
export QTC_PREFIX=~/Qt/Tools/QtCreator/src/qt-creator-build/
~/Qt/5.9.3/gcc_64/bin/qmake LIBS+=-L${QTC_BUILD}/lib/qtcreator LIBS+=-L${QTC_BUILD}/lib/qtcreator/plugins ../cmakeprojectmanager2/cmakeprojectmanager.pro
make -j8
h4tr3d commented 6 years ago

Hi, master branch oriented to QtC master branch respectively. Try b7ba1d41cd5d868699636191878daabef67fe796 or more early 0e301b8a1c6becc0c0f67b2df4eb40e7913a521b to build with QtC 4.5.

akontsevich commented 6 years ago

@h4tr3d, both do not work. I was definitely able to build it 27 days ago talking to You in #17.

h4tr3d commented 6 years ago

@akontsevich, oook. Wait a little bit ;-)

h4tr3d commented 6 years ago

Aleksey, try branch 4.5 :-) I revert some refactoring commits occurs in QtC master and now it builds with QtC 4.5 branch for me.

I am not ready to support 4.5 branch myself, so, if you need it you can backport changes from master and create pull requests :-)

akontsevich commented 6 years ago

No luck: :(

g++ -c -pipe -Wno-noexcept-type -O2 -std=gnu++1y -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DCMAKEPROJECTMANAGER_LIBRARY -D'RELATIVE_PLUGIN_PATH="../lib/qtcreator/plugins"' -D'RELATIVE_LIBEXEC_PATH="../libexec/qtcreator"' -D'RELATIVE_DATA_PATH="../share/qtcreator"' -D'RELATIVE_DOC_PATH="../share/doc/qtcreator"' -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_CREATOR -DQT_NO_CAST_TO_ASCII -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_DISABLE_DEPRECATED_BEFORE=0x050600 -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQMAKE_AS_LIBRARY -DPROPARSER_THREAD_SAFE -DPROEVALUATOR_THREAD_SAFE -DPROEVALUATOR_CUMULATIVE -DPROEVALUATOR_DUAL_VFS -DPROEVALUATOR_SETENV -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/aleksey/Qt/Tools/QtCreator/src/cmakeprojectmanager2-build/src -I../qt-creator/src -I../qt-creator/src/libs -I/home/aleksey/Qt/Tools/QtCreator/src/qt-creator/tools -I../qt-creator/src/plugins -I../qt-creator/src/shared -I../qt-creator/src/libs/3rdparty -I. -I../qt-creator/src/plugins/texteditor -I../../../../5.9.3/gcc_64/include -I../../../../5.9.3/gcc_64/include/QtWidgets -I../../../../5.9.3/gcc_64/include/QtGui -I../../../../5.9.3/gcc_64/include/QtConcurrent -I../../../../5.9.3/gcc_64/include/QtNetwork -I../../../../5.9.3/gcc_64/include/QtCore -I.moc/release-shared -isystem /usr/include/libdrm -I../../../../5.9.3/gcc_64/mkspecs/linux-g++ -o .obj/release-shared/cmakefilecompletionassist.o ../cmakeprojectmanager2/cmakefilecompletionassist.cpp
In file included from ../cmakeprojectmanager2/cmakerunconfiguration.cpp:26:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:58:10: error: 'void CMakeProjectManager::Internal::CMakeRunConfiguration::initialize(Core::Id)' marked 'override', but does not override
     void initialize(Core::Id id) override;
          ^~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.h:88:20: error: 'QList<QString> CMakeProjectManager::Internal::CMakeRunConfigurationFactory::availableBuildTargets(ProjectExplorer::Target*, ProjectExplorer::IRunConfigurationFactory::CreationMode) const' marked 'override', but does not override
     QList<QString> availableBuildTargets(ProjectExplorer::Target *parent, CreationMode mode) const override;
                    ^~~~~~~~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.h:89:10: error: 'bool CMakeProjectManager::Internal::CMakeRunConfigurationFactory::canCreateHelper(ProjectExplorer::Target*, const QString&) const' marked 'override', but does not override
     bool canCreateHelper(ProjectExplorer::Target *parent, const QString &suffix) const override;
          ^~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakeeditor.cpp:116:12: error: 'Link' in namespace 'Utils' does not name a type
     Utils::Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true, bool inNextSplit = false) override;
            ^~~~
../cmakeprojectmanager2/cmakeeditor.cpp:135:8: error: 'Link' in namespace 'Utils' does not name a type
 Utils::Link CMakeEditorWidget::findLinkAt(const QTextCursor &cursor,
        ^~~~
In file included from ../cmakeprojectmanager2/cmakeprojectplugin.cpp:35:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:58:10: error: 'void CMakeProjectManager::Internal::CMakeRunConfiguration::initialize(Core::Id)' marked 'override', but does not override
     void initialize(Core::Id id) override;
          ^~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.h:88:20: error: 'QList<QString> CMakeProjectManager::Internal::CMakeRunConfigurationFactory::availableBuildTargets(ProjectExplorer::Target*, ProjectExplorer::IRunConfigurationFactory::CreationMode) const' marked 'override', but does not override
     QList<QString> availableBuildTargets(ProjectExplorer::Target *parent, CreationMode mode) const override;
                    ^~~~~~~~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.h:89:10: error: 'bool CMakeProjectManager::Internal::CMakeRunConfigurationFactory::canCreateHelper(ProjectExplorer::Target*, const QString&) const' marked 'override', but does not override
     bool canCreateHelper(ProjectExplorer::Target *parent, const QString &suffix) const override;
          ^~~~~~~~~~~~~~~
In file included from ../cmakeprojectmanager2/cmakebuildstep.cpp:33:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:58:10: error: 'void CMakeProjectManager::Internal::CMakeRunConfiguration::initialize(Core::Id)' marked 'override', but does not override
     void initialize(Core::Id id) override;
          ^~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.h:88:20: error: 'QList<QString> CMakeProjectManager::Internal::CMakeRunConfigurationFactory::availableBuildTargets(ProjectExplorer::Target*, ProjectExplorer::IRunConfigurationFactory::CreationMode) const' marked 'override', but does not override
     QList<QString> availableBuildTargets(ProjectExplorer::Target *parent, CreationMode mode) const override;
                    ^~~~~~~~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.h:89:10: error: 'bool CMakeProjectManager::Internal::CMakeRunConfigurationFactory::canCreateHelper(ProjectExplorer::Target*, const QString&) const' marked 'override', but does not override
     bool canCreateHelper(ProjectExplorer::Target *parent, const QString &suffix) const override;
          ^~~~~~~~~~~~~~~
In file included from ../cmakeprojectmanager2/cmakeproject.cpp:32:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:58:10: error: 'void CMakeProjectManager::Internal::CMakeRunConfiguration::initialize(Core::Id)' marked 'override', but does not override
     void initialize(Core::Id id) override;
          ^~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.h:88:20: error: 'QList<QString> CMakeProjectManager::Internal::CMakeRunConfigurationFactory::availableBuildTargets(ProjectExplorer::Target*, ProjectExplorer::IRunConfigurationFactory::CreationMode) const' marked 'override', but does not override
     QList<QString> availableBuildTargets(ProjectExplorer::Target *parent, CreationMode mode) const override;
                    ^~~~~~~~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.h:89:10: error: 'bool CMakeProjectManager::Internal::CMakeRunConfigurationFactory::canCreateHelper(ProjectExplorer::Target*, const QString&) const' marked 'override', but does not override
     bool canCreateHelper(ProjectExplorer::Target *parent, const QString &suffix) const override;
          ^~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakeprojectplugin.cpp: In member function 'virtual bool CMakeProjectManager::Internal::CMakeProjectPlugin::initialize(const QStringList&, QString*)':
../cmakeprojectmanager2/cmakeprojectplugin.cpp:74:31: error: invalid new-expression of abstract class type 'CMakeProjectManager::Internal::CMakeRunConfigurationFactory'
     addAutoReleasedObject(new CMakeRunConfigurationFactory);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../cmakeprojectmanager2/cmakeprojectplugin.cpp:35:0:
../cmakeprojectmanager2/cmakerunconfiguration.h:81:7: note:   because the following virtual functions are pure within 'CMakeProjectManager::Internal::CMakeRunConfigurationFactory':
 class CMakeRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../qt-creator/src/plugins/projectexplorer/runnables.h:28:0,
                 from ../cmakeprojectmanager2/cmakerunconfiguration.h:28,
                 from ../cmakeprojectmanager2/cmakeprojectplugin.cpp:35:
../qt-creator/src/plugins/projectexplorer/runconfiguration.h:288:29: note:      virtual QList<Core::Id> ProjectExplorer::IRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target*, ProjectExplorer::IRunConfigurationFactory::CreationMode) const
     virtual QList<Core::Id> availableCreationIds(Target *parent, CreationMode mode = UserCreate) const = 0;
                             ^~~~~~~~~~~~~~~~~~~~
../qt-creator/src/plugins/projectexplorer/runconfiguration.h:289:21: note:      virtual QString ProjectExplorer::IRunConfigurationFactory::displayNameForId(Core::Id) const
     virtual QString displayNameForId(Core::Id id) const = 0;
                     ^~~~~~~~~~~~~~~~
../qt-creator/src/plugins/projectexplorer/runconfiguration.h:291:18: note:      virtual bool ProjectExplorer::IRunConfigurationFactory::canCreate(ProjectExplorer::Target*, Core::Id) const
     virtual bool canCreate(Target *parent, Core::Id id) const = 0;
                  ^~~~~~~~~
../qt-creator/src/plugins/projectexplorer/runconfiguration.h:293:18: note:      virtual bool ProjectExplorer::IRunConfigurationFactory::canRestore(ProjectExplorer::Target*, const QVariantMap&) const
     virtual bool canRestore(Target *parent, const QVariantMap &map) const = 0;
                  ^~~~~~~~~~
../qt-creator/src/plugins/projectexplorer/runconfiguration.h:295:18: note:      virtual bool ProjectExplorer::IRunConfigurationFactory::canClone(ProjectExplorer::Target*, ProjectExplorer::RunConfiguration*) const
     virtual bool canClone(Target *parent, RunConfiguration *product) const = 0;
                  ^~~~~~~~
../qt-creator/src/plugins/projectexplorer/runconfiguration.h:296:31: note:      virtual ProjectExplorer::RunConfiguration* ProjectExplorer::IRunConfigurationFactory::clone(ProjectExplorer::Target*, ProjectExplorer::RunConfiguration*)
     virtual RunConfiguration *clone(Target *parent, RunConfiguration *product) = 0;
                               ^~~~~
../qt-creator/src/plugins/projectexplorer/runconfiguration.h:320:31: note:      virtual ProjectExplorer::RunConfiguration* ProjectExplorer::IRunConfigurationFactory::doCreate(ProjectExplorer::Target*, Core::Id)
     virtual RunConfiguration *doCreate(Target *parent, Core::Id id) = 0;
                               ^~~~~~~~
../qt-creator/src/plugins/projectexplorer/runconfiguration.h:321:31: note:      virtual ProjectExplorer::RunConfiguration* ProjectExplorer::IRunConfigurationFactory::doRestore(ProjectExplorer::Target*, const QVariantMap&)
     virtual RunConfiguration *doRestore(Target *parent, const QVariantMap &map) = 0;
                               ^~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.cpp: In constructor 'CMakeProjectManager::Internal::CMakeRunConfigurationFactory::CMakeRunConfigurationFactory(QObject*)':
../cmakeprojectmanager2/cmakerunconfiguration.cpp:235:5: error: 'registerRunConfiguration' was not declared in this scope
     registerRunConfiguration<CMakeRunConfiguration>(CMAKE_RC_PREFIX);
     ^~~~~~~~~~~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.cpp:235:5: note: suggested alternative: 'CMakeRunConfigurationFactory'
     registerRunConfiguration<CMakeRunConfiguration>(CMAKE_RC_PREFIX);
     ^~~~~~~~~~~~~~~~~~~~~~~~
     CMakeRunConfigurationFactory
../cmakeprojectmanager2/cmakerunconfiguration.cpp:235:51: error: expected primary-expression before '>' token
     registerRunConfiguration<CMakeRunConfiguration>(CMAKE_RC_PREFIX);
                                                   ^
../cmakeprojectmanager2/cmakerunconfiguration.cpp:236:5: error: 'setSupportedProjectType' was not declared in this scope
     setSupportedProjectType<CMakeProject>();
     ^~~~~~~~~~~~~~~~~~~~~~~
../cmakeprojectmanager2/cmakerunconfiguration.cpp:236:41: error: expected primary-expression before '>' token
     setSupportedProjectType<CMakeProject>();
                                         ^
../cmakeprojectmanager2/cmakerunconfiguration.cpp:236:43: error: expected primary-expression before ')' token
     setSupportedProjectType<CMakeProject>();
                                           ^
../cmakeprojectmanager2/cmakeeditor.cpp:125:13: warning: 'bool CMakeProjectManager::Internal::isValidFileNameChar(const QChar&)' defined but not used [-Wunused-function]
 static bool isValidFileNameChar(const QChar &c)
             ^~~~~~~~~~~~~~~~~~~
make: *** [Makefile:8320: .obj/release-shared/cmakeeditor.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:6928: .obj/release-shared/cmakeprojectplugin.o] Error 1
make: *** [Makefile:7744: .obj/release-shared/cmakerunconfiguration.o] Error 1
make: *** [Makefile:5801: .obj/release-shared/cmakebuildstep.o] Error 1
make: *** [Makefile:6356: .obj/release-shared/cmakeproject.o] Error 1

My build script (fixed):

#!/bin/bash

# Clone Qt Creator repo
git clone https://github.com/qtproject/qt-creator.git qt-creator
cd qt-creator
git checkout 4.5

# Build Qt Creator
cd ..
mkdir qt-creator-build
cd qt-creator-build
~/Qt/5.9.3/gcc_64/bin/qmake IDE_PACKAGE_MODE=1 LLVM_INSTALL_DIR=/usr/lib64 CONFIG+=qbs_enable_project_file_updates ../qt-creator/qtcreator.pro
make -j8

# Clone cmakeprojectmanager2
cd ..
git clone https://github.com/h4tr3d/cmakeprojectmanager2.git cmakeprojectmanager2
git checkout 4.5

# Build cmakeprojectmanager2
mkdir cmakeprojectmanager2-build
cd cmakeprojectmanager2-build
export QTC_SOURCE=~/Qt/Tools/QtCreator/src/qt-creator
export QTC_BUILD=~/Qt/Tools/QtCreator/src/qt-creator-build
export QTC_PREFIX=~/Qt/Tools/QtCreator/src/qt-creator-build
~/Qt/5.9.3/gcc_64/bin/qmake QTC_PREFIX=~/Qt/Tools/QtCreator/src/qt-creator-build \
                            LIBS+=-L${QTC_BUILD}/lib/qtcreator \
                            LIBS+=-L${QTC_BUILD}/lib/qtcreator/plugins \
                            ../cmakeprojectmanager2/cmakeprojectmanager.pro
make -j8

Question

What the problem could be?!

h4tr3d commented 6 years ago

Stop, you wrote:

git clone https://github.com/h4tr3d/cmakeprojectmanager2.git cmakeprojectmanager2
git checkout 4.5

I don't see next command:

cd cmakeprojectmanager2

before checkout. Good idea to add set -x at the script begin to fail as quick as possible and omit error accumulation.

akontsevich commented 6 years ago

Sorry, my bad, added this for qt-creator, missed for cmakeprojectmanager2. Now have less errors.

Error

g++ -c -pipe -Wno-noexcept-type -O2 -std=gnu++1y -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DCMAKEPROJECTMANAGER_LIBRARY -D'RELATIVE_PLUGIN_PATH="../lib/qtcreator/plugins"' -D'RELATIVE_LIBEXEC_PATH="../libexec/qtcreator"' -D'RELATIVE_DATA_PATH="../share/qtcreator"' -D'RELATIVE_DOC_PATH="../share/doc/qtcreator"' -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_CREATOR -DQT_NO_CAST_TO_ASCII -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_DISABLE_DEPRECATED_BEFORE=0x050600 -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQMAKE_AS_LIBRARY -DPROPARSER_THREAD_SAFE -DPROEVALUATOR_THREAD_SAFE -DPROEVALUATOR_CUMULATIVE -DPROEVALUATOR_DUAL_VFS -DPROEVALUATOR_SETENV -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/home/aleksey/Qt/Tools/QtCreator/src/cmakeprojectmanager2-build/src -I../qt-creator/src -I../qt-creator/src/libs -I/home/aleksey/Qt/Tools/QtCreator/src/qt-creator/tools -I../qt-creator/src/plugins -I../qt-creator/src/shared -I../qt-creator/src/libs/3rdparty -I. -I../qt-creator/src/plugins/texteditor -I../../../../5.9.3/gcc_64/include -I../../../../5.9.3/gcc_64/include/QtWidgets -I../../../../5.9.3/gcc_64/include/QtGui -I../../../../5.9.3/gcc_64/include/QtConcurrent -I../../../../5.9.3/gcc_64/include/QtNetwork -I../../../../5.9.3/gcc_64/include/QtCore -I.moc/release-shared -isystem /usr/include/libdrm -I../../../../5.9.3/gcc_64/mkspecs/linux-g++ -o .obj/release-shared/cmakebuildsettingswidget.o ../cmakeprojectmanager2/cmakebuildsettingswidget.cpp
../cmakeprojectmanager2/cmakekitinformation.cpp:32:10: fatal error: app/app_version.h: No such file or directory
 #include <app/app_version.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:9679: .obj/release-shared/cmakekitinformation.o] Error 1
make: *** Waiting for unfinished jobs....

Fixed build script

#!/bin/bash

# Clone Qt Creator repo
git clone https://github.com/qtproject/qt-creator.git qt-creator
cd qt-creator
git checkout 4.5

# Build Qt Creator
cd ..
mkdir qt-creator-build
cd qt-creator-build
~/Qt/5.9.3/gcc_64/bin/qmake IDE_PACKAGE_MODE=1 LLVM_INSTALL_DIR=/usr/lib64 CONFIG+=qbs_enable_project_file_updates ../qt-creator/qtcreator.pro
make -j4

# Clone cmakeprojectmanager2
cd ..
git clone https://github.com/h4tr3d/cmakeprojectmanager2.git cmakeprojectmanager2
cd cmakeprojectmanager2
git checkout 4.5

# Build cmakeprojectmanager2
cd ..
mkdir cmakeprojectmanager2-build
cd cmakeprojectmanager2-build
export QTC_SOURCE=~/Qt/Tools/QtCreator/src/qt-creator
export QTC_BUILD=~/Qt/Tools/QtCreator/src/qt-creator-build
export QTC_PREFIX=~/Qt/Tools/QtCreator/src/qt-creator-build
~/Qt/5.9.3/gcc_64/bin/qmake QTC_PREFIX=~/Qt/Tools/QtCreator/src/qt-creator-build \
                LIBS+=-L${QTC_BUILD}/lib/qtcreator \
                LIBS+=-L${QTC_BUILD}/lib/qtcreator/plugins \
                ../cmakeprojectmanager2/cmakeprojectmanager.pro
make -j4
h4tr3d commented 6 years ago

I didn't solve this issue yet. Just use WA, make a link after QtC build:

ln -s `pwd`/qt-creator-build/src/app/app_version.h qt-creator/src/app/

Or add include path via QMAKE_CXXFLAGS/QMAKE_CXXFLAGS_RELEASE passed to the qmake during plugin configuration.

akontsevich commented 6 years ago

> ln -spwd/qt-creator-build/src/app/app_version.h qt-creator/src/app/

ln: failed to create symbolic link 'qt-creator/src/app/app_version.h': File exists

Following works: ln -s ${QTC_BUILD}/src/app/app_version.h ${QTC_SOURCE}/src/app

Correct build script

#!/bin/bash

# Clone Qt Creator repo
git clone https://github.com/qtproject/qt-creator.git qt-creator
cd qt-creator
git checkout 4.5

# Build Qt Creator
cd ..
mkdir qt-creator-build
cd qt-creator-build
~/Qt/5.9.3/gcc_64/bin/qmake IDE_PACKAGE_MODE=1 LLVM_INSTALL_DIR=/usr/lib64 CONFIG+=qbs_enable_project_file_updates ../qt-creator/qtcreator.pro
make -j4

# Clone cmakeprojectmanager2
cd ..
git clone https://github.com/h4tr3d/cmakeprojectmanager2.git cmakeprojectmanager2
cd cmakeprojectmanager2
git checkout 4.5

# Build cmakeprojectmanager2
cd ..
mkdir cmakeprojectmanager2-build
cd cmakeprojectmanager2-build
export QTC_SOURCE=~/Qt/Tools/QtCreator/src/qt-creator
export QTC_BUILD=~/Qt/Tools/QtCreator/src/qt-creator-build
export QTC_PREFIX=~/Qt/Tools/QtCreator/src/qt-creator-build
ln -s ${QTC_BUILD}/src/app/app_version.h ${QTC_SOURCE}/src/app
~/Qt/5.9.3/gcc_64/bin/qmake QTC_PREFIX=~/Qt/Tools/QtCreator/src/qt-creator-build \
                LIBS+=-L${QTC_BUILD}/lib/qtcreator \
                LIBS+=-L${QTC_BUILD}/lib/qtcreator/plugins \
                ../cmakeprojectmanager2/cmakeprojectmanager.pro
make -j4

You may close the ticket now. Thanks!