We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2014-01-18 19:04:31 +0200

BUG: SDK can't handle subdirs template

Let's assume the following directory structure in a project:

├── Library
│   ├── Library.pro
│   ├── world.cpp
│   └── world.h
├── SFOSHelloWorldWithLibrary
│   ├── SFOSHelloWorldWithLibrary.pro
│   ├── harbour-SFOSHelloWorldWithLibrary.desktop
│   ├── harbour-SFOSHelloWorldWithLibrary.png
│   ├── qml
│   │   ├── cover
│   │   │   └── CoverPage.qml
│   │   ├── harbour-SFOSHelloWorldWithLibrary.qml
│   │   └── pages
│   │       └── FirstPage.qml
│   ├── rpm
│   │   └── harbour-SFOSHelloWorldWithLibrary.yaml
│   └── src
│       └── SFOSHelloWorldWithLibrary.cpp
└── SFOSHelloWorldWithLibrary.pro

And the main project file would be

TEMPLATE = subdirs
# build the project in the given order
CONFIG += ordered
SUBDIRS += Library \
           SFOSHelloWorldWithLibrary

SFOSHelloWorldWithLibrary.depends = LIBRARY

It is possible to compile the project but it can not be deployed. If you choose deploy from the build menu, you get the error message

Fatal: No spec file found in '/home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/' and couldn't make one from a yaml #1

Well, that's true - there is no .spec file in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/. It should look in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary_02 rpm/= one directory level deeper. First I thought it was mixed up in the mb2script on the development VM. But now I believe it is hidden somewhere in the mersshbinary, which is used as a proxy to shield the calls from QtCreator (or to make QtCreator believe to have the needed tools at hand locally).

You could say: move your things one level up and of course I could. But what if a developer wants to reuse libraries and resources from code he/she has written on other platforms? Even using Qt this could be BB10, Android, iOS and such.

Am I doing it wrong? Or is it really a bug?

BUG: SDK can't handle subdirs templatetemplate on OSX

Let's assume the following directory structure in a project:

├── Library
│   ├── Library.pro
│   ├── world.cpp
│   └── world.h
├── SFOSHelloWorldWithLibrary
│   ├── SFOSHelloWorldWithLibrary.pro
│   ├── harbour-SFOSHelloWorldWithLibrary.desktop
│   ├── harbour-SFOSHelloWorldWithLibrary.png
│   ├── qml
│   │   ├── cover
│   │   │   └── CoverPage.qml
│   │   ├── harbour-SFOSHelloWorldWithLibrary.qml
│   │   └── pages
│   │       └── FirstPage.qml
│   ├── rpm
│   │   └── harbour-SFOSHelloWorldWithLibrary.yaml
│   └── src
│       └── SFOSHelloWorldWithLibrary.cpp
└── SFOSHelloWorldWithLibrary.pro

And the main project file would be

TEMPLATE = subdirs
# build the project in the given order
CONFIG += ordered
SUBDIRS += Library \
           SFOSHelloWorldWithLibrary

SFOSHelloWorldWithLibrary.depends = LIBRARY

It is possible to compile the project but it can not be deployed. If you choose deploy from the build menu, you get the error message

Fatal: No spec file found in '/home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/' and couldn't make one from a yaml #1

Well, that's true - there is no .spec file in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/. It should look in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary_02 rpm/= one directory level deeper. First I thought it was mixed up in the mb2script on the development VM. But now I believe it is hidden somewhere in the mersshbinary, which is used as a proxy to shield the calls from QtCreator (or to make QtCreator believe to have the needed tools at hand locally).

You could say: move your things one level up and of course I could. But what if a developer wants to reuse libraries and resources from code he/she has written on other platforms? Even using Qt this could be BB10, Android, iOS and such.

Am I doing it wrong? Or is it really a bug?

Maybe this is an OSX only problem? Can anyone confirm this for oner platforms?

