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

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.

Related

mingw32-make access denied when building wxWidgets

I get an error when I execute mingw32-make in cmd with the makefile.gcc found in the build\msw folder of the wxWidget decompressed zip. I followed the steps shown in this tutorial video.
The error is:
make (e=5): Acceso denegado.
mingw32-make: [makefile.gcc:5354: clean] Error 5 (ignored)
I tried adding "Everyone" with total control to the security tab in the properties option of the folder in which I had decompressed wxWidgets.
I changed the same option for make.exe file in C:\msys64\mingw64\bin
I read that it could be the antivirus, I'm using Windows Defender, I switched off the real time protection but it didn't change anything.
First of all, this is not a fatal error, as indicated by "(ignored)" at the end, so it's not clear what your actual problem is -- does the library get compiled or not?
Second, to debug problems such as this one, you could use the Process Monitor tool where you can find out accessing which file exactly triggers this error -- this could give you at least some idea. Without knowing it, it's really impossible to know what goes wrong on your machine.

Can't generate SDK for Windows with Yocto

I've build a Linux image for freescale imx6qpsabreai board and SDK with toolchain which works well on Linux.
Now I want to support development on Windows and following this post I've
downloaded oe meta-mingw into sources/meta-openembedded/meta-mingw
added SDKMACHINE=x86_64-mingw32 to local.conf in my project
however, I can't build new SDK this way.
~/yocto/fsl-community-bsp/build_fsl_framebuffer$ bitbake fsl-image-machine-test -c populate_sdk
Loading cache: 100% |###############################################################################################################################################################################| Time: 0:00:00
Loaded 2 entries from dependency cache.
ERROR: /home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb: Error executing a python function in <code>: | ETA: --:--:--
The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 13, function: <module>
0009:__anon_35__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_devshell_bbclass(d)
0010:__anon_106__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_sstate_bbclass(d)
0011:__anon_45__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_blacklist_bbclass(d)
0012:__anon_158__home_slavskaya_yocto_fsl_community_bsp_sources_poky_meta_classes_siteinfo_bbclass(d)
*** 0013:__anon_31__home_slavskaya_yocto_fsl_community_bsp_sources_meta_openembedded_meta_mingw_recipes_support_libiconv_libiconv_1_14_bb(d)
File: '/home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb', lineno: 28, function: __anon_31__home_slavskaya_yocto_fsl_community_bsp_sources_meta_openembedded_meta_mingw_recipes_support_libiconv_libiconv_1_14_bb
0024:inherit autotools pkgconfig gettext
0025:
0026:python __anonymous() {
0027: if d.getVar("TARGET_OS") != "linux":
*** 0028: return
0029: if d.getVar("TCLIBC") == "glibc":
0030: raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
0031:}
0032:
Exception: TypeError: getVar() missing 1 required positional argument: 'expand'
ERROR: Failed to parse recipe: /home/slavskaya/yocto/fsl-community-bsp/sources/meta-openembedded/meta-mingw/recipes-support/libiconv/libiconv_1.14.bb
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Also, I am not an experienced C/C++ programmer, but from my point of view mingw doesn't contain compiler for arm architecture, so maybe I just can't get arm toolchain to use on Windows?
meta-mingw builds a cross compile from Linux to Windows (mingw). It then uses this cross compiler to construct a standard toolchain from (mingw) to the target SDK environment. You are using the correct layer, but have a different problem.
It appears that you are using a layer (meta-mingw) that is expecting the newer bitbake semantics:
0027: if d.getVar("TARGET_OS") != "linux":
*** 0028: return
Exception: TypeError: getVar() missing 1 required positional argument: 'expand'
Bitbake used to require two arguments to 'd.getVar', and now only requires one (the second is optional).
I would suggest that you identify which version of oe-core/poky you are using and get a matching version of meta-mingw. (It may be as simple as checking out the correct branch.)

Error when compiling Qt project. The process "/usr/bin/make" exited with code 2

