Package: qemu-user-static
Version: 1:2.4+dfsg-4
Severity: normal

I've got a chroot with a foreign architecture; I copied the various
/usr/bin/qemu-*-static binaries over, but not all programs work.

Most of the build stack works fine; but then there is this:

    # chroot debian-jessie-ppc64el/ bash -c 'cd /tmp && gcc a.c'
    gcc: error trying to exec '/usr/lib/gcc/powerpc64le-linux-gnu/4.9/cc1':
        execv: Exec format error

Looks like the registration of file formats is somehow broken:

# file debian-jessie-ppc64el/usr/lib/gcc/powerpc64le-linux-gnu/4.9/cc1
    debian-jessie-ppc64el/usr/lib/gcc/powerpc64le-linux-gnu/4.9/cc1: ELF 64-bit 
LSB executable, 64-bit PowerPC or cisco 7500, version 1 (GNU/Linux), 
dynamically linked, interpreter /lib64/ld64.so.2, for GNU/Linux 2.6.32, 
BuildID[sha1]=3bea2777c40886422ecd521a04141dbeeb194afb, stripped
# objdump -f debian-jessie-ppc64el/usr/lib/gcc/powerpc64le-linux-gnu/4.9/cc1
    
    debian-jessie-ppc64el/usr/lib/gcc/powerpc64le-linux-gnu/4.9/cc1:     file 
format elf64-little
    architecture: UNKNOWN!, flags 0x00000112:
    EXEC_P, HAS_SYMS, D_PAGED
    start address 0x0000000010117ec8
    
But running via qemu works:
    # echo '' | chroot debian-jessie-ppc64el/ /usr/bin/qemu-ppc64le-static 
/usr/lib/gcc/powerpc64le-linux-gnu/4.9/cc1
    
    Analyzing compilation unit
    Performing interprocedural optimizations
     <*free_lang_data> <visibility> <early_local_cleanups> 
<*free_inline_summary> <whole-program> <inline>Assembling functions:
    
    Execution times (seconds)
     phase setup             :   0.27 (75%) usr   0.00 ( 0%) sys   0.27 (67%) 
wall    1339 kB (89%) ggc
     phase parsing           :   0.04 (11%) usr   0.01 (100%) sys   0.05 (13%) 
wall     146 kB (10%) ggc
     phase lang. deferred    :   0.01 ( 3%) usr   0.00 ( 0%) sys   0.00 ( 0%) 
wall       0 kB ( 0%) ggc
     phase opt and generate  :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 2%) 
wall       0 kB ( 0%) ggc
     phase finalize          :   0.01 ( 3%) usr   0.00 ( 0%) sys   0.04 (10%) 
wall       0 kB ( 0%) ggc
     preprocessing           :   0.01 ( 3%) usr   0.00 ( 0%) sys   0.01 ( 3%) 
wall      16 kB ( 1%) ggc
     parser (global)         :   0.03 ( 8%) usr   0.01 (100%) sys   0.04 (10%) 
wall     129 kB ( 9%) ggc
     unaccounted todo        :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 2%) 
wall       0 kB ( 0%) ggc
     TOTAL                 :   0.36             0.01             0.40           
    1502 kB


Executables I already had that problem with:
    /usr/lib/gcc/powerpc64le-linux-gnu/4.9/cc1
    /usr/lib/gcc/powerpc64le-linux-gnu/4.8/cc1
    /sbin/ldconfig.real


-- System Information:
Debian Release: 8.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

qemu-user-static depends on no packages.

Versions of packages qemu-user-static recommends:
ii  binfmt-support  2.1.5-1

Versions of packages qemu-user-static suggests:
ii  sudo-ldap [sudo]  1.8.10p3-1+deb8u2

-- no debconf information

Reply via email to