This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 185806 - windows path from qmake not converted into unix as required by mingw sh.exe
Summary: windows path from qmake not converted into unix as required by mingw sh.exe
Status: VERIFIED INVALID
Alias: None
Product: cnd
Classification: Unclassified
Component: Toolchain (show other bugs)
Version: 6.x
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Alexey Vladykin
URL:
Keywords:
Depends on: 191690
Blocks:
  Show dependency tree
 
Reported: 2010-05-09 19:25 UTC by simpatico
Modified: 2011-12-16 20:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample project (3.78 KB, application/octet-stream)
2010-05-12 14:47 UTC, Alexey Vladykin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description simpatico 2010-05-09 19:25:48 UTC
http://lists.trolltech.com/pipermail/qt-interest/2010-May/022965.html

I've exactly followed the instructions (except for versions, I used the latest available). 

http://netbeans.org/kb/docs/cnd/qt-applications.html

NetBeans IDE (including C/C++ support)  	Version 6.7 or 6.8

--------------- 6.9 development edition


Java Development Kit (JDK) 	Version 6 or version 5
------------ 6.20

GNU C/C++ compilers (GCC) 	Versions supported by NetBeans IDE.
------------------- gcc 4.5 . less than gcc 4.4 will not be accepted by qt framework 4.6.2 nor 4.7. Don't know about 4.6.1 since not on qt website.

On Windows, MinGW is required. There are issues with qmake-generated Makefile under Cygwin.
Qt Libraries 	Version 4.4, 4.5, or 4.6.1

---- I installed only qt libraries, not the whole sdk.

---installed msys and configured it.
Comment 1 Alexey Vladykin 2010-05-09 20:38:17 UTC
If you followed the tutorial, then you have a managed C/C++ Qt Application project, right?
For managed projects NetBeans performs the backslash-to-forward slash conversion.
"nbproject/Makefile-${CND_CONF}.mk" should contain the following two lines in the "nbproject/qt-${CND_CONF}.mk" rule:
	@sed -e 's:\\\(.\):/\1:g' nbproject/qt-${CND_CONF}.mk >nbproject/qt-${CND_CONF}.tmp
	@mv -f nbproject/qt-${CND_CONF}.tmp nbproject/qt-${CND_CONF}.mk

Are these lines present in the makefile? Is sed working?
Comment 2 soldatov 2010-05-09 21:22:56 UTC
confirmed
Comment 3 simpatico 2010-05-09 21:31:58 UTC
    If you followed the tutorial, then you have a managed C/C++ Qt Application
    project, right?


where is 'managed ' ... mentioned in the tutorial?  What I've done is create the new project sample hello qt world and tried to run it.
 

    For managed projects NetBeans performs the backslash-to-forward slash
    conversion.
    "nbproject/Makefile-${CND_CONF}.mk" should contain the following two lines in
    the "nbproject/qt-${CND_CONF}.mk" rule:
       @sed -e 's:\\\(.\):/\1:g' nbproject/qt-${CND_CONF}.mk
    >nbproject/qt-${CND_CONF}.tmp
       @mv -f nbproject/qt-${CND_CONF}.tmp nbproject/qt-${CND_CONF}.mk


    Are these lines present in the makefile? Is sed working?


yes:

    @sed -e 's:\\\(.\):/\1:g' nbproject/qt-${CND_CONF}.mk >nbproject/qt-${CND_CONF}.tmp
    @mv -f nbproject/qt-${CND_CONF}.tmp nbproject/qt-${CND_CONF}.mk

I don't know how to know if sed is working.

I've attached the project, although it should be reproducable.

PS: why is it that when I reply a new comment is not aggregated?
Comment 4 Alexey Vladykin 2010-05-11 06:32:57 UTC
I'm installing GCC 4.4 and Qt 4.7 beta 1 to try to reproduce this.
Comment 5 Alexey Vladykin 2010-05-11 07:08:33 UTC
OK, I've managed to reproduce this on Windows XP with Qt 4.7 beta 1.
This is Qt problem. qmake generates invalid makefile, without any path separator at all between "bin" and tool name ("uic", "idc", "moc").

E.g. I see the following buggy lines in the makefile produced by qmake:

> IDC           = c:/util/qt-4.7b1/binidc.exe
> ...
> ui_HelloForm.h: HelloForm.ui
>         c:/util/qt-4.7b1/binuic.exe HelloForm.ui -o ui_HelloForm.h

This is without NetBeans at all, pure command line.

Please file a bug against Qt.
Comment 6 Alexey Vladykin 2010-05-11 07:28:30 UTC
To clarify: I saw this problem when running qmake from both MSYS shell and cmd.
Comment 7 Alexey Vladykin 2010-05-11 16:01:57 UTC
Yet another clarification: the bug is triggered by "CONFIG-=debug_and_release". Without this qmake generates Makefile.Release and Makefile.Debug, both with correct paths.
Comment 9 Alexey Vladykin 2010-05-12 14:47:20 UTC
Created attachment 98866 [details]
Sample project

Thank you for filing that bug.

Here is a sample project you can give to Qt developers. In includes Makefile generated from qttest.pro on Windows XP by qmake/Qt 4.7 beta 1.
Comment 10 soldatov 2010-11-06 10:04:23 UTC
Workaround: in D:/Qt/2010.05/qt/mkspecs/default/qmake.conf file replace 

QMAKE_MOC      = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
QMAKE_UIC      = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
QMAKE_IDC      = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe

on

QMAKE_MOC      = $$[QT_INSTALL_BINS]/moc.exe
QMAKE_UIC      = $$[QT_INSTALL_BINS]/uic.exe
QMAKE_IDC      = $$[QT_INSTALL_BINS]/idc.exe
Comment 11 Vladimir Voskresensky 2010-11-07 08:50:54 UTC
*** Bug 191690 has been marked as a duplicate of this bug. ***
Comment 12 soldatov 2011-12-16 20:32:47 UTC
I updated my Qt to 4.8 and build works nicely.