maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Madde: How to build/manage third-party libraries? (https://talk.maemo.org/showthread.php?t=48536)

rontti 2010-03-31 12:43

Re: Madde: How to build/manage third-party libraries?
 
Quote:

Originally Posted by arne.anka (Post 589661)
i might confuse that with scratchbox, but doesn't MADDE too download tarballs and extracts them into the chroots?

Nope, madde does not use chroots. I don't know is that even possible in Windows.

Quote:

thus: what about a script that allows downloading devel packages and libs, converts them to tarballs (either with alien or with ar, since debian packages are nothing but ar archives containing data.tar.gz which is the actual archive we need here) and extracts them into the matching folders? as long as the folders follow the structure maemo uses simply extracting them below a certain folder should be sufficient.
That could be a solution. We also need to change sysroot name when it is changed. Otherwise when you create a target again and sweep out old sysroot you have lost your changes.

Quote:

not sure how important those packages are and if they would be available to MADDE (is MADDE a nokia project after all?).
still confirms my opinion nokia doesn't like development for maemo.
MADDE is nokia project.

mst0 2010-07-28 17:02

Re: Madde: How to build/manage third-party libraries?
 
As I have had the same problem (I need to use libqjson while using MADDE/QtCreator), here is how I solved it (ugly hacks, but well, if there is no official way…):
  • Install libqjson on your device (N900 in my case)
  • In order to type less in the following commands, set a variable with the path to the sysroot:
    Code:

    export SYSR=~/.madde/0.6.72/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim
  • Copy the development headers from your system (or from the device, but then you need to install libqjson-dev there, too) to the sysroot:
    Code:

    cp -r /usr/include/qjson ${SYSR}/usr/include
  • Copy the library itself from the device (to ensure that you got the very same version):
    Code:

    scp n900:/usr/lib/libqjson* ${SYSR}/usr/lib
  • This step is important, otherwise MADDE will just fail when building the debian package, stating "dh_shlibdeps failed": Copy the dpkg meta files from the device:
    Code:

    scp n900:/var/lib/dpkg/info/libqjson.* ${SYSR}/var/lib/dpkg/info/

Then, in the Qt project file, add:
Code:

CONFIG += link_pkgconfig
PKGCONFIG += QJson


dsolbach 2010-11-08 20:16

Re: Madde: How to build/manage third-party libraries?
 
Thanks to w00t_ on irc I found this thread.

I got it to work with w00t_s help, but I had to do 2 extra steps:

install libqjson-dev on the device

and copy the *.pc file so QJson is found when running qmake.

Code:

scp root@n900:/usr/lib/pkgconfig/QJson.pc ${SYSR}/usr/lib/pkgconfig/

admiral0 2011-02-15 16:45

Re: Madde: How to build/manage third-party libraries?
 
Quote:

Originally Posted by dsolbach (Post 867334)
Thanks to w00t_ on irc I found this thread.

I got it to work with w00t_s help, but I had to do 2 extra steps:

install libqjson-dev on the device

and copy the *.pc file so QJson is found when running qmake.

Code:

scp root@n900:/usr/lib/pkgconfig/QJson.pc ${SYSR}/usr/lib/pkgconfig/

Shouldn't be mad with host's QJson.pc

mr_jrt 2011-06-30 14:52

Re: Madde: How to build/manage third-party libraries?
 
For the benefit of others, I also had to copy the record for the dev package from "/var/lib/dpkg/status" on my device into the one in the MADDE environment in order for "dpkg-checkbuilddeps" to succeed.

Creamy Goodness 2012-12-15 07:46

Re: Madde: How to build/manage third-party libraries?
 
Is there another way to do this with the harmattan sdk? I tried all this but it won't work still, it's not adding my lib to the includes. No big deal cuz I can manually add it, but annoying...

never mind, found the command i was looking for (xdpkg)

in my case, running from I:\QtSDK\Madde\wbin
mad set harmattan_10.2011.34-1_rt1.2
mad-admin xdpkg -i something.deb

I get all the way to "dpkg-checkbuilddeps: Unmet build dependencies:" now
:confused:

Ok, xdpkg + manually modify the "status" file works.

frafI 2013-02-12 14:15

Re: Madde: How to build/manage third-party libraries?
 
The following scripts worked for me:
Replace $MADDEROOT with the correct path on your system.
$MADDEROOT/apt/apt.conf:
Code:

APT::Archives::MaxAge "30";
APT::Archives::MinAge "2";
APT::Archives::MaxSize "500";
APT::Architecture "armel";
Dir::Etc::SourceList "$MADDEROOT/apt/sources.list";
Dir::State::Lists "$MADDEROOT/apt/lists";
Dir::Cache::Archives "$MADDEROOT/apt/cache";
DPkg::Options:: {"--admindir=$MADDEROOT/apt/dpkg";};

$MADDEROOT/madbin/apt-get:
Code:

#!/bin/sh

case "$1" in

update)
    /usr/bin/apt-get -c $SYSROOT_DIR/../../apt/apt.conf update
    ;;
install)
    shift
    cd $SYSROOT_DIR/../../apt/cache/
    /usr/bin/apt-get -c $SYSROOT_DIR/../../apt/apt.conf download $*
    for i in *FAILED ; do
        mv $i `basename $i .FAILED`
    done
    for i in *.deb ; do
        mkdir -p $i.tmp
        ar x $i data.tar.gz
        mv data.tar.gz $i.tmp
        cd $i.tmp && tar xf data.tar.gz &&  rm data.tar.gz && cd ..
        rsync -a $i.tmp/ $SYSROOT_DIR/
    done

    ;;
*) echo "mad apt-get (install pkbnames | update)"
  ;;
esac

$MADDEROOT/apt/sources.list:
Code:

deb http://repository.maemo.org/extras/ fremantle free non-free
deb http://repository.maemo.org/extras-testing/ fremantle free non-free
deb http://repository.maemo.org/extras-devel/ fremantle free non-free
#plus whatever you like



All times are GMT. The time now is 22:22.

vBulletin® Version 3.8.8