BUG: SDK can't handle subdirs template on OSX

Let's assume the following directory structure in a project:

├── Library
│   ├── Library.pro
│   ├── world.cpp
│   └── world.h
├── SFOSHelloWorldWithLibrary
│   ├── SFOSHelloWorldWithLibrary.pro
│   ├── harbour-SFOSHelloWorldWithLibrary.desktop
│   ├── harbour-SFOSHelloWorldWithLibrary.png
│   ├── qml
│   │   ├── cover
│   │   │   └── CoverPage.qml
│   │   ├── harbour-SFOSHelloWorldWithLibrary.qml
│   │   └── pages
│   │       └── FirstPage.qml
│   ├── rpm
│   │   └── harbour-SFOSHelloWorldWithLibrary.yaml
│   └── src
│       └── SFOSHelloWorldWithLibrary.cpp
└── SFOSHelloWorldWithLibrary.pro

And the main project file would be

TEMPLATE = subdirs
# build the project in the given order
CONFIG += ordered
SUBDIRS += Library \
           SFOSHelloWorldWithLibrary

SFOSHelloWorldWithLibrary.depends = LIBRARY

It is possible to compile the project but it can not be deployed. If you choose deploy from the build menu, you get the error message

Fatal: No spec file found in '/home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/' and couldn't make one from a yaml #1

Well, that's true - there is no .spec file in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/. It should look in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary_02 rpm//home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary/rpm/= one directory level deeper. First I thought it was mixed up in the mb2script on the development VM. But now I believe it is hidden somewhere in the mersshbinary, which is used as a proxy to shield the calls from QtCreator (or to make QtCreator believe to have the needed tools at hand locally).

You could say: move your things one level up and of course I could. But what if a developer wants to reuse libraries and resources from code he/she has written on other platforms? Even using Qt this could be BB10, Android, iOS and such.

Am I doing it wrong? Or is it really a bug?

Maybe this is an OSX only problem? Can anyone confirm this for oner platforms?

BUG: SDK can't handle subdirs template on OSX

Let's assume the following directory structure in a project:

├── Library
│   ├── Library.pro
│   ├── world.cpp
│   └── world.h
├── SFOSHelloWorldWithLibrary
│   ├── SFOSHelloWorldWithLibrary.pro
│   ├── harbour-SFOSHelloWorldWithLibrary.desktop
│   ├── harbour-SFOSHelloWorldWithLibrary.png
│   ├── qml
│   │   ├── cover
│   │   │   └── CoverPage.qml
│   │   ├── harbour-SFOSHelloWorldWithLibrary.qml
│   │   └── pages
│   │       └── FirstPage.qml
│   ├── rpm
│   │   └── harbour-SFOSHelloWorldWithLibrary.yaml
│   └── src
│       └── SFOSHelloWorldWithLibrary.cpp
└── SFOSHelloWorldWithLibrary.pro

And the main project file would be

TEMPLATE = subdirs
# build the project in the given order
CONFIG += ordered
SUBDIRS += Library \
           SFOSHelloWorldWithLibrary

SFOSHelloWorldWithLibrary.depends = LIBRARY

It is possible to compile the project but it can not be deployed. If you choose deploy from the build menu, you get the error message

Fatal: No spec file found in '/home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/' and couldn't make one from a yaml #1

Well, that's true - there is no .spec file in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/. It should look in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary/rpm/= one directory level deeper. First I thought it was mixed up in the mb2script on the development VM. But now I believe it is hidden somewhere in the mersshbinary, which is used as a proxy to shield the calls from QtCreator (or to make QtCreator believe to have the needed tools at hand locally).

QtCreator calls ~/.config/SailfishAlpha3/mer-sdk-tools/MerSDK/SailfishOS-i486-x86/deployscript.

