Deploy a library project to sysroot (e.g. for Maemo)
-
I have a library deployment issue that I need help solving. How do I deploy the library's .shlibs file to the (Maemo in this case) sysroot on my development box? QtCreator correctly deploys my library and its .shlibs file to my N900 phone. It also deploys the library to sysroot. The problem manifests when I attempt to deploy an application that depends on this library. Then I get an error message like the one below:
bq. dh_shlibdeps
dpkg-shlibdeps -Tdebian/panicbutton.substvars debian/panicbutton/opt/usr/bin/panicbutton
dpkg-shlibdeps: failure: no dependency information found for /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/opt/usr/lib/libqcontactchooserdialog.so.1 (used by debian/panicbutton/opt/usr/bin/panicbutton).
dh_shlibdeps: command returned error code 512
make: *** [binary-arch] Error 1
dpkg-buildpackage: failure: debian/rules binary gave error exit status 2
Packaging Error: Command '/home/talmage/QtSDK-1.1/Maemo/4.6.2/bin/mad dpkg-buildpackage -nc -uc -us' failed.Exit code: 2
Error while building project panicbutton (target: Maemo5)
When executing build step 'Packaging for Maemo' -
I tried adding a step to the deployment settings of the library project. It didn't work but it feels like it's a step in the right direction.
- The command is mad-admin. Be sure to use the right one from the QtSDK directory tree. For Maemo (fremantle) it's in the Maemo subdirectory. For Meego (harmattan) it's in the Madde subdirectory .
- The working directory is %{buildDir}.
- The command arguments are "xdpkg --install <debfile>", where <debfile> is the name of the Debian package file. In my case, it's " libqcontactchooserdialog_1_0_0_armel.deb". There ought to be a QtCreator variable that contains the package name.
This installed the library in my sysroot but dpkg-shlibdeps still can't find it when attempting to deploy the executable
-
I might not have been as clear as I could have in the first message here. Let me fix that now. Following that, I'll tell what new things I've learned.
I'm trying to deploy an application to my phone. The first thing QtCreator does is to build the Debian package. It uses mad-admin for that. mad-admin looks for a number of files in the Maemo sysroot that's installed under QtSDK. It expects to find libqcontactchooserdialog.shlibs that corresponds to my libqcontactchooserdialog.so.1. It's not finding it.
The library is definitely installed in /opt/usr/lib. I installed by hand into sysroot the same libqcontactchooserdialog.shlibs file that is on my N900. No joy!
I made my debian/rules file give me more information during the dh_shlibdeps phase of package building. Now the rule is dh_shlibdeps --dpkg-shlibdeps-params="-v -v -v"
This gives me more information and I see that dpkg-shlibdeps really, really does not find my libqcontactchooserdialog.shlibs. Here is the output:
bq. dh_shlibdeps --dpkg-shlibdeps-params="-v -v -v"
dpkg-shlibdeps -Tdebian/panicbutton.substvars -v -v -v debian/panicbutton/opt/usr/bin/panicbuttonScanning debian/panicbutton/opt/usr/bin/panicbutton (for Depends field)
Library libqcontactchooserdialog.so.1 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/opt/usr/lib/libqcontactchooserdialog.so.1
Library libQtLocation.so.1 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libQtLocation.so.1
Library libQtContacts.so.1 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libQtContacts.so.1
Library libQtMessaging.so.1 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libQtMessaging.so.1
Library libQtGui.so.4 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libQtGui.so.4
Library libQtDBus.so.4 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libQtDBus.so.4
Library libQtXml.so.4 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libQtXml.so.4
Library libQtCore.so.4 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libQtCore.so.4
Library libpthread.so.0 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/lib/libpthread.so.0
Library libstdc++.so.6 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/lib/libstdc++.so.6
Library libm.so.6 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/lib/libm.so.6
Library libgcc_s.so.1 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/lib/libgcc_s.so.1
Library libc.so.6 found in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/lib/libc.so.6
Looking up shlibs dependency of libQtLocation.so.1 provided by 'libqtm-location'
Found libqtm-location in /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/var/lib/dpkg/info/libqtm-location.shlibs
No associated package found for /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/opt/usr/lib/libqcontactchooserdialog.so.1
Looking up shlibs dependency of libqcontactchooserdialog.so.1 provided by ''
Found nothing
dpkg-shlibdeps: failure: no dependency information found for /home/talmage/QtSDK-1.1/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/opt/usr/lib/libqcontactchooserdialog.so.1 (used by debian/panicbutton/opt/usr/bin/panicbutton).
dh_shlibdeps: command returned error code 512Am I doing something wrong or have I won a bug?
-
I won a bug! I fixed a bug!
The version of Madde in my Maemo sysroot does not correctly handle libraries that are not in /usr/lib. Maemo devices (strictly speaking the N900, the only Maemo device) like to have application libraries somewhere in /opt, such as /opt/usr/lib.
With three changes to the version of Madde in my Maemo tree, I can deploy to my N900.
Replace xdpkg with the version from "Madde in the Meego Gitorious repository":https://meego.gitorious.org/meego-developer-tools/madde/blobs/master/src/madlib/xdpkg.pl
Replace dh_shlibdeps with the one that came with QtSDK-1.1. It's in QtSDK-1.1/Madde/madbin.
Replace dpkg with the one that came with QtSDK-1.1. It's in QtSDK-1.1/Madde/madbin.
This works for me. It would be nice if I could use the version of Madde that came with QtSDK-1.1 for use with harmattan. Maybe I'll look into it one day.
-
There is a little more to it, alas. In addition to what I wrote previously, you must make changes to debian/rules and debian/control. In debian/rules, enable makeshlibs and shlibdeps by removing the '#' and by replacing any leading spaces with a tab. This will ensure that other libraries and applications can link with your library. In debian/control, ensure that you have the correct package name, section, and dependencies.
The recent QtSDK 1.1.3 with QtCreator 2.3.0 obviates my invocation of mad-admin. Instead, add a deployment step, "Deploy Debian package to sysroot".
-
hi , I have this problem,but xdpkg.pl I not found in QtSDK\Madde.
-
I am also having the same problem. I am using Qt Creator 2.3.1. I get the following error.
Any clue?
@debian/rules build
Packaging Error: Command '/home/srikanth/QtSDK/Madde/bin/mad dpkg-buildpackage -nc -uc -us' failed.Exit code: 2
Error while building project bigtest (target: Harmattan)
When executing build step 'Create Debian Package'@