33

I have a machine with both glibc i686 and x86_64, and a very annoying problem with glibc.

Is it normal to have two libraries of the same name installed on one computer? How can I know which library is executed?

Until recently, I believed that x86_64 was i686. Well, I must be mistaken but why?

    [root@machin ~]# yum info glibc
    Loaded plugins: rhnplugin, security
    This system is not registered with RHN.
    RHN support will be disabled.
    Excluding Packages in global exclude list
    Finished
    Installed Packages
    Name       : glibc
    Arch       : i686
    Version    : 2.5
    Release    : 42
    Size       : 12 M
    Repo       : installed
    Summary    : The GNU libc libraries.
    License    : LGPL
    Description: The glibc package contains standard libraries which are used by
               : multiple programs on the system. In order to save disk space and
               : memory, as well as to make upgrading easier, common system code is
               : kept in one place and shared between programs. This particular package
               : contains the most important sets of shared libraries: the standard C
               : library and the standard math library. Without these two libraries, a
               : Linux system will not function.

    Name       : glibc
    Arch       : x86_64
    Version    : 2.5
    Release    : 42
    Size       : 11 M
    Repo       : installed
    Summary    : The GNU libc libraries.
    License    : LGPL
    Description: The glibc package contains standard libraries which are used by
               : multiple programs on the system. In order to save disk space and
               : memory, as well as to make upgrading easier, common system code is
               : kept in one place and shared between programs. This particular package
               : contains the most important sets of shared libraries: the standard C
               : library and the standard math library. Without these two libraries, a
               : Linux system will not function.

    [root@machin ~]# yum info glibc-common
    Loaded plugins: rhnplugin, security
    This system is not registered with RHN.
    RHN support will be disabled.
    Excluding Packages in global exclude list
    Finished
    Installed Packages
    Name       : glibc-common
    Arch       : x86_64
    Version    : 2.5
    Release    : 42
    Size       : 64 M
    Repo       : installed
    Summary    : Common binaries and locale data for glibc
    License    : LGPL
    Description: The glibc-common package includes common binaries for the GNU libc
               : libraries, as well as national language (locale) support.
22

Technically, i686 is actually a 32-bit instruction set (part of the x86 family line), while x86_64 is a 64-bit instruction set (also referred to as amd64).

From the sound of it, you have a 64-bit machine that has 32-bit libraries for backwards compatibility. That should be totally fine.

2

i686 packages are intended to be executed on 686-compatible processors, which includes all Intel 32-bit x86 processors up to and including the Pentium 4, etc. as well as processors from AMD (AMD K6) and other vendors which make compatible 32-bit chips.

For more information:

x86_64 packages are intended to be executed on processors which are compatible with the AMD64 64-bit platform, including the AMD Athlon 64, AMD Opteron and related AMD processor families, and the Intel 64 based processors.

These 64-bit processors are fully backward compatible with their 32-bit predecessors, so if you have a AMD64 or Intel 64 processor, it's up to you whether to install the 64-bit x86_64 packages or the 32-bit i686 packages. To get the highest level of performance out of your system you may want to use the 64-bit x86_64 distribution packages.

Reference :

1

If you dig i686 in Wikipedia, Wikipedia will tell you clues that the i686 microarchitecture is considered as a x86 extension.

In general all x86 architectures are considered similar, and the x86_64 (or maybe amd64) architecture is considered in another microarchitectures group.

  • 2
    But the quick and dirty answer would be "because i686 is a 32bit x86 submicroarchitecture, and x86_64 (or amd64) is a 64 bit microarchitecure). – uprego Sep 29 '14 at 16:08
  • 1
    Umm...correct me if I'm wrong here, but it kind of looks like your comment got ... Unix-Ninja'ed. – T.E.D. Dec 23 '15 at 20:46
  • I was ninja roll'd! – uprego Dec 24 '15 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.