Problem linking from Sailfish IDE

Hi,

I have a problem with the SDK (3.4 target). The linking phase fails with unresolved references for all used libs.

Compiling works from Sailfish IDE so all .o files are there but the linking fails.

When logging in on the MerSDK VM, using ‘sb2 -t SailfishOS-3.4.0.24-armv7hl’, cd to the build dir and the execute ´make´ the linking succeeds.

I have build the libs on OBS, added a repo in the MerSDK VM and installed them (all using sb2).
I am running the IDE on Windows 10 and VirtualBox 6.0.16

A log from the failed linking from the IDE: https://pastebin.com/N2VXVhwR
A log from the successful linking from within the build VM: https://pastebin.com/99fe20Xa

Other problems I had was that I had to install rsync, sdk-deploy-rpm, gdb and gdb-gdbserver manually on my phone (Oneplus One).

Would it be possible to get access to your project?

The difference that triggers this error is LD_AS_NEEDED=1 being set in environment when building with rpmbuild (from the IDE) and not in the other case.

For me this fixed the error:

diff --git a/donnie.pro b/donnie.pro
index 0d5d8d3..809999a 100644
--- a/donnie.pro
+++ b/donnie.pro
@@ -39,9 +39,9 @@ CONFIG += sailfishapp_i18n
 INCLUDEPATH += /usr/include/qt5/MprisQt
 INCLUDEPATH += /usr/include/qt5/QtDBus
 
-#LIBS += -lupnpp
-#LIBS += -lmpris-qt5
-QMAKE_LFLAGS += -lupnpp -lmpris-qt5
+LIBS += -lupnpp
+LIBS += -lmpris-qt5
+#QMAKE_LFLAGS += -lupnpp -lmpris-qt5
 
 TRANSLATIONS += \
     translations/donnie-de.ts \

On the other issue

Other problems I had was that I had to install rsync, sdk-deploy-rpm, gdb and gdb-gdbserver manually on my phone (Oneplus One).

These should be all pulled in automatically when you are registering the device under the IDE. If guess you have multiple devices and you only registered one of them and now you are using the same IP address to access another device without creating a separate registration for it under the IDE. This scenario deserves some improvements - noted down.

Thanks for looking into this. Indeed your change fixes the issue so thanks again.

As for the other issue I only have one phone but registering it was not click and go (due to me messing with ssh keys) so maybe that is why the procedure was only done half.