<?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>49678</bug_id>
          
          <creation_ts>2004-05-02 01:15 0000</creation_ts>
          <short_desc>emerge emul-linux-x86-baselibs fails to set up /lib/ld-linux.so.2 link</short_desc>
          <delta_ts>2004-05-04 02:35:31 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>unspecified</version>
          <rep_platform>AMD64</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>btco@linux.ime.usp.br</reporter>
          <assigned_to>amd64@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>btco@linux.ime.usp.br</who>
            <bug_when>2004-05-02 01:15:50 0000</bug_when>
            <thetext>After emerging emul-linux-x86-baselibs I can&apos;t get any 32-bit applications to run: they complain they can&apos;t find /lib/ld-linux.so.2. The tech notes for amd64 say that a link from /lib/ld-linux.so.2 to /emul/..../ld-linux.so.2 should have been automatically created. But it is not created! Unless I create the link by hand (which I did with the command below), no 32-bit applications work. This makes it impossible to emerge some x86 binary builds (e.g. openoffice-bin) because the ebuild tries to run 32-bit applications in the process.

ln -s /emul/linux/x86/lib/ld-linux.so.2 /lib/ld-linux.so.2

After this link is created things seem to work fine.

Reproducible: Always
Steps to Reproduce:
1. emerge emul-linux-x86-baselibs
2. try to run any non-statically-linked 32-bit app (e.g. acroread)
3.

Actual Results:  
bash: appname: No such file or directory

Expected Results:  
Should have made a link from /emul/linux/x86/lib/ld-linux.so.2 to /lib/ld-
linux.so.2</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kugelfang@gentoo.org</who>
            <bug_when>2004-05-02 14:17:40 0000</bug_when>
            <thetext>phi dvandyk # ll /lib32
lrwxrwxrwx  1 root root 19 May  2 23:06 /lib32 -&gt; /emul/linux/x86/lib
phi dvandyk # ll /lib32/ld-linux.so.2
lrwxrwxrwx  1 root root 11 May  2 23:06 /lib32/ld-linux.so.2 -&gt; ld-2.3.2.so

That&apos;s the normal setup for Gentoo/amd64. It works for all 32bit binaries i know in portage.

Ah, and please provide the md5sum of emul-linux-x86-baselibs-1.1.ebuild.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>btco@linux.ime.usp.br</who>
            <bug_when>2004-05-02 18:02:23 0000</bug_when>
            <thetext>The md5sum for my emul-linux-x86-baselibs-1.1.ebuild
is 5a6f8865e339320acec47c35a9fbd1e2.

Without creating the link by hand, here&apos;s what happens:

# ACCEPT_KEYWORDS=x86 emerge acroread
[success]
# ldd /opt/Acrobat5/Reader/intellinux/bin/acroread
/usr/bin/ldd: line 1: /lib/ld-linux.so.2: No such file or directory
ldd: /lib/ld-linux.so.2 exited with unknown exit code (127)
# /opt/Acrobat5/Reader/intellinux/bin/acroread
sh: /opt/Acrobat5/Reader/intellinux/bin/acroread: No such file or directory

After I create the link by hand:

# ldd /opt/Acrobat5/Reader/intellinux/bin/acroread
        libXt.so.6 =&gt; /emul/linux/x86/usr/X11R6/lib/libXt.so.6 (0x55580000)
        libXp.so.6 =&gt; /emul/linux/x86/usr/X11R6/lib/libXp.so.6 (0x555d1000)
        libXext.so.6 =&gt; /emul/linux/x86/usr/X11R6/lib/libXext.so.6 (0x555d9000)
        libX11.so.6 =&gt; /emul/linux/x86/usr/X11R6/lib/libX11.so.6 (0x555e7000)
        libm.so.6 =&gt; /lib32/libm.so.6 (0x556ad000)
        libdl.so.2 =&gt; /lib32/libdl.so.2 (0x556cf000)
        libc.so.6 =&gt; /lib32/libc.so.6 (0x556d2000)
        libSM.so.6 =&gt; /emul/linux/x86/usr/X11R6/lib/libSM.so.6 (0x557ff000)
        libICE.so.6 =&gt; /emul/linux/x86/usr/X11R6/lib/libICE.so.6 (0x55807000)
        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x55555000)
# /opt/Acrobat5/Reader/intellinux/bin/acroread
[runs normally. Actually it complains because it doesn&apos;t like to be 
run by hand, but that shows that it is at least starting]

By the way,

# uname -a
Linux gandalf 2.6.3-gentoo-r2 #1 Wed Apr 28 14:15:50 BRT 2004 x86_64 12 GNU/Linux

It seems to me (at least that&apos;s what I always read in books, etc) is that
dynamically-linked binary applications have the string &apos;/lib/ld-linux.so.2&apos;
hard-coded into the executable, so ld-linux.so.2 must be present at that
specific location...
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kugelfang@gentoo.org</who>
            <bug_when>2004-05-03 05:32:46 0000</bug_when>
            <thetext>Ok, my fault. There _needs_ to be a /lib/ld-linux-2.so. The necessary symlinks should be created by the ebuild but that fails, cause ${D}/lib doesn&apos;t exist :-/

Fixed now. Thanks a lot Bruno.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>btco@linux.ime.usp.br</who>
            <bug_when>2004-05-04 02:35:31 0000</bug_when>
            <thetext>thanks for looking into it!</thetext>
          </long_desc>
      
    </bug>

</bugzilla>