Valgrind requires libc-32bit on 64bit system

Hello,
I hope this is the right place to ask for this. Please redirect me if this is not the case.
When trying to install valgrind on openSUSE Leap 15.0, I am requested to install glibc-32bit and some of its dependencies (>100Mo). This seemed a bit strange to me. I don’t see any reason why valgrind would require 32bit libs on 64bit system.
After investigation by inspecting the requirements of the package, I found that the requirements include “libdl.so.2(GLIBC_2.0)”, which is provided only by glibc-32bit:


> zypper se --provides 'libdl.so.2(GLIBC_2.0)'
Chargement des données du dépôt...
Lecture des paquets installés...

S | Nom         | Résumé                                             | Type  
--+-------------+----------------------------------------------------+-------
  | glibc-32bit | Standard Shared Libraries (from the GNU C Library) | paquet

Is this expected behavior? Does it really needs it? What are next steps? Should I file a bug?
Thanks for any help,

Pascom

Sure. You can run 32 bit programs on 64 bit but they do require the equivalent 32 bit libraries. Happens all the time for proprietary or binary only programs that have not yet been ported to 64 bit

Clarifying,
Your CPU supports both 32bit and 64bit, but LEAP is distributed only with 64bit libraries so LEAP is only 64bit by default.

But, if you provide/install the required and missing 32bit libraries, then you can run 32bit applications.

TSU

Hello,
Yes, I know I can run 32bit programs and use 32bit libraries on my 64bits system : on windows I have a lot of them (e.g. Firefox). But what I mean is that valgrind is not a 32bit program, as far as I understand. I do not see why it need 32bit libs. IMHO a provides is missing, or there is an extra require. I did not try yet but I am pretty sure I could break the dependency and have Valgrind work still well. But I would prefer having the opinion of an expert before doing this.
Best regards,
Pascom

Where did you get the program? Maybe it was compiled for 32 bits from the source Just checked on 42.3 repo and it does not require any 32 bit

Oka a closer look says that the 32 bit libs are required. Perhaps to deal with development of 32 bit programs???

Hello,
This is the valgrind package from the official 15.0 distribution.

Perhaps to deal with development of 32 bit programs???

This is my hypothesis as well. But il will not have 32 bits programs on this machine. I would like to confirm it before installing all this unneeded software.
When I get time, I will try to break the dependency and see whether it works or not. I will let you know the result of the experiment.
Best regards,
Pascom

Cant say if it breaks or not. But it installed here fine without need to pull in the 32 bit libs because I already had them installed for other programs.

Hello!
I tried to break the dependencies, which is actually really easy to do with Yast :slight_smile:
Valgrind seems to work, but I must investigate more (later this week).
Best regards and thanks for the help,
Pascom

Valgrind is a tracing tool.
This kind of tool can be 32-bit because it doesn’t do anything that requires 64-bit, tracing is simply displaying and perhaps logging process activity.

Another similar example is VMware applications.
AFAIK they’re all 32-bit applications because what they do is very simple (provide a graphical tool to manage settings) and isn’t relevant to the Guests that can be 32-bit or 64-bit.
So, aren’t written in 64-bit.
And, for good measure if for some reason is running on a 32-bit only system (ARM? for example 32-bit system isn’t that uncommon), it’ll install and run without modification.
In the same way, a 32-bit Valgrind might be installable on 32-bit only systems without modification.

TSU

Hello,

I sorted this out: in Leap 15.0 x86_64, Valgrind is a 64 bit program as shown with file:


> file $(which valgrind)
/usr/bin/valgrind: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=1932c6fa0827b41c2598a04b2967625b26abdd9e, stripped

but, to be able to run against 32bit programs, which can run on x86_64 archictecture as gogalthorp underlined, it installs some 32bit sub-programs in /usr/lib64/valgrind/

Since I don’t plan to have any 32 bits programs running on my system (and a fortiori to program any), I will patch the spec and build the RPM on my OBS playground so that these files are not packaged, because I am a little tight on disk space…

Best regards and thank you for the answers,
Pascom.