<?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>154</bug_id>
          
          <creation_ts>2010-07-28 12:44:34 +0000</creation_ts>
          <short_desc>libtool has incorrect paths embedded</short_desc>
          <delta_ts>2011-02-22 08:36:22 +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>core</component>
          <version>1.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>julie.n.fleischer</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>nitin.a.kamble</cc>
    
    <cc>sgw</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>9122</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-07-28 12:44:34 +0000</bug_when>
    <thetext>running &quot;libtool&quot; in a poky-image-sdk results in /usr/bin/sed not found. Its finding and using build system paths instead of those for the target device.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9389</commentid>
    <comment_count>1</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2010-08-25 14:46:26 +0000</bug_when>
    <thetext>What are the steps to reproduce?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9434</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-08-26 09:04:57 +0000</bug_when>
    <thetext>If you boot an sdk image and run &quot;libtool&quot; from the bash prompt you will see this error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9448</commentid>
    <comment_count>3</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2010-08-27 11:19:12 +0000</bug_when>
    <thetext>I tried running libtoolize inside the sdkimage, and I did not see the issue.


root@qemux86:~/sudoku-savant-1.3# libtoolize 
libtoolize: putting macros in `m4&apos;.
libtoolize: You should add the contents of `m4/libtool.m4&apos; to `aclocal.m4&apos;.
libtoolize: You should add the contents of `m4/ltoptions.m4&apos; to `aclocal.m4&apos;.
libtoolize: You should add the contents of `m4/ltsugar.m4&apos; to `aclocal.m4&apos;.
libtoolize: You should add the contents of `m4/ltversion.m4&apos; to `aclocal.m4&apos;.
libtoolize: You should add the contents of `m4/lt~obsolete.m4&apos; to `aclocal.m4&apos;.
libtoolize: Remember to add `LT_INIT&apos; to configure.in.
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])&apos; to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9634</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2010-09-07 18:38:42 +0000</bug_when>
    <thetext>Can you verify if this is fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9680</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-09-08 16:04:35 +0000</bug_when>
    <thetext>ok, I&apos;ve tracked this one down a bit. To reproduce:

bitbake libtool -c clean
create a symlink on the build system from /usr/bin/sed to /bin/sed
bitbake libtool

then grep work/*/libtool-2.2.10-r1/image/ for &quot;/usr/bin/sed&quot; and you will see a match in ltmain.sh and usr/bin/libtoolize itself.

This should always be &quot;/bin/sed&quot; regardless of whether /usr/bin/sed exists on the build machine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9706</commentid>
    <comment_count>6</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2010-09-09 12:24:22 +0000</bug_when>
    <thetext>I tried 
 ln -s /usr/bin/sed /bin/sed
and also this after mving /bin/sed to /usr/bin/sed
 ln -s /bin/sed /usr/bin/sed

Both times found this setting of SED in the libtool scripts

$cd /tmp/work/i586-poky-linux/libtool-2.2.10-r1/image/

$ grep -r /bin/sed .
./usr/bin/libtoolize:: ${SED=&quot;/bin/sed&quot;}
./usr/bin/libtool:SED=&quot;/bin/sed&quot;
./usr/bin/libtool:: ${SED=&quot;/bin/sed&quot;}
./usr/share/aclocal/libtool.m4:# Add /usr/xpg4/bin/sed as it is typically found on Solaris
./usr/share/aclocal/libtool.m4:# along with /bin/sed that truncates output.
./usr/share/aclocal/libtool.m4:for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
./usr/share/libtool/config/ltmain.sh:: ${SED=&quot;/bin/sed&quot;}


So still could not reproduce the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9981</commentid>
    <comment_count>7</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2010-09-28 09:00:53 +0000</bug_when>
    <thetext>can&apos;t reproduce.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11545</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2011-01-27 14:56:15 +0000</bug_when>
    <thetext>I can confirm that this does not occur with the latest master. I cannot say with any certainty that things were fixed with my libtool sysroot changes, but grepping for references to &quot;/sed&quot; in the image workdir for libtool only shows /bin/sed even when built with a host symlink of /usr/bin/sed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11546</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-01-27 15:12:31 +0000</bug_when>
    <thetext>This does still exist.

$ ls /bin/sed* -la
-rwxr-xr-x 1 root root 69088 2010-05-10 09:55 /bin/sed
$ ls /usr/bin/sed* -la
lrwxrwxrwx 1 root root 8 2011-01-27 23:05 /usr/bin/sed -&gt; /bin/sed
$ which sed
/usr/bin/sed

$ bitbake libtool -c cleanall
$ bitbake libtool
$ grep bin/sed tmp/work/*/libtool-2.4*/image/ -r
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/bin/libtoolize:: ${SED=&quot;/usr/bin/sed&quot;}
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/share/libtool/config/ltmain.sh:: ${SED=&quot;/usr/bin/sed&quot;}
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/share/aclocal/libtool.m4:# Add /usr/xpg4/bin/sed as it is typically found on Solaris
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/share/aclocal/libtool.m4:# along with /bin/sed that truncates output.
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/share/aclocal/libtool.m4:for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do

# rm /usr/bin/sed
$ which sed
/bin/sed

$ bitbake libtool -c cleanall
$ bitbake libtool
$ grep bin/sed tmp/work/*/libtool-2.4*/image/ -r
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/bin/libtoolize:: ${SED=&quot;/bin/sed&quot;}
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/share/libtool/config/ltmain.sh:: ${SED=&quot;/bin/sed&quot;}
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/share/aclocal/libtool.m4:# Add /usr/xpg4/bin/sed as it is typically found on Solaris
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/share/aclocal/libtool.m4:# along with /bin/sed that truncates output.
tmp/work/core2-poky-linux/libtool-2.4-r1/image/usr/share/aclocal/libtool.m4:for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do

The key problem being there is a hardcoded reference in /usr/share/libtool/config/ltmain.sh:: ${SED=&quot;/usr/bin/sed&quot;} which is depending on the host system.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11581</commentid>
    <comment_count>10</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2011-01-28 18:44:15 +0000</bug_when>
    <thetext>My apologies for the confusion. On my Fedora 14 system, /bin is before /usr/bin in $PATH (which is an unusual default IMO). This masks the issue (and I&apos;d bet is why Nitin also was unable to reproduce this). I can now reproduce it on my Ubuntu host.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11924</commentid>
    <comment_count>11</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-02-22 03:19:01 +0000</bug_when>
    <thetext>Fixed in http://git.pokylinux.org/cgit.cgi/poky/commit/?id=489465b82be73da1d845a0cea601b41ce5ade411</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11934</commentid>
    <comment_count>12</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-02-22 08:36:22 +0000</bug_when>
    <thetext>Fixed in this commit which has gone in master
Please help verify.

commit 489465b82be73da1d845a0cea601b41ce5ade411
Author: Nitin A Kamble &lt;nitin.a.kamble@intel.com&gt;
Date:   Fri Feb 18 10:13:48 2011 -0800

    libtool: avoid absolute pathnames of general utils
    
    addded a new patch:
        libtool/avoid_absolute_paths_for_general_utils.patch
    
    This fixes [BUGID #154]
    This fixes [BUGID #734]
    
    Signed-off-by: Nitin A Kamble &lt;nitin.a.kamble@intel.com&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>