Opened 14 years ago

Closed 13 years ago

#214 closed defect (fixed)

make process hangs when compiling .rc file

Reported by: rudi Owned by:
Priority: major Milestone: Qt 4.7
Component: qmake Version: 4.6.3
Severity: low Keywords:
Cc:

Description

When an RC_FILE is specified in the project, QMAKE creates a call to compile resources. It looks like this:

set INCLUDE=%INCLUDE%;$(INCLUDEPATH) & $(RC) -n -r $(RC_FILE) $(RES_FILE)

In some cases %INCLUDE% gets too long for CMD.EXE (or RC.EXE ?) so that the build process will hang. Why do we need %INCLUDE% here at all ? In Windows this is not done either. When using the MinGW tool chain, only "." is specified to the "windres" tool and when using MSVC, they pass %DEFINES% and leave %INCLUDE% untouched.

Attachments (1)

mkspecs.diff (509 bytes ) - added by rudi 13 years ago.
Force %INCLUDE% to be propagated to the eonvironment

Download all attachments as: .zip

Change History (7)

comment:1 by Dmitry A. Kuminov, 14 years ago

Milestone: Qt EnhancedQt 4.7

comment:2 by Dmitry A. Kuminov, 13 years ago

Resolution: fixed
Status: newclosed

Although removing %INCLUDE% is not a solution since $(INCLUDEPATH) itself can be long too (resulting into the same failure or hang of RC.EXE), there is indeed no need to pass it to RC: for a qmake project, all include directories that an .rc file may need should be specified in the .pro file using the qmake INCLUDEPATH variable, not in the OS environment directly.

Regarding the proper fix for the problem, I did it in r880 by utilizing the handy Target-specific Variable feature of GNU make which fitted just perfectly here. It seems to work for very long include path lists, tried one much longer than 1024 chars.

comment:3 by rudi, 13 years ago

There is a small problem with the implementation. In case %INCLUDE% is not defined at all on the user's system, make does not propagate the variable into the environment. Find a fix attached. Make sure to apply change to mkspecs/default as well in case you don't reconfigure.

by rudi, 13 years ago

Attachment: mkspecs.diff added

Force %INCLUDE% to be propagated to the eonvironment

comment:4 by rudi, 13 years ago

Resolution: fixed
Status: closedreopened

comment:5 by Dmitry A. Kuminov, 13 years ago

Yep, indeed. Interesting finding. Committed in r895. Thanks.

comment:6 by Dmitry A. Kuminov, 13 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.