[SailfishDevel] Static build

Tone Kastlunger users.giulietta at gmail.com
Fri Nov 25 16:07:30 UTC 2016


Hm you mean static libs?

On Wed, Nov 23, 2016 at 12:20 PM, Georg <scooterschorschi at gmail.com> wrote:

> That did the trick. Didn't kown that one can use -fPIC vor archives. I
> always used it for shared librarys in the past.
>
> Am Di. Nov. 22 21:51:41 2016 GMT+0100 schrieb Tone Kastlunger:
> > Recompile the mentioned library with the -fPIC
> >
> > On Tue, Nov 22, 2016 at 10:50 PM, george b <scooterschorschi at gmail.com>
> > wrote:
> >
> > > This was may assumption.
> > > But when I try to combine the static library (libSwiften) within my qt
> > > app, I got the following error during linking:
> > >
> > > g++ -Wl,-O1 -Wl,-rpath,/usr/share/kaidan/lib -o kaidan main.o Kaidan.o
> > > RosterContoller.o RosterItem.o Persistence.o MessageController.o
> Database.o
> > > qrc_qml.o moc_Kaidan.o moc_RosterContoller.o moc_RosterItem.o
> > > moc_Persistence.o moc_MessageController.o moc_Database.o
> > > -L../swift-3.0/Swiften -L../../swift-3.0/3rdParty/Boost -lSwiften
> > > -lSwiften_Boost -lrt -lz -lssl -lcrypto -lxml2 -lresolv -ldl -lm -lc
> > > -lstdc++ -pie -rdynamic -L/usr/lib/ -lsailfishapp -lmdeclarativecache5
> > > -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Sql -lQt5Core -lGLESv2
> > > -lpthread
> > > /opt/cross/bin/armv7hl-meego-linux-gnueabi-ld: ../swift-3.0/Swiften/
> libSwiften.a(CoreClient.o):
> > > relocation R_ARM_THM_MOVW_ABS_NC against `_
> ZN5Swift10CoreClient21handleMe
> > > ssageReceivedEN5boost10shared_ptrINS_7MessageEEE' can not be used when
> > > making a shared object; recompile with -fPIC
> > > ../swift-3.0/Swiften/libSwiften.a: error adding symbols: Bad value
> > >
> > > Any suggestions what went wrong?
> > >
> > >
> > >
> > > 2016-11-22 21:18 GMT+01:00 Andrey Kozhevnikov <coderusinbox at gmail.com
> >:
> > >
> > >> of course you can static compile selected libraries only.
> > >>
> > >> ------ Исходное сообщение ------
> > >> От: "george b" <scooterschorschi at gmail.com>
> > >> Кому: "Sailfish OS Developers" <devel at lists.sailfishos.org>
> > >> Отправлено: 22.11.2016 23:05:17
> > >> Тема: [SailfishDevel] Static build
> > >>
> > >> Hi
> > >>
> > >> I try to develop a xmpp client [1], based on libSwiften. A console
> > >> example compiled against a static Swiften lib works well. No I
> compiled
> > >> Swiften as a shared object, to combine it in a sailfish app. This way
> I got
> > >> a sasl error on runtime. Similar posts in different forums pointed
> out that
> > >> the error message results from a bug in a sasl library. I can work
> around
> > >> this problem using the static version of Swiften.
> > >>
> > >> Are there packages for static versions of qt and libsailfishapp
> > >> available, to be installed in the sdk? Or is there a possibility to
> combine
> > >> a static libraray archive with a sailfish application which uses
> shared
> > >> librarys?
> > >>
> > >> Regards
> > >> Georg
> > >>
> > >> [1] https://github.com/KaidanIM/Kaidan
> > >>
> > >>
> > >> _______________________________________________
> > >> SailfishOS.org Devel mailing list
> > >> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfi
> > >> shos.org
> > >>
> > >
> > >
> > > _______________________________________________
> > > SailfishOS.org Devel mailing list
> > > To unsubscribe, please send a mail to devel-unsubscribe at lists.
> > > sailfishos.org
> > >
> >
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.
> sailfishos.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20161125/9c589670/attachment.html>


More information about the Devel mailing list