<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>185684</bug_id>
          
          <creation_ts>2007-07-17 18:22 0000</creation_ts>
          <short_desc>media-libs/libart_lgpl-2.3.19-r1 tried to run a cross built binary during package build</short_desc>
          <delta_ts>2007-08-27 16:04:56 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>2007.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>eddy.petrisor@gmail.com</reporter>
          <assigned_to>gnome@gentoo.org</assigned_to>
          <cc>eddy.petrisor@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>eddy.petrisor@gmail.com</who>
            <bug_when>2007-07-17 18:22:00 0000</bug_when>
            <thetext>When trying to xmerge for arm-softfloat-linux-uclibc I found out that during the build process the build system tried to run a target binary.

Of course, that fails.



xmerge -v media-libs/libart_lgpl

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] media-libs/libart_lgpl-2.3.19-r1 to /usr/arm-softfloat-linux-uclibc/ USE=&quot;-debug&quot; 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB

&gt;&gt;&gt; Verifying ebuild Manifests...

&gt;&gt;&gt; Emerging (1 of 1) media-libs/libart_lgpl-2.3.19-r1 to /usr/arm-softfloat-linux-uclibc/
 * libart_lgpl-2.3.19.tar.bz2 RMD160 ;-) ...                                                                          [ ok ] * libart_lgpl-2.3.19.tar.bz2 SHA1 ;-) ...                                                                            [ ok ] * libart_lgpl-2.3.19.tar.bz2 SHA256 ;-) ...                                                                          [ ok ] * libart_lgpl-2.3.19.tar.bz2 size ;-) ...                                                                            [ ok ] * checking ebuild checksums ;-) ...                                                                                  [ ok ] * checking auxfile checksums ;-) ...                                                                                 [ ok ] * checking miscfile checksums ;-) ...                                                                                [ ok ] * checking libart_lgpl-2.3.19.tar.bz2 ;-) ...                                                                        [ ok ]&gt;&gt;&gt; Unpacking source...
&gt;&gt;&gt; Unpacking libart_lgpl-2.3.19.tar.bz2 to /var/tmp/portage/media-libs/libart_lgpl-2.3.19-r1/work


./configure --prefix=/usr --host=arm-softfloat-linux-uclibc --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i486-pc-linux-gnu

checking for arm-softfloat-linux-uclibc-gcc... arm-softfloat-linux-uclibc-gcc

checking whether arm-softfloat-linux-uclibc-gcc accepts -g... yes
checking for arm-softfloat-linux-uclibc-gcc option to accept ISO C89... none needed


checking build system type... i486-pc-linux-gnu
checking host system type... arm-softfloat-linux-uclibc


checking for arm-softfloat-linux-uclibc-g++... arm-softfloat-linux-uclibc-g++
checking whether we are using the GNU C++ compiler... yes


checking for gfortran... gfortran
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org.


configure: creating ./config.status
config.status: creating libart-features.h
config.status: creating Makefile
config.status: creating libart-2.0.pc
config.status: creating libart-2.0-uninstalled.pc
config.status: creating libart-zip
config.status: creating libart-config
config.status: creating config.h
config.status: executing depfiles commands
arm-softfloat-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I. -I. -DLIBART_COMPILATION    -Os -pipe -Wall -Wmissing-prototypes -MT gen_art_config.o -MD -MP -MF .deps/gen_art_config.Tpo -c -o gen_art_config.o gen_art_config.c
mv -f .deps/gen_art_config.Tpo .deps/gen_art_config.Po
/bin/sh ./libtool --tag=CC   --mode=link arm-softfloat-linux-uclibc-gcc  -Os -pipe -Wall -Wmissing-prototypes   -o gen_art_config gen_art_config.o
mkdir .libs
arm-softfloat-linux-uclibc-gcc -Os -pipe -Wall -Wmissing-prototypes -o gen_art_config gen_art_config.o
./gen_art_config &gt; art_config.h
/bin/sh: ./gen_art_config: cannot execute binary file
make: *** [art_config.h] Error 126

