Home > other >  LimeReport compilation: Error 127. What causes this?
LimeReport compilation: Error 127. What causes this?

Time:11-25

I am trying to compile LimeReport in Windows 10 using Qt 5.5.9 and Qt Creator 4.11.0. I get the following compilation output and the compilation stops.

/usr/bin/sh: I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe: command not found
Makefile.Debug:762: recipe for target 'ts' failed
mingw32-make[2]: *** [ts] Error 127
mingw32-make[2]: *** Waiting for unfinished jobs....
mingw32-make[2]: Leaving directory 'E:/Software/C-CPP Windows GUI Programming/Qt/Plugins   Libs/LimeReport/build-limereport-Desktop_Qt_5_9_9_MinGW_32bit-Debug/limereport'
Makefile:36: recipe for target 'debug' failed
mingw32-make[1]: Leaving directory 'E:/Software/C-CPP Windows GUI Programming/Qt/Plugins   Libs/LimeReport/build-limereport-Desktop_Qt_5_9_9_MinGW_32bit-Debug/limereport'
mingw32-make[1]: *** [debug] Error 2
Makefile:89: recipe for target 'sub-limereport-make_first-ordered' failed
mingw32-make: *** [sub-limereport-make_first-ordered] Error 2
11:20:35: The process "I:\Programs\Qt\Qt5.9.9\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project limereport (kit: Desktop Qt 5.9.9 MinGW 32bit)
When executing step "Make"

lupdate.exe is very much present inside the directory "I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin". The directory is part of PATH variable, and typing "lupdate" in cmd works.

Please tell me what is the problem and if I am doing anything wrong.

Note: I downloaded the source code from the official GitHub page and the source code compiles correctly in Linux. The Qt installation inside my Windows compiles all other programs correctly without any problem.

CodePudding user response:

You are using a version of make that invokes a POSIX shell (/bin/sh), not the Windows cmd.exe shell.

In POSIX, backslashes are always escape characters and directories are separated by forward slashes (/) not backslashes.

Somewhere in your makefile you have set a variable to the path I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe or some part of that: replace the backslashes with forward slashes.

In general, in makefiles you should always use forward slashes as directory separators.

CodePudding user response:

Okay, I used to following workaround to fix this problem:

I could not find any line in make file or pro file that had a mention of I:\Programs\Qt\Qt5.9.9\5.9.9\mingw53_32\bin\lupdate.exe. So, instead inside the limereport/limereport/limereport.pro file, I disabled the ts.commands = $$LUPDATE \"$$PWD\" -noobsolete -ts $$TRANSLATIONS line and qm.commands = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile $$escape_expand(\\n\\t) line and it compiled correctly. I did not want any other-language translations, so I don't care about disabling the above line. This is not a permanent fix but definitely a workaround.

  • Related