On Mar 11, 2013, at 3:32 AM, Matthieu CRAPET matthieu.cra...@ingenico.com
wrote:
Dear all,
I have some issue regarding Libtool and my external toolchain (located in
/opt)
I've created a basic C++ (STL) library using autotools.
My configure.ac is very simple:
code
AC_PREREQ([2.60])
AC_INIT([exemple], [1.2.3], [t...@exemple.org])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
LT_PREREQ([2.4])
LT_INIT
dnl Check for progs
AC_PROG_CXX
AC_SUBST([LIBEXEMPLE_SO_VERSION], [1:2:3])
AC_OUTPUT([
Makefile
])
/code
Then I've made a basic OE recipe to build it:
code
SUMMARY = Libtool simple exemple
LICENSE = MIT
LIC_FILES_CHKSUM = \
file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
PR = r1
SRC_URI = git://xx.xx.xx.xx/libexemple.git
SRCREV = HEAD
S = ${WORKDIR}/git
inherit autotools
/code
Works fine but resulting .la files (in libexemple-dev package) contains:
dependency_libs='/opt/...-linux-gnueabi/lib/libstdc++.la'
somewhere I think lib tool is not honoring the sys root. Figure that out.
This is bad because if another program (using libtool) depends on libexample,
libtool will search
libstdc++ in ${STAGING_DIR_HOST}/opt/...-linux-gnueabi/lib/libstdc++.la
(instead of ${STAGING_DIR_HOST}/lib/libstdc++.la).
I would like that dependency_libs points to openembedded sysroot.
Note: Toolchain's .la files located in ${STAGING_DIR_HOST} are correct (and
not referencing /opt).
I am wondering what is the best workaround for this. For now I’ve patched my
recipe:
code
do_compile_prepend () {
cd ${S}
sed -i -e
'/^compiler_lib_search_dirs=/s/.*/compiler_lib_search_dirs=/'
${HOST_SYS}-libtool
sed -i -e
'/^compiler_lib_search_path=/s/.*/compiler_lib_search_path=/'
${HOST_SYS}-libtool
sed -i -e
'/^sys_lib_search_path_spec=/s/.*/sys_lib_search_path_spec=/'
${HOST_SYS}-libtool
}
/code
Ugly but works because libstdc++ can be found (using --sysroot argument). But
dependency_libs is empty is .la file.
In real life: this is libglu and glew.
Regards,
Matthieu Crapet
PS: exemple is french word for example ;)
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core