Closed akontsevich closed 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
Hi, master branch oriented to QtC master branch respectively. Try b7ba1d41cd5d868699636191878daabef67fe796 or more early 0e301b8a1c6becc0c0f67b2df4eb40e7913a521b to build with QtC 4.5.
@h4tr3d, both do not work. I was definitely able to build it 27 days ago talking to You in #17.
@akontsevich, oook. Wait a little bit ;-)
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 :-)
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
#!/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
What the problem could be?!
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.
Sorry, my bad, added this for qt-creator, missed for cmakeprojectmanager2. Now have less errors.
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....
#!/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
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.
> ln -s
pwd/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
#!/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!
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?