You are not logged in.

#1 2016-06-27 13:56:23

ryansturmer
Member
Registered: 2012-03-26
Posts: 14

32-Bit Executable won't run even though multilib is installed?

I am trying to run a 32-bit executable, and although I have multilib installed (by uncommenting the multilib section in /etc/pacman.conf and doing a full update

pacman -Syu

I still get "No such file or directory" when I try to run my 32-bit executable (which definitely does exist, and is not a broken symbolic link or anything)

Do I have to install anything else after enabling multilib and performing the system upgrade - is there a 32-bit loader or something that I need to install in order for things to work?

Offline

#2 2016-06-27 14:11:21

phw
Member
Registered: 2013-05-27
Posts: 303

Re: 32-Bit Executable won't run even though multilib is installed?

Just uncommenting the multilib repo and running pacman -Syu won't do much, you have to install the packages your binary actually needs.

You could maybe tell us, what binary you are trying to run smile Also you can use readelf to list the actual dependencies of the binary you want to run, e.g.

readelf -d /usr/lib32/skype/skype

Will give you something like:

Dynamic section at offset 0x22c4050 contains 39 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libXv.so.1]
 0x00000001 (NEEDED)                     Shared library: [libXss.so.1]
 0x00000001 (NEEDED)                     Shared library: [librt.so.1]
 0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
 0x00000001 (NEEDED)                     Shared library: [libX11.so.6]
 0x00000001 (NEEDED)                     Shared library: [libXext.so.6]
 0x00000001 (NEEDED)                     Shared library: [libQtDBus.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtWebKit.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtXml.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtGui.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtNetwork.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtCore.so.4]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
--- SNIP ---

Search for the missing libraries in the multilib repo and install those.

Offline

#3 2016-06-27 14:16:21

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,461

Re: 32-Bit Executable won't run even though multilib is installed?

Just uncommenting the line in pacman.conf enable the repository, it does not install anything. If an archlinux (or a properly packaged AUR package) need something it will depends on the proper multilib-* package. If you want to run a binary from other source you need at least lib32-glibc (otherwise you get the confusing "no such ). file or directory message"). Run the binary from a terminal and install packages until it does not complain anymore with missing libraries (use pkgfile to search packages owning a file). Note that if the program has optional feature like libgl, you will need to install the 32 bits version of these libraries too (lib32-mesa-libgl in my example). If you want to compile 32 bit packages you will need the multilib-devel group which replace some file from the usual devel group.

Offline

#4 2016-06-29 04:04:50

ryansturmer
Member
Registered: 2012-03-26
Posts: 14

Re: 32-Bit Executable won't run even though multilib is installed?

The missing piece was glibc - I didn't realize that after enabling the multilib repository that nothing from multilib would get installed (makes sense though) - I guess I assumed there was a "base" package set, but it makes sense that you'd have to request that to be installed.  Installing lib32-glibc did the trick.  The output of the readelf was:

 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x00000001 (NEEDED)                     Shared library: [ld-linux.so.2]
 0x0000000c (INIT)                       0x8049dfc
 0x0000000d (FINI)                       0x80adf10
 0x00000019 (INIT_ARRAY)                 0x80fa7c4
 0x0000001b (INIT_ARRAYSZ)               8 (bytes)
 0x0000001a (FINI_ARRAY)                 0x80fa7cc
 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
 0x00000004 (HASH)                       0x8048188
 0x00000005 (STRTAB)                     0x8048fcc
 0x00000006 (SYMTAB)                     0x804860c
 0x0000000a (STRSZ)                      1950 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x80fb208
 0x00000002 (PLTRELSZ)                   984 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x8049a24
 0x00000011 (REL)                        0x8049934
 0x00000012 (RELSZ)                      240 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffe (VERNEED)                    0x80498a4
 0x6fffffff (VERNEEDNUM)                 2
 0x6ffffff0 (VERSYM)                     0x804976a
 0x00000000 (NULL)                       0x0

(this is a gcc cross compiler)

THanks guys, great help!

Offline

#5 2016-06-29 09:01:24

phw
Member
Registered: 2013-05-27
Posts: 303

Re: 32-Bit Executable won't run even though multilib is installed?

Great. Please remember to mark you thread as solved by editing the title and adding "[SOLVED]" in front smile

Offline

Board footer

Powered by FluxBB