:-1: error: Automatic patching failed at C:\QtSDK\Symbian\SDKs\Symbian1Qt473\bin\createpackage.pl line 357

StackOverflow https://stackoverflow.com/questions/18810529

  •  28-06-2022
  •  | 
  •  

سؤال

I've installed Qt SDK 1.2.1, and when I'm building one of the example applications - Haptics Player, for Symbian S60, using Qt 4.7.3.

The example compiles successfully, but it fails on the Deploy step. This is the compiler output:

ERROR: Automatic patching failed at C:\QtSDK\Symbian\SDKs\Symbian1Qt473\bin\createpackage.pl line 357.
make[1]: *** [ok_sis] Error 2
C:\QtSDK\Symbian\SDKs\Symbian1Qt473\epoc32\tools\make.exe: *** [sis] Error 2
01:38:16: The process "C:\QtSDK\Symbian\SDKs\Symbian1Qt473\epoc32\tools\make.exe" exited with code 2.
Error while building project hapticsplayer (target: Symbian Device)
When executing build step 'Create SIS Package'

However, a newly created, empty project runs on my phone successfully, i.e. this error happens in the Example project that ships with Qt SDK, but not for a newly created project.

How do I fix this error?

هل كانت مفيدة؟

المحلول

Upon closer inspection of the compiler output, I noticed this:

Patching: Executable with capabilities incompatible with self-signing detected: "hapticsplayer_patched_caps.exe". (Incompatible capabilities: "ReadDeviceData", "WriteDeviceData".) Reducing capabilities is only supported for libraries.

Patching: Unable to patch the package for self-singing.
Use a proper developer certificate for signing this package.

Apparently, the capabilities WriteDeviceData and ReadDeviceData can't be used for self-signed packages, and require a proper developer's certificate (which is not free, and I don't have it).

Removing those lines from the .pro file fixed the problem, and Haptics Player now compiles:

symbian: {
    TARGET.CAPABILITY = WriteDeviceData ReadDeviceData
}

It seems it does not really need those capabilities, I have no idea why they were added. Probably an oversight.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top