Bug 453870 - Qt indexer doesn't start
Summary: Qt indexer doesn't start
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 8.5   Edit
Hardware: PC Linux
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-02 07:29 EST by Devel Chip CLA
Modified: 2020-09-04 15:17 EDT (History)
4 users (show)

See Also:


Attachments
List of installed msys2 packages & versions (6.79 KB, text/plain)
2015-03-24 03:54 EDT, Hufschmidt Thomas CLA
no flags Details
Video File (Better Quality) (1.28 MB, application/octet-stream)
2015-03-24 04:01 EDT, Hufschmidt Thomas CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Devel Chip CLA 2014-12-02 07:29:33 EST
C/C++ Qt Support shows up as 'installed' in 'Installation Details' and in 'Install New Software...'.
But qt related functions are missing: no qt indexing, no project templates.

I've got eclipse-cpp-luna-SR1-linux-gtk-x86_64 on Ubuntu 12.04 with jdk-7u71-linux-x64 (from oracle).
eclipse is just a decompressed tarball in the home directory.
Plugin is installed through 'Install New Software...' from http://download.eclipse.org/releases/luna

$ find | grep qt
./plugins/org.eclipse.cdt.qt.ui_1.1.0.201409172108.jar
./plugins/org.eclipse.cdt.qt.core_1.1.0.201409172108.jar
./features/org.eclipse.cdt.qt_8.5.0.201409172108
./features/org.eclipse.cdt.qt_8.5.0.201409172108/epl-v10.html
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF/MANIFEST.MF
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF/ECLIPSE_.SF
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF/maven
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF/maven/org.eclipse.cdt.features
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF/maven/org.eclipse.cdt.features/org.eclipse.cdt.qt
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF/maven/org.eclipse.cdt.features/org.eclipse.cdt.qt/pom.properties
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF/maven/org.eclipse.cdt.features/org.eclipse.cdt.qt/pom.xml
./features/org.eclipse.cdt.qt_8.5.0.201409172108/META-INF/ECLIPSE_.RSA
./features/org.eclipse.cdt.qt_8.5.0.201409172108/feature.xml
./features/org.eclipse.cdt.qt_8.5.0.201409172108/license.html
./features/org.eclipse.cdt.qt_8.5.0.201409172108/feature.properties


osgi> ss org.eclipse.cdt.qt.ui
"Framework is launched."


id	State       Bundle
84	STARTING    org.eclipse.cdt.qt.ui_1.1.0.201409172108
osgi> ss org.eclipse.cdt.qt.core
"Framework is launched."


id	State       Bundle
83	ACTIVE      org.eclipse.cdt.qt.core_1.1.0.201409172108
Comment 1 Devel Chip CLA 2014-12-16 06:36:55 EST
Ok, project templates are actually here.

Created Qt HelloWorld project from a template:
- eclipse endlessly spawns a background job named "Serialize CDT language settings entries (Finished)".
- simple C++ indexing is fine, but Qt one is not.
Comment 2 Devel Chip CLA 2014-12-16 07:42:52 EST
- build works, but the result binary can be run only through an external terminal. The "Run as" is confused by the "Serialize CDT language settings entries (Finished)" operations and thinks that it is waiting for "Building workspace".
- binary directory in "Project Explorer" and "C/C++ Projects" views is blinking the same way as "Serialize CDT language settings entries (Finished)" background operations.
Comment 3 Hufschmidt Thomas CLA 2015-03-24 03:27:47 EDT
I can confirm this issue. This both happens in the current "Eclipse IDE for C/C++ Developers" Luna release as well as the Mars M5 dev release with included CDT as well as with (latest) CDT nightly build.

