fakeroot in amd64 lacking support for i386

Bug #1001129 reported by Dariem Pérez Herrera
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
fakeroot (Debian)
New
Undecided
Amir Eldor
fakeroot (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

fakeroot installation in precise amd64 lacks support for i386 binaries. This is to the lacking of the library /usr/lib/i386-linux-gnu/libfakeroot/libfakeroot-sysv.so. Trying to solve this problem installing fakeroot:i386 (which uninstall fakeroot:amd64) makes imposible to use it with 64 bits chroot when using fakechroot and debootstrap to create an i386 system. To be clear, i've installed ia32-libs, so 32 bits binaries work well in my system. Some examples of the fakeroot malfunction:

=== Example with fakeroot:amd64 ===:

$ fakechroot fakeroot debootstrap --variant=buildd --arch=i386 precise /home/dariemp/Escritorio/Chroot_i386 http://archive.ubuntu.com/ubuntu
 .........

 W: Failure trying to run: chroot /home/dariemp/Escritorio/Chroot_i386 dpkg --force-depends --install /var/cache/apt/archives/base-files_6.5ubuntu6_i386.deb /var/cache/apt/archives/base-passwd_3.5.24_i386.deb

$ fakechroot fakeroot chroot /home/dariemp/Escritorio/Chroot_i386 dpkg --force-depends --install /var/cache/apt/archives/base-files_6.5ubuntu6_i386.deb /var/cache/apt/archives/base-passwd_3.5.24_i386.deb

ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded: ignored.
dpkg: error: requested operation requires superuser privilege

=== Example with fakeroot:i386 ===:

$ fakechroot fakeroot debootstrap --variant=buildd --arch=i386 precise /home/dariemp/Escritorio/Chroot_i386 http://archive.ubuntu.com/ubuntu

ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded: ignored.
E: debootstrap can only run as root

Revision history for this message
Dariem Pérez Herrera (dariemp) wrote :

I think this bug is related with the Debian bug #605077 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605077) which has been already solved.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fakeroot (Ubuntu):
status: New → Confirmed
Revision history for this message
Paul Tötterman (ptman) wrote :

The patch seems to be applied already in the version shipped with precise (Debian was patched at version 1.14.. and precise has version 1.18...)

Amir Eldor (amireldor)
Changed in fakeroot (Debian):
assignee: nobody → Amir Eldor (amireldor)
Revision history for this message
Sameer Naik (sameer) wrote :

Is there a workaround for this. I am trying to run a 32 bit binary with fakeroot on a 64 bit installation. I installed fakeroot:i386 package.

```bash
$ fakeroot <32bit-binary>
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
```

Any pointers would help. I am stuck here.

Revision history for this message
Valentin (siderskiy) wrote :

Same here! I have a project with parts that only work in 64bit and the part that only works in 32bit only because of this fakeroot problem. Would like to get everything on 64bit.

Revision history for this message
ELIPTUS (eliptus+launchpad) wrote :

Since this is the top hit for this issue in Google, I'm documenting my workaround here for others:

LD_LIBRARY_PATH="/usr/lib/i386-linux-gnu/libfakeroot" fakeroot

Basically, when fakeroot adds x86_64, lib64, and lib32 to the search paths, but omits i386:

: %; fakeroot -- ${SHELL} -c 'echo ${LD_LIBRARY_PATH}'
/usr/lib/x86_64-linux-gnu/libfakeroot:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot

Manually adding it solves the issue:

: %; LD_LIBRARY_PATH="/usr/lib/i386-linux-gnu/libfakeroot" fakeroot -- ${SHELL} -c 'echo ${LD_LIBRARY_PATH}'
/usr/lib/x86_64-linux-gnu/libfakeroot:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot:/usr/lib/i386-linux-gnu/libfakeroot

Revision history for this message
Marc Olzheim (zlo-zlo) wrote :

As the main point it that /usr/lib/i386-linux-gnu/libfakeroot is not part of the patch, this patch fixes it for me. I guess it should actually be replaced by an @@ macro though.

--- scripts/fakeroot.in.orig 2019-02-26 11:38:12.000000000 +0100
+++ scripts/fakeroot.in 2019-02-26 11:40:41.895722422 +0100
@@ -35,7 +35,7 @@

 USEABSLIBPATH=@LDPRELOADABS@
 LIB=lib@fakeroot_transformed@@DLSUFFIX@
-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
+PATHS=@libdir@:/usr/lib/i386-linux-gnu/libfakeroot:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
 FAKED=${FAKEROOT_BINDIR}/@faked_transformed@

 FAKED_MODE="unknown-is-root"

Revision history for this message
Marc Olzheim (zlo-zlo) wrote :

And for this to function, you need to have the following packages installed:
fakeroot, libfakeroot:amd64, libfakeroot:i386

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.