<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Nikolaus,<br>
</p>
<div class="moz-cite-prefix">Am 12.10.2017 um 14:34 schrieb H.
Nikolaus Schaller:<br>
</div>
<blockquote type="cite"
cite="mid:E3B55DBB-F264-4BB6-9C06-37CCCEF85830@goldelico.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Hi Josua,
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">Am 12.10.2017 um 13:41 schrieb Josua Mayer
<<a href="mailto:josua.mayer97@gmail.com" class=""
moz-do-not-send="true">josua.mayer97@gmail.com</a>>:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<blockquote type="cite"
cite="mid:C68D7294-6A3F-4B56-8285-5B691FA63F66@goldelico.com"
class="">
<blockquote type="cite" class="">
<blockquote type="cite" class="">
<pre class="" wrap="">Hmm, it is the final step before packaging... *not* the linker linking
together binaries, so building seems not to fail, just putting it
into a package.
</pre>
</blockquote>
</blockquote>
</blockquote>
This is how I understand the purpose of dpkg-shlibdeps:<br
class="">
First it finds *all* executables and shared libraries.<br
class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
I also think so.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> For each
of those it then checks if the dynamic dependencies are
available in system search-paths (and possibly in
debian/<install-dir>/<system
search-paths>,).<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>For that it seems to use ldd.</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> Now of
shared libraries are installd in non-standard locations
such as /opt/..., we need to pass those to
dpkg-shlibdeps with -l<path>.<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
Indeed.</div>
<div><br class="">
</div>
<div>Seems to exist and specifyarchicture/build dependent path:</div>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><a
href="http://git.goldelico.com/?p=gta04-qtmoko.git;a=blob;f=debian/rules;h=70a93c3de1f333b1abcd5feaa845bc5579950681;hb=39a9a35c951e0a9d77259ca5dee712b46106cdfb#l199"
class="" moz-do-not-send="true">http://git.goldelico.com/?p=gta04-qtmoko.git;a=blob;f=debian/rules;h=70a93c3de1f333b1abcd5feaa845bc5579950681;hb=39a9a35c951e0a9d77259ca5dee712b46106cdfb#l199</a></div>
<div><br class="">
</div>
<div>
<div class="pre" style="font-family: monospace; font-size: small; white-space: pre;">dh_shlibdeps -l$(CURDIR)/debian/qtmoko-$(word 1,$(QTMOKO_DEVICES))/opt/qtmoko/lib:/usr/$(DEB_HOST_MULTIARCH)/lib -- $(foreach device,$(QTMOKO_DEVICES),-xqtmoko-$(device))</div>
</div>
<div><br class="">
</div>
<div>That makes the command look like</div>
<div><br class="">
</div>
<div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>dpkg-shlibdeps
-Tdebian/qtmoko-neo.substvars -xqtmoko-gta04 -xqtmoko-neo
-xqtmoko-pc
debian/qtmoko-neo/opt/qtmoko/qt_plugins/bearer/libqgenericbearer.so
debian/qtmoko-neo/opt/qtmoko/qt_plugins/bearer/libqconnmanbearer.so ...</div>
<div><br class="">
</div>
<div>(especially the -x arguments and the
debian/qrmoko-*/opt/qtmoko things.</div>
</div>
</div>
</blockquote>
So error-log.txt line 155044 reads:<br>
dh_shlibdeps
-l/src/qtmoko-master/debian/qtmoko-gta04/opt/qtmoko/lib:/usr/i386-linux-gnu/lib
\<br>
-- -xqtmoko-gta04 -xqtmoko-neo -xqtmoko-pc<br>
Notice how it only passes debian/qtmoko-gta04 as search-path to
shlibdeps!<br>
I believe this is what we need to fix: Either add all build-flavours
to the search path,<br>
*or* call shlibdeps individually for every package
(qtmok-neo,qtmoko-pc,...).<br>
The latter would look similar to this:<br>
dh_shlibdeps -l<span class="pl-s">$(<span class="pl-c1">CURDIR</span>)</span>/debian/qtmoko-gta04/opt/qtmoko/lib
-pqtmoko-gta04<br>
For a full example, see this rules file where I made heavy use of
this feature:<br>
<a class="moz-txt-link-freetext" href="https://github.com/mxOBS/deb-pkg_gpu-viv-bin/blob/stable/debian/rules#L68">https://github.com/mxOBS/deb-pkg_gpu-viv-bin/blob/stable/debian/rules#L68</a><br>
<blockquote type="cite"
cite="mid:E3B55DBB-F264-4BB6-9C06-37CCCEF85830@goldelico.com">
<div class="">
<div>
<div><br class="">
</div>
<div>Note that the libamr.so.1 file exists exactly in the
library path that is passed:</div>
<div><br class="">
</div>
<div><span style="font-family: Menlo-Regular; font-size:
11px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>debian/qtmoko-neo/opt/qtmoko/lib/libamr.so.1</span></div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> Finally,
it checks for each dependency, what package is providing
that file. This is where the shlibs file comes into
play. For example this can be used to handle
dependencies on packages that are not installed on the
build-host.<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
Yes. But here, the problematic libs are listed side-by-side
with unproblematic ones.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> <br
class="">
Now I know of two reasons that can lead to above error:<br
class="">
a) library file is not in one of the paths where
dpkg-shlibdeps searches<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
That is what I thought - until I found that it does not
complain about other libs in the same directory.</div>
<div><br class="">
</div>
<div>Or there is some magic to copy files around which fails
here.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> b) library
file has been skipped for a reason. That reason might
appear hundreds of lines earlier in the build log.<br
class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
Ok. So it might exist but missing somewhere in the dependency
graph.</div>
<div><br class="">
</div>
<div>There is one thing that is not exactly clear to me:</div>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>how
the build-gta04, build-neo, and build-pc things relate.</div>
<div><br class="">
</div>
<div>Although the error comes when qtmoko-neo is being built -
at least I assume that from the error message</div>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>dpkg-shlibdeps:
error: couldn't find library libamr.so.1 needed by
debian/qtmoko-neo/opt/qtmoko/plugins/codecs/libamrrecordplugin.so
(ELF format: 'elf32-i386'; RPATH: '')</div>
<div><br class="">
</div>
<div>there is a small difference in the three subdirectories. I
mean this:</div>
<div><br class="">
</div>
<div><span style="font-family: Menlo-Regular; font-size: 11px;"
class="">root@debian:/qtmoko-wheezy-build/src# find . -name
libamr.so.1 -o -name libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./build-neo/image/lib/libamr.so.1</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./build-neo/image/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./build-neo/sdk/lib/libamr.so.1</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./build-neo/sdk/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./build-gta04/image/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./build-gta04/sdk/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./qtmoko-master/debian/qtmoko-pc/opt/qtmoko/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./qtmoko-master/debian/qtmoko-neo/opt/qtmoko/lib/libamr.so.1</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./qtmoko-master/debian/qtmoko-neo/opt/qtmoko/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./qtmoko-master/debian/tmp-pc/opt/qtmoko/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./qtmoko-master/debian/tmp-gta04/opt/qtmoko/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./qtmoko-master/debian/tmp-neo/opt/qtmoko/lib/libamr.so.1</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./qtmoko-master/debian/tmp-neo/opt/qtmoko/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./qtmoko-master/debian/qtmoko-gta04/opt/qtmoko/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./build-pc/image/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">./build-pc/sdk/lib/libqtopiabase.so.4</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<span style="font-family: Menlo-Regular; font-size: 11px;"
class="">root@debian:/qtmoko-wheezy-build/src#</span><br
style="font-family: Menlo-Regular; font-size: 11px;"
class="">
<br style="font-family: Menlo-Regular; font-size: 11px;"
class="">
</div>
<div>As we can see there is a <span style="font-family:
Menlo-Regular; font-size: 11px;" class="">libqtopiabase.so.4</span><span
style="font-family: Menlo-Regular; font-size: 11px;"
class=""> </span>in all three.</div>
<div>But there is no <span style="font-family: Menlo-Regular;
font-size: 11px;" class="">libamr.so.1</span> in build-pc
and build-gta04.</div>
<div><br class="">
</div>
<div>So we only have</div>
<div><span style="font-family: Menlo-Regular; font-size: 11px;"
class=""><span class="Apple-tab-span" style="white-space:pre"> </span>debian/qtmoko-neo/opt/qtmoko/lib/libamr.so.1</span></div>
<div><span style="font-family: Menlo-Regular; font-size: 11px;"
class="">but not</span></div>
<div><span style="font-family: Menlo-Regular; font-size: 11px;"
class=""><span class="Apple-tab-span" style="white-space:pre"> </span>debian/qtmoko-gta04/opt/qtmoko/lib/libamr.so.1</span></div>
</div>
</blockquote>
^^^<br>
<blockquote type="cite"
cite="mid:E3B55DBB-F264-4BB6-9C06-37CCCEF85830@goldelico.com">
<div class="">
<div><span style="font-family: Menlo-Regular; font-size: 11px;"
class=""><span class="Apple-tab-span" style="white-space:pre"> </span>debian/qtmoko-pc/opt/qtmoko/lib/libamr.so.1</span></div>
<div><br class="">
</div>
<div>BTW: I just started to wonder why the qtmoko-neo library is
"ELF format: 'elf32-i386'"?</div>
</div>
</blockquote>
Looks like it was an x86 build.<br>
<blockquote type="cite"
cite="mid:E3B55DBB-F264-4BB6-9C06-37CCCEF85830@goldelico.com">
<div class="">
<div><br class="">
</div>
<div>So there could be some mixup with multiple architectures,
cross-compiler selection and</div>
<div>maybe all <span style="font-family: Menlo-Regular;
font-size: 11px;" class="">libamr.so.1</span> objects are
overwritten by the next architecture? Maybe some</div>
<div>architecture dependent path setup gets wrong.</div>
<div><br class="">
</div>
<div>
<blockquote type="cite" class="">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> Maybe
someone could submit the huge build log? </div>
</div>
</blockquote>
<div><br class="">
</div>
<div>I have uploaded the last complete build log (incl. chroot
stuff) to</div>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><a
href="http://download.goldelico.com/qtmoko2/files/"
class="" moz-do-not-send="true">http://download.goldelico.com/qtmoko2/files/</a></div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">However it
might be necessary to add<br class="">
<span class="pl-k">export</span> <span
class="pl-smi">DH_VERBOSE</span>=1<br class="">
near the top of debian/rules.<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
I'll try on next build...</div>
<div><br class="">
</div>
<div>BR and thanks,</div>
<div>Nikolaus</div>
<br>
</div>
</blockquote>
br<br>
Josua Mayer<br>
</body>
</html>