This turns into bash -c cd "$HOME//Documents/QtProjects/build-SFOSHelloWorldWithLibrary-MerSDK_SailfishOS_i486_x86-Debug" && mb2 -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02" -t SailfishOS-i486-x86 qmake $HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug on the MerSDK VM.

The -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02"is the problem (and the hint for the solution) here.

You could say: move your things one level up and of course I could. But what if a developer wants to reuse libraries and resources from code he/she has written on other platforms? Even using Qt this could be BB10, Android, iOS and such.

Am I doing it wrong? Or is it really a bug?

Maybe this is an OSX only problem? Can anyone confirm this for oner platforms?

BUG: SDK can't handle subdirs template on OSX

Let's assume the following directory structure in a project:

├── Library
│   ├── Library.pro
│   ├── world.cpp
│   └── world.h
├── SFOSHelloWorldWithLibrary
│   ├── SFOSHelloWorldWithLibrary.pro
│   ├── harbour-SFOSHelloWorldWithLibrary.desktop
│   ├── harbour-SFOSHelloWorldWithLibrary.png
│   ├── qml
│   │   ├── cover
│   │   │   └── CoverPage.qml
│   │   ├── harbour-SFOSHelloWorldWithLibrary.qml
│   │   └── pages
│   │       └── FirstPage.qml
│   ├── rpm
│   │   └── harbour-SFOSHelloWorldWithLibrary.yaml
│   └── src
│       └── SFOSHelloWorldWithLibrary.cpp
└── SFOSHelloWorldWithLibrary.pro

And the main project file would be

TEMPLATE = subdirs
# build the project in the given order
CONFIG += ordered
SUBDIRS += Library \
           SFOSHelloWorldWithLibrary

SFOSHelloWorldWithLibrary.depends = LIBRARY

It is possible to compile the project but it can not be deployed. If you choose deploy from the build menu, you get the error message

Fatal: No spec file found in '/home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/' and couldn't make one from a yaml #1

Well, that's true - there is no .spec file in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/. It should look in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary/rpm/= one directory level deeper. First I thought it was mixed up in the mb2script on the development VM. But now I believe it is hidden somewhere in the mersshbinary, which is used as a proxy to shield the calls from QtCreator (or to make QtCreator believe to have the needed tools at hand locally).

QtCreator calls ~/.config/SailfishAlpha3/mer-sdk-tools/MerSDK/SailfishOS-i486-x86/deploy script.

This turns into bash -c cd "$HOME//Documents/QtProjects/build-SFOSHelloWorldWithLibrary-MerSDK_SailfishOS_i486_x86-Debug" && mb2 -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02" -t SailfishOS-i486-x86 qmake $HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug on the MerSDK VM.VM (followed by some similar calls for make etc.)

The -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02"is the problem (and the hint for the solution) here.

You could say: move your things one level up and of course I could. But what if a developer wants to reuse libraries and resources from code he/she has written on other platforms? Even using Qt this could be BB10, Android, iOS and such.

Am I doing it wrong? Or is it really a bug?

Maybe this is an OSX only problem? Can anyone confirm this for oner platforms?

BUG: SDK can't handle subdirs template on OSX

Let's assume the following directory structure in a project:

├── Library
│   ├── Library.pro
│   ├── world.cpp
│   └── world.h
├── SFOSHelloWorldWithLibrary
│   ├── SFOSHelloWorldWithLibrary.pro
│   ├── harbour-SFOSHelloWorldWithLibrary.desktop
│   ├── harbour-SFOSHelloWorldWithLibrary.png
│   ├── qml
│   │   ├── cover
│   │   │   └── CoverPage.qml
│   │   ├── harbour-SFOSHelloWorldWithLibrary.qml
│   │   └── pages
│   │       └── FirstPage.qml
│   ├── rpm
│   │   └── harbour-SFOSHelloWorldWithLibrary.yaml
│   └── src
│       └── SFOSHelloWorldWithLibrary.cpp
└── SFOSHelloWorldWithLibrary.pro