!!! ERROR: media-libs/libart_lgpl-2.3.19-r1 failed.
Call stack:
  ebuild.sh, line 1621:   Called dyn_compile
  ebuild.sh, line 973:   Called qa_call &apos;src_compile&apos;
  ebuild.sh, line 44:   Called src_compile
  ebuild.sh, line 1311:   Called gnome2_src_compile
  gnome2.eclass, line 71:   Called die

!!! compile failure
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at &apos;/var/tmp/portage/media-libs/libart_lgpl-2.3.19-r1/temp/build.log&apos;.




file /var/tmp/portage/media-libs/libart_lgpl-2.3.19-r1/work/libart_lgpl-2.3.19/gen_art_config
/var/tmp/portage/media-libs/libart_lgpl-2.3.19-r1/work/libart_lgpl-2.3.19/gen_art_config: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), not stripped</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-07-26 16:13:15 0000</bug_when>
            <thetext>Do you have libart_lgpl installed on the host system?

It&apos;s entirely possible that it cannot be cross compiled sanely, but we&apos;ll start with the above.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eddy.petrisor@gmail.com</who>
            <bug_when>2007-08-03 10:55:00 0000</bug_when>
            <thetext>I looked in the make file; it tries to compile a small code that allows detection of the types on the target.

Of course, the compilation of that file succedes, but that binary can&apos;t be ran.

libart_lgpl should instead use inttypes.h to detect those types.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-08-03 18:31:27 0000</bug_when>
            <thetext>You should probably open a bug upstream, then, and post the URL here, so we can track it?  RESOLVED FIXED doesn&apos;t seem to be the correct resolution for this...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eva@gentoo.org</who>
            <bug_when>2007-08-03 22:09:00 0000</bug_when>
            <thetext>I agree this bug can stay open until the real fix is available. It&apos;s not like we are greedy on closing bug rank :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eddy.petrisor@gmail.com</who>
            <bug_when>2007-08-16 19:12:06 0000</bug_when>
            <thetext>Created an attachment (id=128318)
patch for upstream cross building problem (non-bootstrapped source)

This is the patch that should end up in upstream since it touches only the .am file from which the Makefile.in file is generated.

Of course, it could be cleaner and the art_config.h file could be avoided entirely, but it seems that google returns results when looking for &apos;include art_config.h&apos;; Thus the patch.

I submitted it upstream: http://bugzilla.gnome.org/show_bug.cgi?id=467416
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eddy.petrisor@gmail.com</who>
            <bug_when>2007-08-16 19:15:42 0000</bug_when>
            <thetext>Created an attachment (id=128320)
patch for the bootstrapped source

Same as before, but it extends the changes over Makefile.in, too (which is a by product of Makefile.am) to allow correct cross building on gentoo</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eddy.petrisor@gmail.com</who>
            <bug_when>2007-08-16 19:18:05 0000</bug_when>
            <thetext>(From update of attachment 128320)
