<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 17 January 2016 at 11:36, Khem Raj <span dir="ltr"><<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">db</span> is not reconfigured like usual autotools based components so it<br>
generates its own libtool, and this libtool is not equipped to do cross<br>
builds, e.g. when building using clang on musl, it misdirects linker to<br>
use libstdc++.so from build host instead of target, the reason being it<br>
does not understand sysroot.<br>
<br>
Use cross libtool instead to build the target versions<br>
<br>
Fixes errors like below<br>
<br>
| libtool: link: arm-oe-linux-musleabi-ranlib .libs/libdb-6.0.a<br>
|<br>
/a/builder/mnt/build-oe/tmp-musl/sysroots/x86_64-linux/usr/bin/arm-oe-linux-musleabi/arm-oe-linux-musleabi-ld:<br>
error: /usr/lib/libstdc++.so: incompatible target</blockquote></div><br>This fails to build on the autobuilder in poky-lsb configurations (which turns on securityflags.inc):<br><br>/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init':<br>/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/glibc/2.22-r0/git/csu/elf-init.c:87: undefined reference to `__init_array_start'<br>/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/5.3.0/ld: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS): relocation R_386_GOTOFF against undefined hidden symbol `__init_array_start' can not be used when making a shared object<br>/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/5.3.0/ld: final link failed: Bad value<br>collect2: error: ld returned 1 exit status<br>Makefile:884: recipe for target '<a href="http://libdb_cxx-6.0.la">libdb_cxx-6.0.la</a>' failed</div><div class="gmail_extra"><br></div><div class="gmail_extra">Ross</div></div>