<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>2347</bug_id>
          
          <creation_ts>2012-04-19 10:23:46 +0000</creation_ts>
          <short_desc>libtool library files broken</short_desc>
          <delta_ts>2012-04-23 20:48:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>1.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Wolfgang Denk">wd</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>agust</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20716</commentid>
    <comment_count>0</comment_count>
    <who name="Wolfgang Denk">wd</who>
    <bug_when>2012-04-19 10:23:46 +0000</bug_when>
    <thetext>Building autotools based packages on the target and using
core-image-*-sdk as the root file system fails. In the libtool
library files each path in the dependency_libs list is prefixed by
&quot;=&quot;. This causes linking issues like:

...
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -Wall \ 
-o libgstcoralpfbsink.la -rpath /usr/local/lib/gstreamer-0.10 -module \
-avoid-version -export-symbols-regex _*\(gst_\|Gst\|GST_\).* \
libgstcoralpfbsink_la-coralpfbsink.lo libgstcoralpfbsink_la-log.lo \
-pthread -lgstbase-0.10 -lgstcontroller-0.10 -lgstreamer-0.10 \
-lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0 \
-lpciaccess
grep: =/usr/lib/libgobject-2.0.la: No such file or directory
/bin/sed: can&apos;t read =/usr/lib/libgobject-2.0.la: No such file or directory
libtool: link: `=/usr/lib/libgobject-2.0.la&apos; is not a valid libtool archive
make[2]: *** [libgstcoralpfbsink.la] Error 1
make[2]: Leaving directory `/home/root/gst-coralpfbsink-0.1.2/src&apos;
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/root/gst-coralpfbsink-0.1.2&apos;
make: *** [all] Error 2


This problem is still present with 1.2_M4.rc4 ; see for example the
latest results of the autobuilder:

$ wget http://autobuilder.yoctoproject.org/pub/nightly/CURRENT/machines/beagleboard/core-image-sato-sdk-beagleboard-20120418183642.rootfs.tar.bz2
$ sudo tar xpf core-image-sato-sdk-beagleboard-20120418183642.rootfs.tar.bz2
$ cd usr/lib
$ grep =/usr *.la | head -10
libacl.la:dependency_libs=&apos; =/usr/lib/libattr.la&apos;
libassuan.la:dependency_libs=&apos; -L=/usr/lib =/usr/lib/libgpg-error.la&apos;
libatk-1.0.la:dependency_libs=&apos; =/usr/lib/libgobject-2.0.la =/usr/lib/libgthread-2.0.la =/usr/lib/libffi.la =/usr/lib/libffi.la =/usr/lib/libgthread-2.0.la =/usr/lib/libglib-2.0.la -lpthread =/usr/lib/libglib-2.0.la -lrt&apos;
libaugeas.la:dependency_libs=&apos; =/usr/lib/libfa.la =/usr/lib/libxml2.la -ldl -lz -lm&apos;
libavahi-client.la:dependency_libs=&apos; =/usr/lib/libdbus-1.la -lpthread -lrt =/usr/lib/libavahi-common.la -ldl&apos;
libavahi-core.la:dependency_libs=&apos; =/usr/lib/libavahi-common.la&apos;
libavahi-glib.la:dependency_libs=&apos; =/usr/lib/libavahi-common.la =/usr/lib/libglib-2.0.la -lrt&apos;
libavahi-gobject.la:dependency_libs=&apos; =/usr/lib/libavahi-client.la =/usr/lib/libdbus-1.la -ldl =/usr/lib/libavahi-glib.la =/usr/lib/libavahi-common.la =/usr/lib/libgobject-2.0.la =/usr/lib/libgthread-2.0.la =/usr/lib/libffi.la =/usr/lib/libffi.la =/usr/lib/libgthread-2.0.la =/usr/lib/libglib-2.0.la -lpthread =/usr/lib/libglib-2.0.la -lrt&apos;
libblkid.la:dependency_libs=&apos; =/usr/lib/libuuid.la&apos;
libcairo-gobject.la:dependency_libs=&apos; =/usr/lib/libcairo.la -L=/usr/lib =/usr/lib/libpixman-1.la =/usr/lib/libfontconfig.la =/usr/lib/libfreetype.la =/usr/lib/libexpat.la =/usr/lib/libexpat.la =/usr/lib/libfreetype.la =/usr/lib/libpng12.la =/usr/lib/libXrender.la =/usr/lib/libX11.la =/usr/lib/libX11.la =/usr/lib/libxcb.la =/usr/lib/libxcb.la =/usr/lib/libXau.la =/usr/lib/libXdmcp.la =/usr/lib/libXau.la =/usr/lib/libXdmcp.la -ldl -lz =/usr/lib/libgobject-2.0.la =/usr/lib/libgthread-2.0.la =/usr/lib/libffi.la =/usr/lib/libffi.la =/usr/lib/libgthread-2.0.la =/usr/lib/libglib-2.0.la -lpthread =/usr/lib/libglib-2.0.la -lrt -lm&apos;


This cannot work.

As a quick-fix one can run the following command on the target:

	# cd /usr/lib
	# for file in `ls *.la`;do sed -i.orig -e &quot;s/=\/usr/\/usr/g&quot; $file;done

But obviously this should be fixed in the build environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20721</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-04-19 14:33:32 +0000</bug_when>
    <thetext>The libtool archive files themselves appear to be correct based on your grep.

Something is wrong with the libtool on the target.  The &quot;=&quot; syntax is correct, the target libtool for some reason is not evaluating it.  

Two possibilities come to mind.  The first is you are compiling something on the target that included libtool preinstalled.  If that is the case, you need to run libtoolize --copy --force to ensure that the correct version of libtool is used.

The other option is that libtool on the target only evaluates the &quot;=&quot; syntax when a --sysroot is passed?  If so, it seems like it would be reasonable to set it to &quot;/&quot; if no --sysroot= is set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20738</commentid>
    <comment_count>2</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2012-04-19 22:04:32 +0000</bug_when>
    <thetext>Please look at Mark&apos;s comments regarding running libtoolize.  We expect people to use libtool that support sysroot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20825</commentid>
    <comment_count>3</comment_count>
    <who name="Anatolij Gustschin">agust</who>
    <bug_when>2012-04-23 20:48:52 +0000</bug_when>
    <thetext>The source package didn&apos;t contain libtool preinstalled, but ltmain.sh, so the
generated libtool didn&apos;t evaluate this &quot;=&quot; syntax.

Running autoreconf --force --install (which runs &apos;libtoolize --copy --force&apos; among other things) fixes the issue.

Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>