How do I create 32-bit binaries in x86_64 Fedora?

I am trying to run 32 bit binaries on 64 bit Fedora 21.

#include <stdio.h>

int main(){
    printf ("Hello C\n");

    return 1;
}


cc -m32 hello.c   -o helloi686

      

The executable returns a bad system call or does not execute the dynamic executable.

Installed packages

 glibc                                      i686                       2.20-8.fc21                                  @updates                                                   15 M
 glibc-devel                                i686                       2.20-8.fc21                                  @updates                                                  1.0 M
 libX11                                     i686                       1.6.2-2.fc21                                 @fedora                                                   1.3 M
 libXau                                     i686                       1.0.8-4.fc21                                 @fedora                                                    49 k
 libXext                                    i686                       1.3.3-2.fc21                                 @fedora                                                    87 k
 libXrandr                                  i686                       1.4.2-2.fc21                                 @fedora                                                    46 k
 libXrender                                 i686                       0.9.8-4.fc21                                 @fedora                                                    45 k
 libgcc                                     i686                       4.9.2-6.fc21                                 @updates                                                  202 k
 libstdc++                                  i686                       4.9.2-6.fc21                                 @updates                                                  1.0 M
 libxcb                                     i686                       1.11-3.fc21                                  @updates                                                  875 k
 ncurses-libs                               i686                       5.9-16.20140323.fc21                         @fedora                                                   932 k
 nss-softokn-freebl                         i686                       3.18.0-1.fc21                                @updates                                                  432 k
 zlib                                       i686                       1.2.8-7.fc21                                 @fedora                                                   187 k

      

On the command line:

[root@machine platform-tools]# ldconfig -v | grep ld-linux
        ld-linux.so.2 -> ld-2.20.so
        ld-linux-x86-64.so.2 -> ld-2.20.so

[root@machine platform-tools]# ls -l /lib/ld-2.20.so
-rwxr-xr-x 1 root root 159020 feb 27 13:02 /lib/ld-2.20.so

      

What packages should solve this problem?

+3


source to share


1 answer


The systemd config.conf file may have included SystemCallArchitectures with a different arch.



Adjust / remove it. dracut -f and reboot.

0


source







All Articles