Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 26 Sep 2018, 04:58
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GDB or Valgrind or other debugger for Puppy 5.2.8? (Solved)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
CGP

Joined: 26 Jul 2008
Posts: 91

PostPosted: Thu 08 Mar 2018, 18:38    Post subject:  GDB or Valgrind or other debugger for Puppy 5.2.8? (Solved)  

Hi. Is there GDB or Valgrind or some other debugger that runs on puppy 5.2.8? Thanks.
Last edited by CGP on Wed 14 Mar 2018, 12:58; edited 1 time in total
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12700
Location: Gatineau (Qc), Canada

PostPosted: Thu 08 Mar 2018, 21:08    Post subject:  

Hello CGP.

If I may be as bold... What do you mean by "debug"?
-- gather information in connection with bug reports?
OR
-- debug programs while developing?

As a bash scripter I know of two ways:
-- keep a close eye on file /tmp/xerrs.log. Maybe open it in a separate terminal with
parameter -f, like so:
Code:
tail -f /tmp/serrs.log
This way, new error lines will be shown as they happen.

-- while developing a bash script, if you encounter a mysterious bug, put a line with
< set -xe > underneath the crunch-bang line, and a line with < set +xe > at the end.
Then test your script from geany by hitting F5. It slows the script down, but all the
processes are shown, and you can more easily spot the culprit(s) or bottleneck(s).

I only script in Bash, but I have read about the following capacity of geany: it can be
used as an IDE for a wide range of computer languages. Maybe study the geany docs
a bit and set it up accordingly. I suspect that it can show debugging output while
developing an application in various languages.

Finally, have you checked if a version of Valgrind or GDP are available for your Puppy
from its PPM (Puppy Package Manager)?

IHTH. BFN.

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
CGP

Joined: 26 Jul 2008
Posts: 91

PostPosted: Thu 08 Mar 2018, 21:48    Post subject:  

@musher0

