[Solved] Build error: Bad exit status from /var/tmp/rpm-tmp.ygML36 (%build)

Hi all,

I have a fresh install of the development tools on a Windows PC. I cloned a working repository the the PC and tried to build it but it fails do to the above error. A standard sample builds as expected.

The cloned app was coded on a Mac three years ago. I was not able to find any differences in the pro- or yamil-file compared to the standard example. Also the project settings seem to be identical. Cleaning the build as suggested here did not help.

Any idea what the issue could be? Do I need to change something due to the switch from Mac to Win?

Here is the error log:

Nothing to do.
Building target platforms: i486-meego-linux-gnu
Building for target i486-meego-linux-gnu
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.LCZG51

  • umask 022
  • cd ‘C:/Users/FlorianRauter/Prog/brk app/build-harbour-brkaubing-SailfishOS_4_4_0_58_i486_in_Sailfish_SDK_Build_Engine-Debug’
  • LANG=C
  • export LANG
  • unset DISPLAY
  • CFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -m32 -msse -msse2 -march=i686 -mfpmath=sse -mtune=generic -fno-omit-frame-pointer -fasynchronous-unwind-tables’
  • export CFLAGS
  • CXXFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -m32 -msse -msse2 -march=i686 -mfpmath=sse -mtune=generic -fno-omit-frame-pointer -fasynchronous-unwind-tables’
  • export CXXFLAGS
  • FFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -m32 -msse -msse2 -march=i686 -mfpmath=sse -mtune=generic -fno-omit-frame-pointer -fasynchronous-unwind-tables -I/usr/lib/gfortran/modules’
  • export FFLAGS
  • export LD_AS_NEEDED
  • export QT_SELECT=5
  • qmake -qt=5 -makefile ‘QMAKE_CFLAGS_RELEASE=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -m32 -msse -msse2 -march=i686 -mfpmath=sse -mtune=generic -fno-omit-frame-pointer -fasynchronous-unwind-tables’ ‘QMAKE_CFLAGS_DEBUG=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -m32 -msse -msse2 -march=i686 -mfpmath=sse -mtune=generic -fno-omit-frame-pointer -fasynchronous-unwind-tables’ ‘QMAKE_CXXFLAGS_RELEASE=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -m32 -msse -msse2 -march=i686 -mfpmath=sse -mtune=generic -fno-omit-frame-pointer -fasynchronous-unwind-tables’ ‘QMAKE_CXXFLAGS_DEBUG=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -m32 -msse -msse2 -march=i686 -mfpmath=sse -mtune=generic -fno-omit-frame-pointer -fasynchronous-unwind-tables’ QMAKE_STRIP=: PREFIX=/usr LIBDIR=/usr/lib
    Usage: C:/SailfishOS/mersdk/targets/SailfishOS- [mode] [options] [files]

QMake has two modes, one mode for generating project files based on
some heuristics, and the other for generating makefiles. Normally you
shouldn’t need to specify a mode, as makefile generation is the default
mode for qmake, but you may use this to test qmake on an existing project

-project Put qmake into project file generation mode
In this mode qmake interprets files as files to
be built,
defaults to *; *; *; *.ts; *.xlf; *.qrc
Note: The created .pro file probably will
need to be edited. For example add the QT variable to
specify what modules are required.
-makefile Put qmake into makefile generation mode (default)
In this mode qmake interprets files as project files to
be processed, if skipped qmake will try to find a project
file in your current working directory

Warnings Options:
-Wnone Turn off all warnings; specific ones may be re-enabled by
later -W options
-Wall Turn on all warnings
-Wparser Turn on parser warnings
-Wlogic Turn on logic warnings (on by default)
-Wdeprecated Turn on deprecation warnings (on by default)


  • You can place any variable assignment in options and it will be *
  • processed as if it was in [files]. These assignments will be parsed *
  • before [files]. *
    -o file Write output to file
    -d Increase debug level
    -t templ Overrides TEMPLATE as templ
    -tp prefix Overrides TEMPLATE so that prefix is prefixed into the value
    -help This help
    -v Version information
    -after All variable assignments after this will be
    parsed after [files]
    -norecursive Don’t do a recursive search
    -recursive Do a recursive search
    -set Set persistent property
    -unset Unset persistent property
    -query Query persistent property. Show all if is empty.
    -cache file Use file as cache [makefile mode only]
    -spec spec Use spec as QMAKESPEC [makefile mode only]
    -nocache Don’t use a cache file [makefile mode only]
    -nodepend Don’t generate dependencies [makefile mode only]
    -nomoc Don’t generate moc targets [makefile mode only]
    -nopwd Don’t look for files in pwd [project mode only]
    error: Bad exit status from /var/tmp/rpm-tmp.LCZG51 (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.LCZG51 (%build)

Did you try:

  1. another target (aarch64)
  2. force qmake (Build → run qmake)

Thanks for the hints. I tried different targets and forcing to run qmake. The results is always the same. With aarch64 I got another hint in the error message:

Error creating/deploying harbour-XXX project (Kit: SailfishOS- (in Sailfish SDK Build Engine)).
The SailfishOS- kit (in Sailfish SDK Build Engine) contains configuration issues that could be the cause of this problem.
When executing step “qmake”

Also when switching the target I get a question if I want to run qmake to detect possible additional qmake arguments. When I click run I get the previous error message.


I tried to create a new project. File → new Sailfish OS QtQuick Application saved it and hit run. → same error.
Set the active project back to componentgallery hit run and it compiled.

Anyone any idea?

I did some more digging but got nowhere. The compiling output between the working app and the non working app is identical until the line:

Also I tried creating a new app again. This time it worked. The app compiles. I went back to the first new one tried compiling there, it did not compile. Both apps are identical besides the folder they were saved in.

Any advice what I could do next?

C:/ ???

Is there some Windows in play somewhere?

E.g. contents of .pro.user or so?

I try to compile on a windows machine. The was originally written on a Mac. I guess the C: path comes in play due to the error message. It is pointing the the location of qmake.

I think the next thing I try is a reinstall.

I uninstalled SailfishSDK and re-installed it. So far my apps compile.

The same (or very similar) happened to me when I copied some unprintable characters and pasted them into .pro file.