I'm brand new to Qt and I tried to build a new project. I searched around and people seem to have similar problems but none of the solutions worked for me. I made New Project > Application > Qt widgets Application > created "Tester" file in /Volumes/MATT'S EHD/Qt > Kit: Desktop Qt 5.8.0 clang 64bit
I build it and this is my output:
sh: line 0: cd: /Volumes/MATTS\ EHD/Qt/build-Tester-Desktop_Qt_5_8_0_clang_64bit-Debug && /Volumes/MATT\S EHD/Qt/5.8/clang_64/bin/uic:
No such file or directory
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [main.o] Error 2
11:43:23: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Tester (kit: Desktop Qt 5.8.0 clang 64bit)
When executing step "Make"
There's some other output but these are what's outputting in red and I'm assuming what's giving me issues. I haven't changed the file at all. I'm just trying to build it to see if it works and it doesn't. I'm running on OSX and everything is stored on my external hard drive. Any help is appreciated.
Since the error message complains about a missing matching (in that case closing) single quote, I strongly suspect your “MATT'S EHD” directory is a problem. That’s not too surprising because build systems in the C and C++ world are notoriously crappy when it comes to handling paths with spaces and/or quote characters.
Try a spaceless and quoteless path, not only for your project but also for your complete toolchain, especially the Qt installation. If you can’t or dont want to move your toolchain you can also try to backslash escape all special characters in Qt Creator’s “Build & Run” options. Should work theoretically, but I’ve never tried it in practice.

ui_xprotolabinterface.h: No such file or directory

I'm trying to build the Xscope interface for the Gabotronics xprotolab digital oscilloscope chip. I found the latest user interface tool on github and I cloned it. I followed these instructions to build the GUI on my Linux machine which is running Ubuntu 14.04.
Everything was going well until I typed make and I got the following error -
fatal error: ui_xprotolabinterface.h: No such file or directory
#include "ui_xprotolabinterface.h"
So I began to search for ui_xprotolabinterface.h and I couldn't find it anywhere! I removed the #include "ui_xprotolabinterface.h" line from the xprotolabinterface.cpp file (where these errors were originating from) and I get even more errors without it.
I checked the github source to see if there was an updated version of the code, but this is the most updated version...
Any solutions to this problem?

Cross compile ActiveMQ for ARM

Disclaimer: I am new here, I've done my best to follow the posting guidelines so please let me know if this needs any extra information. I am also relatively new to Linux development.
Background:
I am in the process of building a library using ActiveMQ-cpp on Linux. I have built and run it successfully on the host Ubuntu PC, but attempting to cross-compile it for the target ARM-based machine is producing some very abstruse errors.
The first step involves building APR (http://apr.apache.org/) using the arm-linux-gcc compiler. After some research, the following command runs the configuration script with little fuss:
CC=/usr/local/arm-linux/bin/arm-linux-gcc ./configure --prefix=/root/apr-arm --host=arm-linux cross_compiling=yes ac_cv_file__dev_zero=no ac_cv_func_setpgrp_void=no apr_cv_tcp_nodelay_with_cork=no apr_cv_process_shared_works=no
This allows the next step - running the makefile.
Current Issue: Entering make on the command line exits prematurely at the following line:
[...]
/root/.local/share/Trash/files/apr-1.5.1/build/mkdir.sh include/private
tools/gen_test_char > include/private/apr)escape_test_char.h
/bin/bash: tools/gen_test_char: cannot execute binary file
make[1]: *** [include/private/apr_escape_test_char.h] Error 126
make[1]: Leaving directory `/root/.local/share/Trash/files/apr-1.5.1'
make: *** [all-recursive] Error 1
Attempted Fixes: A solution to the following question, posted by the asker, has not worked. It is possible that I've not followed the process correctly (Apache Cross Compilation Error ./gen_test_char: cannot execute binary file)
In the same theme, I tried temporarily removing the problem gen_test_char program from its directory but the clever script just rebuilds it.
My aim is to either avoid this error and continue the build process on Ubuntu, or perhaps consider other means of building the library. I have built it with no trouble in VS2013 on Windows, so if it is possible to cross compile that project for ARM architectures I would happily go ahead with that.
APR need gen_test_char to be compiled for system not for arm, why you got "bin/bash: tools/gen_test_char: cannot execute binary file" error because make program is going to execute gen_test_char on your system and if you cross compile then every time you got this error.
To avoid this error please follow below steps:
1) Cross compile APR which is going to fail
2) compile APR for system and copy gen_test_char to cross compiled APR's directory.
3) Again cross compile
After performing above steps you should not get "cannot execute binary file" error.
Cross compile APR which is going to fail
compile APR for system and copy gen_test_char to cross compiled APR's directory.
change the name of gen_test_char to gen_test_char_host
in Makefile file change the name of gen_test_char to gen_test_char_host because make creates it again.
Again cross compile
you may see some struct redefinition which needs to find the file and comment the redefined struct manually.