Thanks for the nice reply. Actually, I am trying to get wipefreespace (description here: http://wipefreespace.sourceforge.net/) running on Puppy Linux 5.2.8 with the help of the programmer who wrote it. It failed on FAT32 partitions when running from Puppy Linux 5.2.8. He asked me to use a debugger like GDB or VALGRIND to produce output to send him. The code must be written in C but I am dealing only with the executable. One thing he wanted was the 'stack trace', So, actually, I don't really know what kind of debugger I need other than GDB or VALGRIND.

I did find them in Puppy Package Manager when running on Puppy 5.2.8. But when I try to download them, I get the error message that the links are now broken. They seem to have been in puppy-lucid and ubuntu-lucid repositories that you can configure PPM to access and several other ones. Apparently, not one of them works. Are they always like that?

I am wondering if they are maybe available as pets from some repository or somewhere else.

Thanks.
Back to top
View user's profile Send private message 
muggins

Joined: 20 Jan 2006
Posts: 6749
Location: hobart

PostPosted: Thu 08 Mar 2018, 23:36    Post subject:  

https://pkgs.org/ is a good place to search for compiled programs. They have plenty of versions of gdb, but I don't know whether they would work with lupu. Usually slackware versions have the least dependencies.

Regarding wipefreespace, you could try downloading & installing this one:

http://ftp.gwdg.de/pub/opensuse/repositories/home:/zhonghuaren/Fedora_25/i686/wipefreespace-2.2-7.1.i686.rpm

It runs from commandline without errors for me.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12700
Location: Gatineau (Qc), Canada

PostPosted: Fri 09 Mar 2018, 00:23    Post subject:  

Hello CGP.

About the execs not being available, Puppy 5.2.8 is aka Puppy Lucid, aka LuPu, and is 5
years old, you know. Perhaps the Ubuntu Lucid repos have changed URLs.

I'll do a bit of research and see what I can come up with. In the meantime, why not ask
rerwin? Forum member rerwin is the maintainer of the Lucid Puppies. Or maybe search
the existing Lupu threads?

BFN.

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12700
Location: Gatineau (Qc), Canada

PostPosted: Fri 09 Mar 2018, 01:21    Post subject:  

Hello again CGP.

I tried to locate an old wipefreespace version in Ubuntu's repos for Lucid Lynx and
could not find one.

Along the way, it occurred to me that Puppies have < strace > in their devx*.sfs. With
< strace >, you may not need Valgrind or GDB.

This is what I would suggest:
-- load the devx*.sfs for your Lucid Puppy -- if not already loaded;

-- make sure you have strace loaded by issuing the following command from terminal
Code:
whereis strace
If you get something like < /usr/bin/strace > as a result, you're good to go.

-- Then run
Code:
strace -c -o wipefreespace-trace-columns.rpt wipefreespace
to get a report nicely laid out in columns of wipefreespace's execution;

-- and run
Code:
strace -o wipefreespace-trace-general.rpt wipefreespace
to get a general report of wipefreespace's execution;

-- use < more > to view the reports (to make sure that they do contain information, but
none which a normal human can understand!) Wink ;

-- send both *.rpt reports to the dev. This will quench his thirst, I think!

IHTH. BFN.

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
CGP

Joined: 26 Jul 2008
Posts: 91

PostPosted: Fri 09 Mar 2018, 15:33    Post subject:  

Hi musher0 and mullins,

By the way, the reason I am trying to use puppy linux 5.2.8 even though it is rather old is that I have other programs installed on that version of puppy and doubt that I can get them installed on other versions of puppy. (see below for one reason I doubt that).

@mullins:

Thanks for the suggestions.

I'm very happy that wipefreespace works on puppy. But I tried to install the wipefreespace rpm you linked to on puppy 5.2.8. Just for like almost all rpms I try to install on puppy 5.2.8, I get the error message

"An error occurred opening the RPM file. Suggestion: install unrpm.pup DotPup package, which contains an alternative extraction program, that PupZip will automatically use if present."

I then installed the unrpm.pet package. I got the same error message when I tried to install wipefreespace. So, do you have a suggestion? What version of puppy did you get wipefreespace to work on? Did you have unrpm.pup or unrpm.pet installed? Did you have to install extra libraries like libreiser and libaal? If so, where did you find them? Please let me know. I will definitely try to reproduce your success.

Thanks for the link to https://pkgs.org. Are you saying that that website has many packages that will run on puppy linux? Is the only way to tell if one of those packages will run on puppy linux to try it? My past experience makes me think that the chance one will run on any particular version of puppy is less than 1%. Is there no way to know if one of those many packages will run on any particular version of puppy? And are you saying that those packages in the Slackware category are more likely to run on puppy?

--

@musher0

Thanks for describing strace. (Actually puppy 5.2.8 has 'strace' in /usr/bin, but does not have 'whereis'!). I did run strace against the wipefreespace executable and will send the results to the developer.

I will message rerwin to ask about the links to gdb and vagrind.

Thanks to both of you for your help.
Back to top
View user's profile Send private message 
muggins

Joined: 20 Jan 2006
Posts: 6749
Location: hobart

PostPosted: Fri 09 Mar 2018, 18:56    Post subject:  

CGP,

here is rpm repackaged as tar.gz.
wipefreespace-2.2-7.1.i686.tar.gz
Description 
gz

 Download 
Filename  wipefreespace-2.2-7.1.i686.tar.gz 
Filesize  79.15 KB 
Downloaded  64 Time(s) 
Back to top
View user's profile Send private message 
muggins

Joined: 20 Jan 2006
Posts: 6749
Location: hobart

PostPosted: Fri 09 Mar 2018, 19:07    Post subject:  

Quote:
Did you have unrpm.pup or unrpm.pet installed? Did you have to install extra libraries like libreiser and libaal?


No to both. I'm using a version of Peebee's artful pup. All I'm reporting is that I extracted the wipefreespace rpm, and it ran on commandline without
errors.

Quote:
And are you saying that those packages in the Slackware category are more likely to run on puppy?


Yes, that is my experience. For reasons unknown to me, ubuntu packages seem to be compiled with unneeded dependencies.
Back to top
View user's profile Send private message 
CGP

Joined: 26 Jul 2008
Posts: 91

PostPosted: Fri 09 Mar 2018, 20:35    Post subject:  

muggins (woops, I called you mullins above). Thanks very much. The version of wipefreespace you provided in the tar does not need the additional libreiser and libaal libraries which the sourceforge version needs when running on puppy 5.2.8. However, unfortunately wipefreespace did not work on a FAT32 partition. I got the error message

"wipefreespace:/dev/sdb1: error (error -1216211944) during opening '/dev/sdb1', FS='/dev/sdb1"

when running it on a FAT32 USB flash drive which was sdb1. So, I don't want others to think that the executable in the tar works.

musher0 I contacted rerwin and he provided some workarounds to the broken links problem. I will get to them next.
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1902
Location: Maine, USA

PostPosted: Sat 10 Mar 2018, 18:45    Post subject:  

The solution for the broken links problem is to replace the ubuntu-compatible repository list with one from lupu 5.2.8.7. A package to do that is here:

http://www.murga-linux.com/puppy/viewtopic.php?p=985146#985146

The only available repos are now in "old-releases".

The package is for Ubuntu-Lucid-based Pups (other than 5.2.8.7) only.
Back to top
View user's profile Send private message 
CGP

Joined: 26 Jul 2008
Posts: 91

PostPosted: Wed 14 Mar 2018, 12:57    Post subject:  

To answer my original question, YES, there are gdb and valgrind for puppy linux 5.2.8. They are available in the Puppy Package Manager (PPM).

But finding and installing them is still a matter of trial and error and guesswork. You also need to modify Puppy Linux as described in the previous post. (Thank you for that replacement file, rerwin).

For the newbie, to find any program in PPM you need to first update the repository databases. It seems that a fresh install of puppy linux has no repository databases. Guesswork. You do that by clicking on the "Configure Package Manager" icon. (I have been using puppy for 9 years but did not know that. When I searched for a program in PPM, no error message told me to first download the repository contents list. Shouldn't the title of the icon be "Download Repository Contents" or something like that?)

Next, there are different 'Repo's listed across the top of PPM as radio button choices. It seems to make no difference which one you choose. (Nowadays there is really only one repository, named "old-releases.ubuntu.com". Why the change? I don't know. Apparently at one time there were 4 different repositories for lucid puppy. Why? I don't know. Their names puppy-lucid, ubuntu-lucid-main, ubuntu-lucid-multiverse, and ubuntu-lucid-universe give no clue as to how they differ or why I would choose one of them instead of another. Guesswork.)

Listed on the left are many radio buttons like Desktop, System, ... Fun. It seems to make no difference which one you choose. (Trial and error. Why are they there? I don't know.)

I hope this helps someone to use puppy linux and to improve future versions of puppy linux.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0742s ][ Queries: 13 (0.0194s) ][ GZIP on ]