maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   QJson 0.8.1 for Fremantle (https://talk.maemo.org/showthread.php?t=92657)

marmistrz 2014-02-10 17:21

QJson 0.8.1 for Fremantle
 
I've just ported QJson 0.8.1 to Fremantle. It's not tested yet and armel only (some optify problems on i386). It's in extras-devel

taixzo 2014-02-10 18:31

Re: QJson 0.8.1 for Fremantle
 
What is it? I think some sort of description is good for Fremantle apps, as the N900 has very limited rootfs space.

coderus 2014-02-10 18:33

Re: QJson 0.8.1 for Fremantle
 
some basic googling skills are necessary for everyone

sixwheeledbeast 2014-02-10 18:34

Re: QJson 0.8.1 for Fremantle
 
Quote:

Originally Posted by taixzo (Post 1412023)
What is it? I think some sort of description is good for Fremantle apps, as the N900 has very limited rootfs space.

https://gitorious.org/qjson/
Quote:

QJson is a qt-based library that maps JSON data to QVariant objects: JSON arrays will be mapped to QVariantList instances, while JSON objects will be mapped to QVariantMap.

taixzo 2014-02-10 19:32

Re: QJson 0.8.1 for Fremantle
 
Quote:

Originally Posted by coderus (Post 1412024)
some basic googling skills are necessary for everyone

Good point. I am mainly thinking from the perspective of someone with a poor 2g connection, where googling something means loading two extra webpages, each of which take 5 minutes or so.

Copernicus 2014-08-09 14:41

Re: QJson 0.8.1 for Fremantle
 
Quote:

Originally Posted by marmistrz (Post 1412015)
I've just ported QJson 0.8.1 to Fremantle. It's not tested yet and armel only (some optify problems on i386). It's in extras-devel

Newbie question here: if I wanted to use this library from within Qt Creator, what would be the best way to go about it? I could probably "install" the QJson package into the Qt Maemo sysroot by hand, but I'm kind of hoping that there's a more elegant method available... :)

marxian 2014-08-09 15:09

Re: QJson 0.8.1 for Fremantle
 
Quote:

Originally Posted by Copernicus (Post 1435335)
Newbie question here: if I wanted to use this library from within Qt Creator, what would be the best way to go about it? I could probably "install" the QJson package into the Qt Maemo sysroot by hand, but I'm kind of hoping that there's a more elegant method available... :)

You can use mad-admin (located under Maemo/4.6.2/bin/) to install debian packages using xdpkg:

Code:

/path/to/mad-admin xdpkg -i package_0.0.1_armel.deb

Copernicus 2014-08-09 17:39

Re: QJson 0.8.1 for Fremantle
 
Quote:

Originally Posted by marxian (Post 1435340)
You can use mad-admin (located under Maemo/4.6.2/bin/) to install debian packages using dpkg:

Code:

/path/to/mad-admin dpkg -i package_0.0.1_armel.deb

Thank you! I'm getting closer, but not quite there yet. I spent a few hours fighting with mad-admin, who refused to acknowledge the existence of "dpkg" (even though it was sitting right in the "madbin" directory). However, it did show the command "xdpkg" being available, and so I gave that a try. I was able to install the qjson0 debian package using this, and successfully compiled against it. But now, when I try to install a binary to my N900, I'm getting a "no dependency information found" error. My initial assumption here is that this is a side-effect of not using dpkg... Anyway, here's the error message:

Code:

dpkg-shlibdeps: failure: no dependency information found for /Users/john/QtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libqjson.so.0 (used by debian/linguine/opt/linguine/bin/linguine).
dh_shlibdeps: command returned error code 512
make: *** [binary-arch] Error 1
Packaging Error: Command '/Users/john/QtSDK/Maemo/4.6.2/bin/mad dpkg-buildpackage -nc -uc -us' failed.Exit code: 2
Error while building project linguine (target: Maemo5)
When executing build step 'Create Debian Package'

Any hints as to what I need to investigate next? :)

marxian 2014-08-09 18:33

Re: QJson 0.8.1 for Fremantle
 
Quote:

Originally Posted by Copernicus (Post 1435351)
Thank you! I'm getting closer, but not quite there yet. I spent a few hours fighting with mad-admin, who refused to acknowledge the existence of "dpkg" (even though it was sitting right in the "madbin" directory). However, it did show the command "xdpkg" being available, and so I gave that a try. I was able to install the qjson0 debian package using this, and successfully compiled against it. But now, when I try to install a binary to my N900, I'm getting a "no dependency information found" error. My initial assumption here is that this is a side-effect of not using dpkg... Anyway, here's the error message:

Code:

dpkg-shlibdeps: failure: no dependency information found for /Users/john/QtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libqjson.so.0 (used by debian/linguine/opt/linguine/bin/linguine).
dh_shlibdeps: command returned error code 512
make: *** [binary-arch] Error 1
Packaging Error: Command '/Users/john/QtSDK/Maemo/4.6.2/bin/mad dpkg-buildpackage -nc -uc -us' failed.Exit code: 2
Error while building project linguine (target: Maemo5)
When executing build step 'Create Debian Package'

Any hints as to what I need to investigate next? :)

xdpkg is actually the right command. :o

It sounds like a problem with your control file. Did you add libqjson to Depends and libqjson-dev to Build-Depends?

Copernicus 2014-08-09 19:36

Re: QJson 0.8.1 for Fremantle
 
Quote:

Originally Posted by marxian (Post 1435354)
It sounds like a problem with your control file. Did you add libqjson to Depends and libqjson-dev to Build-Depends?

I have tried a number of variations of "libjson", "libjson0", "Libjson", "Libjson0", "blah", etc., and they all come up with the same results. So, I've probably still got something set up wrong somewhere...

Copernicus 2014-08-10 00:35

Re: QJson 0.8.1 for Fremantle
 
Well, after some digging, I finally found some old posts from someone facing the same problem. It turns out that, apparently, the Madde tools provided for the N900 (in the 4.6.2 version of the Qt Maemo toolchain) have a few bugs. In particular, the xdpkg / dpkg scripts do not properly generate or look for "shlibs" files when installing / using a new library package. Fixing this apparently involves grabbing the latest copy of xdpkg off the gitorious site:

https://meego.gitorious.org/meego-de...adlib/xdpkg.pl

and using it to replace the xdpkg script in the Qt SDK directory Maemo/4.6.2/madlib/ma-cmds, as well as replacing the "dpkg" and "dh_shlibdeps" scripts under Maemo/4.6.2/madbin with those found in the Madde/madbin directory.

Here are some links to discussions of this bug:

http://maemo.org/community/maemo-dev...maemo_sysroot/

http://qt-project.org/forums/viewthread/9253

I have to admit, this only worked partially for me; the new scripts did successfully create a .shilibs file for the libqjson0 package (under the directory $SYSROOT/madde_xpkgs), but apparently still didn't look in that directory when trying to build against the library. However, I know that it does look in the $SYSROOT/var/lib/dpkg/info directory for shlib files, so for now, I went ahead and copied the libqjson0 files into that directory. And that worked!

So now, I can at least build and run against libqjson0. Hooray! :)


All times are GMT. The time now is 14:35.

vBulletin® Version 3.8.8