I cross compile succesfully the package with this patch applied </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-08-20 18:17:02 0000</bug_when>
            <thetext>I&apos;ve committed an alternative.  Can you try it out?  It should have the same effect as your patch.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eddy.petrisor@gmail.com</who>
            <bug_when>2007-08-20 22:56:43 0000</bug_when>
            <thetext>(In reply to comment #8)
&gt; I&apos;ve committed an alternative.  Can you try it out?  It should have the same
&gt; effect as your patch.
&gt; 

It can&apos;t have the same effect as long as you did not define art_u* based on stdint.h definitions.

The removed definitions are a side benefit of the patch, but not the main target of the patch.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-08-24 21:03:28 0000</bug_when>
            <thetext>&lt;sigh&gt;  I can&apos;t believe I missed that.  I must have been fooled by the endings on the types.

I committed another try.  Can you look?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eddy.petrisor@gmail.com</who>
            <bug_when>2007-08-25 00:28:31 0000</bug_when>
            <thetext>(In reply to comment #10)
&gt; &lt;sigh&gt;  I can&apos;t believe I missed that.  I must have been fooled by the endings
&gt; on the types.
&gt; 
&gt; I committed another try.  Can you look?

That is basically a clean up version of the initial patch I sent. It should be ok (the package xmerged). I haven&apos;t thoroughly checked the Makefile, but I guess xmerge would have barfed if something was wrong :-) .</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dang@gentoo.org</who>
            <bug_when>2007-08-27 16:04:56 0000</bug_when>
            <thetext>It&apos;s slightly different; I got rid of the generation entirely, rather than copying over like you did.  Thanks for testing.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>128318</attachid>
            <date>2007-08-16 19:12 0000</date>
            <desc>patch for upstream cross building problem (non-bootstrapped source)</desc>
            <filename>libart_lgpl_cross.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIE1ha2VmaWxlLmFtCTIwMDctMDgtMTYgMTY6MDg6MjkuMDAwMDAwMDAwICswMDAwCisrKyBN
YWtlZmlsZS5hbQkyMDA3LTA4LTE2IDE3OjQ0OjEwLjAwMDAwMDAwMCArMDAwMApAQCAtNiw3ICs2
LDcgQEAKIEJVSUxUX1NPVVJDRVMgPSBhcnRfY29uZmlnLmgKIAogYXJ0X2NvbmZpZy5oOglnZW5f
YXJ0X2NvbmZpZyQoRVhFRVhUKQotCS4vZ2VuX2FydF9jb25maWcgPiBhcnRfY29uZmlnLmgKKwlj
cCBhcnRfY29uZmlnLmgua2VlcCBhcnRfY29uZmlnLmgKIAogRVhUUkFfRElTVCA9IAkJCVwKIAls
aWJhcnQuZGVmCQlcCi0tLSBhcnRfY29uZmlnLmgua2VlcAkxOTcwLTAxLTAxIDAwOjAwOjAwLjAw
MDAwMDAwMCArMDAwMAorKysgYXJ0X2NvbmZpZy5oLmtlZXAJMjAwNy0wOC0xNiAxNzo1MzoyNS4w
MDAwMDAwMDAgKzAwMDAKQEAgLTAsMCArMSwxNCBAQAorI2luY2x1ZGUgPHN0ZGludC5oPgorCisv
KiBpdCBsb29rcyBsaWtlIHRoZXNlIGRlZmluaXRpb25zIGFyZSBub3QgdXNlZCBhdCBhbGwgKi8K
Ky8qCisjZGVmaW5lIEFSVF9TSVpFT0ZfQ0hBUiAxCisjZGVmaW5lIEFSVF9TSVpFT0ZfU0hPUlQg
MgorI2RlZmluZSBBUlRfU0laRU9GX0lOVCA0CisjZGVmaW5lIEFSVF9TSVpFT0ZfTE9ORyA0Cisq
LworCisKK3R5cGVkZWYgdWludDhfdCBhcnRfdTg7Cit0eXBlZGVmIHVpbnQxNl90IGFydF91MTY7
Cit0eXBlZGVmIHVpbnQzMl90IGFydF91MzI7Cg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>128320</attachid>
            <date>2007-08-16 19:15 0000</date>
            <desc>patch for the bootstrapped source</desc>
            <filename>libart_lgpl-2.3.19-cross.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIE1ha2VmaWxlLmluCTIwMDctMDgtMTYgMTg6MDQ6MTcuMDAwMDAwMDAwICswMDAwCisrKyBN
YWtlZmlsZS5pbgkyMDA3LTA4LTE2IDE4OjA3OjAyLjAwMDAwMDAwMCArMDAwMApAQCAtOTE2LDcg
KzkxNiw3IEBACiAKIAogYXJ0X2NvbmZpZy5oOglnZW5fYXJ0X2NvbmZpZyQoRVhFRVhUKQotCS4v
Z2VuX2FydF9jb25maWcgPiBhcnRfY29uZmlnLmgKKwljcCBhcnRfY29uZmlnLmgua2VlcCBhcnRf
Y29uZmlnLmgKIAogQE9T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