I'm having the same issues Devel Chip described in comment #2.
Some additional information:
 * "Building workspace" stays in sleep mode, because it gets blocked by the "Serialize CDT language settings entries" loop
 * As far as I can tell it looks like the project explorer is displaying the binaries folder for a split second and then it vanishes again, causing the "flicker" effect. (I'll try to attach a video)
 * Disabling "CDT Managed Build Setting Entries [Shared]" under Porject -> C/C++ General Preprocessor Include Paths, Macros, etc. -> Providers stops this loop.  
  So this problem seems to have something to do with component
 * Disabling the above component fixes all issues (Blinking Project Explorer, "Serialize CDT language settings entries" loop and unindexed qt includes)


System information:
Windows 7 64 Bit
Java 1.8._031 64 Bit
Eclipse Luna and Eclipse Mars Milestone 5 (clean install + fresh workspace)
CDT 8.6.0 and CDT 

Using msys2 with mingw64 (64 Bit gcc 4.9.2), Qt5
Additional libraries: <See attachment> (pacman -Q)
msys and mingw are in path and in addition MINGW_HOME and MSYS_HOME (and JAVA_HOME) are set correctly (that means $(...)\bin contains the executables)
Comment 4 Hufschmidt Thomas CLA 2015-03-24 03:54:16 EDT
Created attachment 251851 [details]
List of installed msys2 packages & versions

Video-Link: http://de.tinypic.com/r/sdd7aq/8

PS: I should also point out that the Project Explorer flickering only happens once a binary file has been build.
I think the above mentioned Provider seems to be (related to) the cause, the flickering seems to be just a side-effect of this.
Comment 5 Hufschmidt Thomas CLA 2015-03-24 04:01:17 EDT
Created attachment 251852 [details]
Video File (Better Quality)
Comment 6 Devel Chip CLA 2015-06-11 11:09:22 EDT
When during the project creation a prompt about the path to qmake for Qt5 appeared, I left a default value 'qmake'.

But it is not correct:

$ qmake --version
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu


qmake for Qt5 on my system is:

$ /usr/lib/x86_64-linux-gnu/qt5/bin/qmake --version
QMake version 3.0
Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu


If I specify /usr/lib/x86_64-linux-gnu/qt5/bin/qmake in the project wizard or in the Project Properties -> Environment -> QMAKE, then blinking doesn't occur.

Can you check it?

If it is the cause, we will close this bug as invalid.
Comment 7 Hufschmidt Thomas CLA 2015-06-12 02:35:13 EDT
I tried your suggestion, but still the same "flicker" issue.

A few points of note:

Since I'm on Windows and "manually" installed only one version of Qt, naturally I get:
> qmake --version 
> 3.0

I also added the full path (C:\Development\MSys\mingw64\bin\qmake) into my Qt-Project:
Issue persists, so no difference here.


Sidenote: 
I'm using Eclipse/Qt on Windows.
I'll try to reproduce the problem on linux (Kubuntu 15).
Comment 8 Hufschmidt Thomas CLA 2015-06-12 04:09:17 EDT
Exact same issue (Flickering, no qt-indexer) on Kubuntu 15.04 using Qt 5.4.1, Eclipse 4.4.2 and CDT 8.6.0.


Side-note:
On Ubuntu (and probably most debian-based systems) install qt5-default (which removes qt4-default) to make Qt5 the default.
> apt-get install qt5-default

This does not remove qt4 (or 5), but replaces /usr/bin/qmake with the corresponding version. 
(It works a bit differently, but in a nutshell this is correct)
Comment 9 Hufschmidt Thomas CLA 2015-06-12 04:11:42 EDT
Just for reference:
> qmake --version
> QMake version 3.0
> Using Qt version 5.4.1 in /usr/lib/x86_64-linux-gnu
Comment 10 Hufschmidt Thomas CLA 2015-07-06 05:36:10 EDT
Updated to Eclipse MARS (CDT 8.7), this issue is still present.
Comment 11 Dominik abc CLA 2015-07-23 08:14:25 EDT
You could try deactivating 'CDT Managed Build Setting Entry' under 'Project Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Providers.
I really have no idea about the side effects of doing this, but as I mentioned in bug 473310, this helped me indexing and building the Qt5 Hello World Template.
Comment 12 Hufschmidt Thomas CLA 2015-07-23 08:56:14 EDT
Yes, that is the same workaround I posted above. Disabling the "CDT-Mamanged Build Settings" should be fine, because when using Qt the makefile is managed by Qt and not Eclipse.

A bit more details:
When creating a new "Makefile project" -> "Qt5 Hello World Project" Eclipse will create:
* A qt makefile (*.pro) listing your sources and other qt-stuff (libraries, etc)
* A 'static' make makefile that: 
a) Invokes qmake on the qt makefile, generating the "actual" makefiles
b) Invokes make on the "actual" makefiles generated by qmake, thus building the project.
When building your project the later makefile will be proccessed.

This means, the only file that would need to be managed by Eclipse is the qt makefile, eg. adding new sources.
But I'm pretty sure managing this file is out of the scope of Eclipse, since this would be rather specific to Qt.

On the other hand, when creating a new executable, shared- or static library Eclipse can generate the make makefile from given sources and other settings.