And the main project file would be

TEMPLATE = subdirs
# build the project in the given order
CONFIG += ordered
SUBDIRS += Library \
           SFOSHelloWorldWithLibrary

SFOSHelloWorldWithLibrary.depends = LIBRARY

It is possible to compile the project but it can not be deployed. If you choose deploy from the build menu, you get the error message

Fatal: No spec file found in '/home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/' and couldn't make one from a yaml #1

Well, that's true - there is no .spec file in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/. It should look in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary/rpm/= one directory level deeper. First I thought it was mixed up in the mb2script on the development VM. But now I believe it is hidden somewhere in the mersshbinary, which is used as a proxy to shield the calls from QtCreator (or to make QtCreator believe to have the needed tools at hand locally).

QtCreator calls ~/.config/SailfishAlpha3/mer-sdk-tools/MerSDK/SailfishOS-i486-x86/deploy script.

This turns into bash -c cd "$HOME//Documents/QtProjects/build-SFOSHelloWorldWithLibrary-MerSDK_SailfishOS_i486_x86-Debug" && mb2 -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02" -t SailfishOS-i486-x86 qmake $HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug on the MerSDK VM (followed by some similar calls for make etc.)

The -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02"is the problem (and the hint for the solution) here.here. If you pass the '-p SOMEDIR` as extra parameter in QtCreator, it does not override the path seen here. And it can not be saved in QtCreator.

You could say: move your things one level up and of course I could. But what if a developer wants to reuse libraries and resources from code he/she has written on other platforms? Even using Qt this could be BB10, Android, iOS and such.

Am I doing it wrong? Or is it really a bug?

Maybe this is an OSX only problem? Can anyone confirm this for oner other platforms?

BUG: SDK can't handle subdirs template on OSX

Let's assume the following directory structure in a project:

├── Library
│   ├── Library.pro
│   ├── world.cpp
│   └── world.h
├── SFOSHelloWorldWithLibrary
│   ├── SFOSHelloWorldWithLibrary.pro
│   ├── harbour-SFOSHelloWorldWithLibrary.desktop
│   ├── harbour-SFOSHelloWorldWithLibrary.png
│   ├── qml
│   │   ├── cover
│   │   │   └── CoverPage.qml
│   │   ├── harbour-SFOSHelloWorldWithLibrary.qml
│   │   └── pages
│   │       └── FirstPage.qml
│   ├── rpm
│   │   └── harbour-SFOSHelloWorldWithLibrary.yaml
│   └── src
│       └── SFOSHelloWorldWithLibrary.cpp
└── SFOSHelloWorldWithLibrary.pro

And the main project file would be

TEMPLATE = subdirs
# build the project in the given order
CONFIG += ordered
SUBDIRS += Library \
           SFOSHelloWorldWithLibrary

SFOSHelloWorldWithLibrary.depends = LIBRARY

It is possible to compile the project but it can not be deployed. If you choose deploy from the build menu, you get the error message

Fatal: No spec file found in '/home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/' and couldn't make one from a yaml #1

Well, that's true - there is no .spec file in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/. It should look in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary/rpm/= one directory level deeper. First I thought it was mixed up in the mb2script on the development VM. But now I believe it is hidden somewhere in the mersshbinary, which is used as a proxy to shield the calls from QtCreator (or to make QtCreator believe to have the needed tools at hand locally).

QtCreator calls ~/.config/SailfishAlpha3/mer-sdk-tools/MerSDK/SailfishOS-i486-x86/deploy script.

script. That reads

#!/bin/bash
exec "/Users/sven/SailfishOS/bin/Qt Creator.app/Contents/MacOS/../Resources/merssh" -sdktoolsdir "/Users/sven/.config/SailfishAlpha3/mer-sdk-tools/MerSDK" -commandtype mb2 -mertarget SailfishOS-i486-x86 deploy $@

