Valgrind says my version of gcc is stripped. What to do?

Moderators: 666philb, Forum moderators

Post Reply
AliAbdulKareem
Posts: 3
Joined: Sun Sep 19, 2021 11:11 pm

Valgrind says my version of gcc is stripped. What to do?

Post by AliAbdulKareem »

Hello everyone,
so first, I want to thank you for this great Distro,
I installed the newest version which is fossa64
I am new to linux in general, and C programming.
I installed the devx sfs based on this form http://wikka.puppylinux.com/devx to get gcc and I used the version correspond to my system which is fossa64 from here http://distro.ibiblio.org/puppylinux/pe ... s-fossa64/

now I can run and compile C programs however,
I tried to install valgrind by compiling the source, and it was installed however, whenever I want to try to run it on any program.
it keeps saying that my version of gcc is stripped and I need to install glibc debugging info
full output here https://pastebin.com/eBWkdyHn

I also stumbled on this stackoverflow answer, https://stackoverflow.com/questions/157 ... at-startup
I think it does tackle the problem, because I faced many 32bit vs 64bit problems when I tried to build gcc from source (because they said it was stripped, so I thought i just build the newest gcc version)
my machine is 64bit cpu /64bit kernel
I tried installing few gcc packages from the ppm but none of them were able to compile C file out of the box, so I sticked to use devx gcc which is 9.3 for now
(I also wanna say I did a clean install today, so none of the packages that I installed are present to cause any sort of confection with gcc 9.3)

Looking forward to hear any thoughts on this.
Best,
Ali.

Last edited by Flash on Mon Sep 20, 2021 6:24 pm, edited 2 times in total.
Reason: Original title: install valgrind
User avatar
Grey
Posts: 2078
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 78 times
Been thanked: 399 times

Re: install valgrind

Post by Grey »

AliAbdulKareem wrote: Sun Sep 19, 2021 11:39 pm

it keeps saying that my version of gcc is stripped and I need to install glibc debugging info
full output here https://pastebin.com/eBWkdyHn

Hi. Try to establish what he asks for.
Or try version (3.15.0) of Valgrind from PPM (Menu>>Setup>>Puppy Package manager).

Different devices. Different approach.

AliAbdulKareem
Posts: 3
Joined: Sun Sep 19, 2021 11:11 pm

Re: install valgrind

Post by AliAbdulKareem »

Thanks for your reply.

I did uninstall old valgrind (version 3.17) and installed the one from ppm (3.15) and it still complains about the same thing.

then I went to the linked website, and downloaded libc6-dbg for amd64 (since my machine is 64 bit)

and installed it,
and the problem is still the same (same message when running valgrind)
There was a comment on the output from valgrind, that I might need to install 32 bit version of libc6-dbg
so I downloaded the i386.deb version and tried to install it, but when I double click it to install it it reports an error
"package already exists, can't be installed twice"

User avatar
bigpup
Moderator
Posts: 7593
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 1038 times
Been thanked: 1692 times

Re: Valgrind says my version of gcc is stripped. What to do?

Post by bigpup »

Try using Quickpet->Useful->
Download and load the 32bit compatibility SFS
That SFAS provides stuff needed to be able to run 32bit software.
May need to reboot and save to get the SFS properly loaded.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

AliAbdulKareem
Posts: 3
Joined: Sun Sep 19, 2021 11:11 pm

Re: Valgrind says my version of gcc is stripped. What to do?

Post by AliAbdulKareem »

Hello
Thanks for your reply
I did install
32bit compatibility mode from
http://distro.ibiblio.org/puppylinux/pe ... ossa64.sfs
I rebooted and it is still the same error.

÷ I also installed it from quickpets fossa->useful->32bit compatibility for fossa
I rebooted and it still has the same problem.

sorry for relate reply, I didn't get any notification on your reply.

User avatar
snoring_cat
Posts: 206
Joined: Tue Sep 21, 2021 3:40 pm
Location: Earth
Has thanked: 24 times
Been thanked: 46 times

Re: Valgrind says my version of gcc is stripped. What to do?

Post by snoring_cat »

Hi AliAbdulKareem,

Please download and install the following file:

http://lug.mtu.edu/ubuntu/pool/main/g/g ... _amd64.deb

For some reason, this package is not being shown in the Puppy Package Manager. For others who might have a similar problem,and are not using Fossa, please find your version via https://packages.ubuntu.com/search?keywords=libc6-dbg

Meeeooow!

-- substance over noise, since 5 minutes in the future --

User avatar
mikewalsh
Moderator
Posts: 6595
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 1045 times
Been thanked: 2220 times

Re: Valgrind says my version of gcc is stripped. What to do?

Post by mikewalsh »

Don't forget; immediately after loading the 32-bit_compat_libs SFS - before doing anything else at all! - you MUST open a terminal & issue the command

Code: Select all

ldconfig

.....and wait for the prompt ("#") to return.

This tells the contents of the 32-bit compatibility package to set up a whole bunch of sym-links & other stuff.....and if you DON'T do this, then it's a waste of time bothering with the SFS at all.

Mike. ;)

User avatar
snoring_cat
Posts: 206
Joined: Tue Sep 21, 2021 3:40 pm
Location: Earth
Has thanked: 24 times
Been thanked: 46 times

Re: Valgrind says my version of gcc is stripped. What to do?

Post by snoring_cat »

AliAbdulKareem,

Please be aware that I do not believe your problem has anything to do with 32bit. The error that you were getting is common, and is easily reproducable. Also, your example source code doesn't look suspect (except that you need to include stdlib.h).

As I stated in my previous post, everything should be fine by just installing libc6-dbg. Nothing else has to be done to get valgrind to work. I tested your code as follows (I named the source code file test.c):

Code: Select all

#include <stdlib.h>

int main() {
	 int* x = malloc(5);
}

and compiled with
gcc -o ouput_test input.c

then run
valgrind ./output_test

Meeeooow!

-- substance over noise, since 5 minutes in the future --

User avatar
torm
Posts: 35
Joined: Thu Aug 06, 2020 3:02 pm
Been thanked: 8 times

Re: Valgrind says my version of gcc is stripped. What to do?

Post by torm »

Only get similar response from valgrind here:

root# valgrind ./myapp
==13745== Memcheck, a memory error detector
==13745== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==13745== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==13745== Command: ./myapp
==13745==

valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld-linux-x86-64.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux-x86-64.so.2
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Note that if you are debugging a 32 bit process on a
valgrind: 64 bit system, you will need a corresponding 32 bit debuginfo
valgrind: package (e.g. libc6-dbg:i386).
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.

Same thing on Fossa64 and Tahrpup605-32bit.
Installing libc6-dbg made no difference at all..
libc6-dbg2._31-0ubuntu9.5_amd64.deb was installed in Fossa, would that be
the libc6-dbg that valgrind depens on?
Tested "myapp" was built from source on the same system and works.
Building the valgrind from source has the same output as PM default version.

Any idea?

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: Valgrind says my version of gcc is stripped. What to do?

Post by Phoenix »

Puppy probably strips all executables because that saves space instead of having to package extra unneeded stuff with it. This means that you can either a) shoehorn in another build of libc/ld (they come as one, no way around that) and then figure out the consequences from that. (If you happen to be building libraries and then remove your external libc it will error out, or refuse to work with other puppies/computers) b) Make a puppy that isn't stripped.

IRC: firepup | Time to hack Puppy!

Post Reply

Return to “Fossapup64”