<?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>604</bug_id>
          
          <creation_ts>2010-12-20 01:31:44 +0000</creation_ts>
          <short_desc>[toolchain]Build c program failed with arm toolchain</short_desc>
          <delta_ts>2011-02-20 21:12:42 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.0 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>jiajun.xu</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>liang.li2</cc>
    
    <cc>liangliang.wang</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11241</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2010-12-20 01:31:44 +0000</bug_when>
    <thetext>Testing Env:    
Host: Ubuntu 10.10 x86_64
Kernel: 2.6.35-23-generic

With the arm sdk toolchain from autobuilder,
http://autobuilder.pokylinux.org/milestone/CURRENT/toolchain/x86_64/poky-eglibc-x86_64-arm-toolchain-sdk-0.9+snapshot-20101219.tar.bz2 , it build c program failed.


###################
# sudo tar xjvf poky-eglibc-x86_64-arm-toolchain-sdk-0.9+snapshot-20101219.tar.bz2 -C /

# source /opt/poky/0.9+snapshot-20101219/environment-setup-armv5te-poky-linux-gnueabi

# which ${CC}
/opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc

# ${CC} test.c -o test
as: unrecognized option &apos;-mfloat-abi=soft&apos;

###################

Look like it can not find the cross tool &apos;as&apos;, and use the host&apos;s &apos;as&apos; instead.

There are incorrect sysmbolic links in directory /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.5.1/
##################
#ls -l /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.5.1/

lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 ar -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 as -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
-rwxr-xr-x 1 1006 users 10387653 2010-12-20 01:07 cc1
-rwxr-xr-x 1 1006 users 11216778 2010-12-20 01:07 cc1plus
-rwxr-xr-x 1 1006 users   157250 2010-12-20 01:07 collect2
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 cpp -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 g77 -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 gcc -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 gfortran -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 ld -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
-rwxr-xr-x 1 1006 users  9802170 2010-12-20 01:07 lto1
-rwxr-xr-x 1 1006 users    36747 2010-12-20 01:07 lto-wrapper
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 nm -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 objcopy -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 objdump -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 ranlib -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:09 strip -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm

####################

&apos;ar&apos; should be linked to /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar

When I modified the symbolic link manually, it can build successfully.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11242</commentid>
    <comment_count>1</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2010-12-20 01:36:50 +0000</bug_when>
    <thetext>Same issue in poky-eglibc-i586-arm-toolchain-sdk-0.9+snapshot-20101219.tar.bz2 

################################
$ls -l /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.5.1

lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 ar -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 as -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
-rwxr-xr-x 1 1006 users  9295162 2010-12-19 23:20 cc1
-rwxr-xr-x 1 1006 users 10000645 2010-12-19 23:20 cc1plus
-rwxr-xr-x 1 1006 users   123242 2010-12-19 23:20 collect2
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 cpp -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 g77 -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 gcc -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 gfortran -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 ld -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
-rwxr-xr-x 1 1006 users  8796014 2010-12-19 23:20 lto1
-rwxr-xr-x 1 1006 users    27586 2010-12-19 23:20 lto-wrapper
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 nm -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 objcopy -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 objdump -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 ranlib -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p
lrwxrwxrwx 1 1006 users      100 2010-12-20 17:32 strip -&gt; /opt/poky/0.9+snapshot-20101219/sysroots/i586-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-p

###############################</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11251</commentid>
    <comment_count>2</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2010-12-20 18:48:36 +0000</bug_when>
    <thetext>This also happened on ppc toolchain(test env just like discription of yi zhao).
Error met when  run &quot;${CC} test.c -o test&quot;:
as: unrecognized option &apos;-mppc&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11252</commentid>
    <comment_count>3</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2010-12-20 18:52:18 +0000</bug_when>
    <thetext>This also happened on ppc toolchain(test env just like discription of yi zhao).
Error met when  run &quot;${CC} test.c -o test&quot;:
as: unrecognized option &apos;-mppc&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11253</commentid>
    <comment_count>4</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2010-12-20 18:54:07 +0000</bug_when>
    <thetext>This also happened on ppc toolchain(test env just like discription of yi zhao).
Error met when  run &quot;${CC} test.c -o test&quot;:
as: unrecognized option &apos;-mppc&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11271</commentid>
    <comment_count>5</comment_count>
    <who name="Liang Wang">liangliang.wang</who>
    <bug_when>2010-12-21 20:35:51 +0000</bug_when>
    <thetext>This issue also occurs on mips-toolchain. The symbolic links are wrong under path /opt/poky/0.9+snapshot-20101219/sysroots/x86_64-pokysdk-linux/usr/libexec/mips-poky-linux/gcc/mips-poky-linux/4.5.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11281</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-12-22 06:55:31 +0000</bug_when>
    <thetext>The pathnames are truncated at exactly 100 characters which is a limitation of tar under certain circumstances.

Inspecting the .ipk files, they&apos;re correct there but when extracted by opkg during the rootfs creation process, they are truncated. This is probably an issue with the deb_extract() which calls extract_archive() in libbb in opkg.

libbb in opkg is a very old version of libbb from busybox. There is no equivalent function in modern busybox that I can immediately see. Somehow, posix style tar files need to become supported by opkg to fix this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11282</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-12-22 07:56:44 +0000</bug_when>
    <thetext>We need this fix from opkg:
http://code.google.com/p/opkg/source/detail?spec=svn588&amp;r=544</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11284</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-12-22 10:35:22 +0000</bug_when>
    <thetext>This should be fixed in http://git.pokylinux.org/cgit.cgi/poky/commit/?id=b1a2255b2d7f72ec2a9a196bfe5fc922e684446b. Wasn&apos;t a simple problem and a straight update of opkg didn&apos;t solve the problem, see the commit for more info.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11331</commentid>
    <comment_count>9</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2010-12-27 18:49:22 +0000</bug_when>
    <thetext>With the arm sdk toolchain from autobuilder,
http://autobuilder.pokylinux.org/nightly/20101225-1/toolchain/x86_64/poky-eglibc-x86_64-arm-toolchain-sdk-0.9+snapshot-20101227.tar.bz2, there is no this issue.

But g77 and gfortran are empty sysmbolic links, since there are not arm-poky-linux-gnueabi-g77 and arm-poky-linux-gnueabi-gfortran. Do we need to remove these?

####################
 
g77 -&gt; /opt/poky/0.9+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-g77

gfortran -&gt; /opt/poky/0.9+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-gfortran

####################</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11846</commentid>
    <comment_count>10</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2011-02-17 18:21:26 +0000</bug_when>
    <thetext>VERIFIED it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>