This turns into bash -c cd "$HOME//Documents/QtProjects/build-SFOSHelloWorldWithLibrary-MerSDK_SailfishOS_i486_x86-Debug" && mb2 -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02" -t SailfishOS-i486-x86 qmake $HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug on the MerSDK VM (followed by some similar calls for make etc.)

The -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02"is the problem (and the hint for the solution) here. If you pass the '-p SOMEDIR` as extra parameter in QtCreator, it does not override the path seen here. And it can not be saved in QtCreator.

You could say: move your things one level up and of course I could. But what if a developer wants to reuse libraries and resources from code he/she has written on other platforms? Even using Qt this could be BB10, Android, iOS and such.

Am I doing it wrong? Or is it really a bug?

Maybe this is an OSX only problem? Can anyone confirm this for other platforms?

BUG: SDK can't handle subdirs template on OSX

Let's assume the following directory structure in a project:

├── Library
│   ├── Library.pro
│   ├── world.cpp
│   └── world.h
├── SFOSHelloWorldWithLibrary
│   ├── SFOSHelloWorldWithLibrary.pro
│   ├── harbour-SFOSHelloWorldWithLibrary.desktop
│   ├── harbour-SFOSHelloWorldWithLibrary.png
│   ├── qml
│   │   ├── cover
│   │   │   └── CoverPage.qml
│   │   ├── harbour-SFOSHelloWorldWithLibrary.qml
│   │   └── pages
│   │       └── FirstPage.qml
│   ├── rpm
│   │   └── harbour-SFOSHelloWorldWithLibrary.yaml
│   └── src
│       └── SFOSHelloWorldWithLibrary.cpp
└── SFOSHelloWorldWithLibrary.pro

And the main project file would be

TEMPLATE = subdirs
# build the project in the given order
CONFIG += ordered
SUBDIRS += Library \
           SFOSHelloWorldWithLibrary

SFOSHelloWorldWithLibrary.depends = LIBRARY

It is possible to compile the project but it can not be deployed. If you choose deploy from the build menu, you get the error message

Fatal: No spec file found in '/home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/' and couldn't make one from a yaml #1

Well, that's true - there is no .spec file in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/rpm/. It should look in /home/mersdk//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary/rpm/= one directory level deeper. First I thought it was mixed up in the mb2script on the development VM. But now I believe it is hidden somewhere in the mersshbinary, which is used as a proxy to shield the calls from QtCreator (or to make QtCreator believe to have the needed tools at hand locally).

QtCreator calls ~/.config/SailfishAlpha3/mer-sdk-tools/MerSDK/SailfishOS-i486-x86/deploy script. That reads

#!/bin/bash
exec "/Users/sven/SailfishOS/bin/Qt Creator.app/Contents/MacOS/../Resources/merssh" -sdktoolsdir "/Users/sven/.config/SailfishAlpha3/mer-sdk-tools/MerSDK" -commandtype mb2 -mertarget SailfishOS-i486-x86 deploy $@

This turns into bash -c cd "$HOME//Documents/QtProjects/build-SFOSHelloWorldWithLibrary-MerSDK_SailfishOS_i486_x86-Debug" && mb2 -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02" -t SailfishOS-i486-x86 qmake $HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02/SFOSHelloWorldWithLibrary.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug on the MerSDK VM (followed by some similar calls for make etc.)

The -p "$HOME//Documents/QtProjects/SFOSHelloWorldWithLibrary_02"is the problem (and the hint for the solution) here. If you pass the '-p SOMEDIR` as extra parameter in QtCreator, it does not override the path seen here. And it can not be saved in QtCreator.

You could say: move your things one level up and of course I could. But what if a developer wants to reuse libraries and resources from code he/she has written on other platforms? Even using Qt this could be BB10, Android, iOS and such.

Am I doing it wrong? Or is it really a bug?

Maybe this is an OSX only problem? Can anyone confirm this for other platforms?