0

I am attempting to build Qt on Windows 7 64-bit (but a 32-bit build of Qt) using the VS 2012 C++ compiler following the steps here. (I am also updating the latter Wiki as I go along.)

Unfortunately, I cannot overcome a missing .rcc\debug_shared\qrc_mimetypes.cpp error that appears after some time has passed while nmake is running.

(Note: the int-repository and configure seem to go fairly smoothly (but see quoted comments below), and nmake proceeds for a while successfully building files before it hits the "missing qrc_mimetypes.cpp" error.)

I have attempted twice starting from scratch. A few more details about what I've done, copied from my comment beneath the above-linked Community Wiki:

I cannot get past missing .rcc\debug_shared\qrc_mimetype.cpp. After receiving this same error last night, today I started from scratch by deleting my entire Qt folder and re-downloading Qt, followed by init-repository, and when that completed (reporting a handful of "permission denied" errors) I followed up by opening the Git project in SmartGit, noticed some empty submodules, and did a pull via SmartGit (including submodules), which reported success and populated all submodules. Unfortunately, nmake failed at exactly the same place - the missing qrc_mimetypes.cpp. Any suggestions?

Any suggestions would be highly appreciated. I have also posted a comment with this question on the relevant Qt forum.

Community
  • 1
  • 1
Dan Nissenbaum
  • 13,558
  • 21
  • 105
  • 181
  • This may (or may not) help: http://www.yulebiao.com/questions/15067892/compile-qt-statically – MirroredFate Apr 10 '13 at 18:15
  • Also, having the exact error it spits out would be helpful. – MirroredFate Apr 10 '13 at 18:16
  • @MirroredFate I did see that link, but its steps are general (it gives detailed instructions about how to build Qt as a whole, without referencing the issue of "qrc_mimetypes" specifically, and additionally its suggestions are specific to a static build, rather than a shared build, so following those steps would present two challenges: (1) it could conceivably take hours to follow steps that do not actually apply to the issue of "qrc_mimetypes", and (2) it would be difficult to know which of the steps should be ignored or modified for a shared, as opposed to release, build. – Dan Nissenbaum Apr 10 '13 at 18:27
  • What is the path to Qt? – MirroredFate Apr 11 '13 at 04:22
  • I have determined that the cause of this issue is a bug with Avast! antivirus' sandbox. See answer. (I have also updated the Wiki.) – Dan Nissenbaum Apr 11 '13 at 10:36
  • @DanNissenbaum, you should accept your answer then. – Zac May 03 '13 at 00:39

1 Answers1

0

I have resolved this issue. The problem is due to an Avast! antivirus sandbox bug.

I have appended the linked Wiki to give a warning about the problem (and workaround).

Quoting directly from that Wiki, and also quoting from my comment beneath the Wiki entry:

CRITICAL Please disable any antivirus software AND SANDBOXING during the Qt nmake process (and, to be safe, throughout this entire process). Internally, Qt executes a number of executables that antivirus programs can interfere with (sometimes silently). In particular, if you have any sandboxing software, be SURE to disable sandboxing.

URGENT WARNING FOR AVAST! SANDBOX USERS: Avast Sandbox has a bug in which even when you disable Avast's auto-sandbox, the sandbox will NOT turn off and it will silently sandbox all resource files automatically created by Qt's rcc program during Qt's build process. The Qt build ALWAYS fails for any user who has installed the Avast autosandbox feature, EVEN WITH AUTO-SANDBOXING TURNED OFF. THE ONLY WAY TO OVERCOME THIS ISSUE IS TO COMPLETELY UNINSTALL AVAST! FROM YOUR SYSTEM before building Qt. You can reinstall Avast! after the Qt build is complete.

and my comment

I discovered the problem related to my previous comment. There is a bug with Avast! antivirus's sandbox, such that Avast! must be completely uninstalled from the operating system in order for Qt to build, because the Avast! auto-sandbox feature will not turn off even when it is set to "disabled", but instead enters "silent" sandbox mode; Avast! was taking the output of Qt's rcc command and removing these files (silently, without warning) from the system, causing the Qt build to fail. The only way to turn off Avast! completely is to uninstall it. I have modified the Wiki to discuss this.

(Needless to say, after being an Avast! user for years, in my opinion they have grown topheavy and they're no longer rated in the top ten on PC mag or other places; I've switched to Bitdefender.)

Community
  • 1
  • 1
Dan Nissenbaum
  • 13,558
  • 21
  • 105
  • 181