What does (set PATH=...;%PATH:)=^)%) mean in a Windows shell script, and how can I overcome failure of this line in the context of a Qt5 nmake build? - qt

In the context of an obstacle-ridden process of attempting to build Qt5 (32-bit) with VS 2012, I have run into yet another build error.
It is:
(set PATH=C:\Users\daniel347x\Desktop\Backup\__Dan_Root\qt5\qtbase\lib;%PATH:)=^)%) &
C:\Users\daniel347x\Desktop\Backup__Dan_Root\qt5\qtbase\bin\uic.exe
dialogs\qfiledialog.ui -o ui_qfiledialog.h
NMAKE : fatal error U1077:
'(set' : return code '0xc0000135'
Stop.
I cannot find anything relevant about the (set PATH=...;%PATH:)=^)%) failure issue (returning error code 0xc0000135) when I perform a detailed Google/StackOverflow search.
Note that nmake proceeds for a long time (more than 1 hour) happily switching directories, running intermediate .exe's, and both compiling and linking code files.
I am running nmake (as well as having run configure) in the 32-bit Visual Studio 2012 Tools command prompt; and as far as I know, all of my path variables are properly set (they include the paths to 32-bit Perl and to 32-bit Python, although I don't think that is relevant here).
I have restarted my computer, and I ran the VS 2012 Tools Command Prompt with Administrator privileges (in case it is a permissions error), attempting to run nmake, and the same error occurs.
I then attempted to try to figure out what the error actually is. At that point, I became stumped by the syntax of this command-line statement that is apparently being executed within a Makefile-triggered shell script:
(set PATH=...;%PATH:)=^)%)
^^^^^^ // What do the symbols :)=^)% mean?
I do not understand the symbols :)=^)% in the context of this script.
Can somebody tell me what these symbols mean in the context of a Windows shell script (that is being executed in the context of an nmake Makefile (building 32-bit Qt5 with VS 2012))?
As an added optional question, what can I do to overcome this error and continue to build Qt5 without this error blocking progress?

The (set PATH=...;%PATH:)=^)%) is a string substitution. Look up 'environment variable substitution' in the help set command output for more information.
The script prepends the PATH variable, but during the substitution it escapes the right parens so the whole line is correctly formatted. For example, the %PATH% might contain a substring "Program Files (x86)" that will break the set syntax upon expansion. The ^ symbol before the paren is just a batch escaping symbol.
Second, the (...) & ... is a grouping operator that allows multiple commands to be written on the same line. Why the script author decided to place those two commands on the same line is unknown to me, but it has definitely helped to obscure the error.
Third, though NMAKE reports an error for the '(set' command, quick checking proved that the return code (%ERRORLEVEL%) is set by the last command of the group, so there is no use of googling the 0xc0000135 error for the SET and NMAKE commands.
The actual source of the error is the 'uic.exe', that is located in:
C:\Users\daniel347x\Desktop\Backup__Dan_Root\qt5\qtbase\bin\uic.exe
Regarding the error, 0xc0000135 - this is The application failed to initialize properly error. My guess is either that the 'uic.exe' was built with the incompatible toolchain/SDK, or requires some missing dlls.
P.S. An alternative solution: the similar problem has been solved by using jom instead of nmake.

I had the same problem. I decided to add it to the PATH path to the libraries icu.

I had the same issue compiling Qt5.3 in Win8. The solution is to make sure you include the ICU and openSSL 32-bin binaries location in the PATH variable. If you don't uic.exe doesn't work properly

I had the same problem, in my case I used a bad compiled ICU ( compiled with VS2012 ) trying to use icu with VS2008, I solve it compiling ICU with VS2008 and using these compiled version of ICU on my VS2008 project.

Related

GNAT Recompiling Libray files / how to force recompile all

I have an error where I get that file X (in the standard library) needs recompiling as another file has changed. It had changed, as I accidentally changed it but corrected the change (confirmed with md5sum check). However the timestamp has changed, so now other items won't compile due to this. Short of reinstalling (which surely isn't necessary, but is possible) what's the solution to this?
I've tried adding the -f option to gprbuild when building to force recompiling and I get the same result.
Exact error:
error: "a-direct.adb" must be recompiled ("a-calfor.ads" has been modified)
error: "a-calfor.adb" must be recompiled ("a-calfor.ads" has been modified)
error: "g-calend.adb" must be recompiled ("a-calfor.ads" has been modified)
...
When invoked on a user project, gprbuild knows about compiling that project (and its dependencies), not the runtime.
AdaCore’s customers are provided, I think, with support to recompile the runtime, and there are GPRs and a daunting Makefile in the GCC sources.
gnatmake has a switch -a which forces any necessary recompilation of runtime sources into your object directory. I don’t think gprbuild supports it, and in any case you’d need to invoke it for all your projects.
If I were you I would just go ahead and reinstall.
Ok, this is probably not the intention of the warnings, but I just needed to get going. So I added (as per the help for gnatbind) -- adding the -t option for the binder with the following in gprbuild.
gprbuild -<options> -P <project_file>.gpr -bargs -t
which changed the error into a warning and produced my executable.
Obviously not the "right" way to solve the error, but that part wasn't critical, and I needed to get on.

TypeScript compiler failing on a mac

Typescript compilation task works fine on linux machines but on a mac fails with the following not particularly useful error message and what looks like a binary dump.
$ grunt
Running "ts:build" (ts) task
Compiling...
Fast compile will not work when --out is specified. Ignoring fast compilation
Using tsc v1.4.1
������������=��AF���=����
>> Error: tsc return code: 3
Warning: Task "ts:build" failed. Use --force to continue.
Aborted due to warnings.
Im using nvm with node v0.11.4 and rvm with ruby v2.2.0.
Any ideas how to fix this, or even debug?
As the question includes debugging, here are some pointers which might help determine where the problem is.
Try compiling from the command line with tsc alone (no grunt), in case the problem is with grunt or the ts:build task (looks like grunt-ts).
Maybe one of your source files is causing the tools to crash (perhaps they can't cope with a file's encoding?). If a single, simple file will compile, then try removing subsets of your source from the build. If some of those files are causing the crash (whether valid TypeScript or not) you may be able to find a temporary workaround.
Try compiling with different versions of tsc. If you need 1.4.1 features you could try using the latest from https://github.com/Microsoft/TypeScript (see here for how to do this with grunt-ts).
The problem was with a malfunctioning node installation. I upgraded to node 0.12 which fixed the problem.
Just to check the problem wasn't node 0.11.4 specific I removed all previous versions of node and reinstalled 0.11.4 and the error no longer occurs.
I took these steps after removing all node modules, clearing the cache and reinstalling with no luck. I also tried using multiple typescript compiler versions.

How do I initialize LLVM's external symbolizer?

When compiling with -fsanitize=memory I get WARNING: Trying to symbolize code, but external symbolizer is not initialized! when running the program. How do I initialize the external symbolizer?
I solved my own problem using MSAN_SYMBOLIZER_PATH=$(which llvm-symbolizer-3.4) ./a.out. The problem is that Ubuntu postfixes the version number but the binary doesn't know that. Of course you need to use MSAN instead of ASAN when using the memory sanitizer.
You are supposed to be able to set the ASAN_FILTER environment variable to point at a symbolizer, but I could not get it to work. However, you can redirect stderr into a symbolizer after the fact. You'll still get the warnings about the uninitialized symbolizer, but the filenames and line numbers will be correct.
You can use asan_symbolizer.py as the external symbolizer. After downloading it from that link (to /tmp, for example), invoke your program like so (in bash, for this example):
./myprogram 2>&1 | /tmp/asan_symbolize.py | c++filt
On my Ubuntu system, the issue is that LLVM's tools are installed under /usr/bin with version suffixes (like llvm-symbolizer-4.0), and the sanitizer tools are looking for them without version suffixes.
LLVM also installs its binaries to, e.g., /usr/lib/llvm-4.0/bin; the tools under /usr/bin are actually just symlinks. So an easy solution is to add the appropriate /usr/lib/llvm-*/bin directory to your path when working with sanitizers.
I received such warning when I run program debug version (compiled with -fsanitize=address) on Linux machine that didn't contain clang installation. The problem disappeared after I installed clang from devtoolset.

Sqlite 3.7.15 Crosss compilation for ARM

I am using SQLite 3 for Database management in my ARM9 based microprocessor.
I want to cross compile the latest version of the SQLite 3 for my project in Linux (Ubuntu 10.04). I am using the arm-none-linux-gnueabi-gcc compiler for development.
I tried to cross compile using following commands,
Downloaded the sqlite-amalgamation-3.7.0.tar
I extract it and then write the following command on Terminal,
sudo ./configure --exec-prefix=/media/8CCC8E9BCC8E7F68/SQLIte3/sqliteinstall/ --host=arm --target=arm CC=/opt/arm-2011.03/bin/arm-none-linux-gnueabi-gcc AR=/opt/arm-2011.03/bin/arm-none-linux-gnueabi-ar STRIP=/opt/arm-2011.03/bin/arm-none-linux-gnueabi-strip RANLIB=/opt/arm-2011.03/bin/arm-none-linux-gnueabi-ranlib CFLAGS="-Os"
It successfully cross compiled the SQLite.
Then,
sudo make command.
It successfully run.
Now "make install " command.
It did not give me an error but when i went to the config.log file i found there is some sentences as following,
1.conftest.c:17:7: error: size of array 'off_t_is_large' is negative
2.conftest.c:12:28: fatal error: ac_nonexistent.h: No such file or directory
compilation terminated.
3.conftest.cpp:23:28: error: ac_nonexistent.h: No such file or directory
4.conftest.c:67:13: error: invalid type argument of unary '*' (have 'int')
I doubt that weather it has been cross compiled properly or not.
I can not understand.
I inserted the library on my board it works fine but the problem is that the speed got very slow. I think there is some problem that i have not set any flags for the GCC compiler.
I could not find any options.How I can set the particular flags for the GCC compiler so that unnecessary features can be omitted.
You probably shouldn't try to do cross-compilation manually. Instead, use an embedded Linux build system that will do that for you, and automate the cross-compilation process entirely. My favourite is of course Buildroot (http://buildroot.org), but there are plenty of others (with varying levels of quality, complexity and features) : OpenEmbedded, Yocto, PTXdist, etc.

Debugging in Codelite (Ubuntu 12.04)

I installed codelite (v4.1.5770) in Ubuntu 12.04.
I find that it cannot build correctly, when the program has errors. It reports them in the process of building, but finally when is finished building, it outputs the message that there is no error.
I've not faced such situation in windows. I changed the building setting but it was useless.
So who can tell me what should I do? Thank you.
codelite uses regular expressions to parse the output produced by the compiler.
It is likely (and this is probably the case) that the error format that the compiler produced simply was not recognized by codelite.
If you could post some of the error messages you got which were not detected as errors / warnings by codelite, I could help you compile a proper regular expressions and instruct you where to place them inside codelite
Eran

Resources