DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 14th July 2019
falconhoof falconhoof is offline
New User
 
Join Date: Jul 2019
Posts: 2
Default valgrind issues/alternatives

Hello everyone. I am new to OpenBSD on bare metal and I've recently done my first install; it went swimmingly. As to be expected, I'm having a few growing pains with transitioning my development projects over to it, but there's one issue that doesn't make sense to me at all.

Background: Anyone familiar with C/C++ development on Linux will have heard of valgrind so I won't bother to go into details about it specifically here. I integrate it into my makefiles at work and at play. Accordingly, I'd like to be able to use this tool on OpenBSD.

The problem is that the version of valgrind that the valgrind package installs flat out does not work. Any attempt to execute it results in an immediate abort trap. Normally I'd do much more digging myself before asking for help, but I'm a long way from home in regards to the tools one would normally use to debug such a thing, and I'm concerned that something else is amok given a distributed binary is failing in such a manner.

I confirmed that pkg doesn't think I'm missing any dependencies for it using pkg_check, and there doesn't seem to be a glibc issue (gcc yields binaries quite happily), so I'm hoping someone else may have an insight. Ideally, I'd like to use valgrind, but if there's a comparable alternative I'm open to that.

Cheers!

Last edited by falconhoof; 14th July 2019 at 08:20 PM. Reason: clarity, typo, grammar
Reply With Quote
  #2   (View Single Post)  
Old 14th July 2019
ibara's Avatar
ibara ibara is offline
Real-life IT professor
 
Join Date: Jan 2014
Posts: 717
Default

Quote:
Originally Posted by falconhoof View Post
The problem is that the version of valgrind that the valgrind package installs flat out does not work.
This is true. And known. Ask on ports@.

Quote:
Originally Posted by falconhoof View Post
I confirmed that pkg doesn't think I'm missing any dependencies for it using pkg_check, and there doesn't seem to be a glibc issue (gcc yields binaries quite happily)
Don't use /usr/bin/gcc unless you're sure you want that. The default compiler is /usr/bin/cc (aka clang-8.0.0), and gcc is just there for compatibility in the event you have binaries lying around from the pre-6.2 era.

If you need a newer gcc, install the gcc package (aka run doas pkg_add gcc). That will give you gcc-8.3.0 (the binary will be named egcc).
Reply With Quote
  #3   (View Single Post)  
Old 14th July 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 415
Default

I can't help you at all, but my suggestion would be to try to contact the package maintainer, there should be some information on who, etc. at the bottom of the page if you run the 'man valgrind'
Or look here: http://openports.se/devel/valgrind
Quote:
This OpenBSD port is still very preliminary and has minimal functionality
(memcheck). All problems should be reported to the "valgrind-openbsd" page:

https://bitbucket.org/uebayasi/valgrind-openbsd/
I think that might be the fastest , easiest route to possible answers, also to let the maintainer know about the problems.
==== edited ====
We posted almost at the same time, any way, there you go.
===== edit again====
Stumbled onto this, from a old thread:
Code:
jggimi's Avatar 	
jggimi jggimi is offline
More noise than signal
	  	
Join Date: May 2008
Location: USA
Posts: 6,625
Default
Please use $ pkg_info valgrind -- the output will describe the limitations of the OpenBSD package, and where to report issues.
__________________
My best friends are parrots

Last edited by PapaParrot; 14th July 2019 at 09:58 PM.
Reply With Quote
  #4   (View Single Post)  
Old 14th July 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,814
Default

While the MALLOC OPTIONS do not replace valgrind, they provide memory management features which might be helpful during development. See the malloc(3) man page.
Reply With Quote
  #5   (View Single Post)  
Old 15th July 2019
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,567
Default

Don't know if it as an alternative, but on FreeBSD valgrind seems to be functional. See https://www.freshports.org/devel/valgrind/

The FreeBSD port of valgrind is mentioned under the "Out Of Tree" section of http://www.valgrind.org/info/platforms.html
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #6   (View Single Post)  
Old 15th July 2019
ibara's Avatar
ibara ibara is offline
Real-life IT professor
 
Join Date: Jan 2014
Posts: 717
Default

Quote:
Originally Posted by falconhoof View Post
I confirmed that pkg doesn't think I'm missing any dependencies for it using pkg_check, and there doesn't seem to be a glibc issue
Re-reading this, it appears you think that glibc is available on OpenBSD. There is no glibc on OpenBSD (or any *BSD, for that matter).
Reply With Quote
  #7   (View Single Post)  
Old 23rd July 2019
falconhoof falconhoof is offline
New User
 
Join Date: Jul 2019
Posts: 2
Default

Quote:
Originally Posted by ibara View Post
Re-reading this, it appears you think that glibc is available on OpenBSD. There is no glibc on OpenBSD (or any *BSD, for that matter).
Thanks. As I mentioned in my first post, I'm very new to the BSD's so I apologize for such a naive assumption. I took the presence of gcc and the possibility of even having valgrind, both very closely associated with glibc, as a indication that it was present. My mistake.

Quote:
Originally Posted by ibara
This is true. And known. Ask on ports@.
My I hazard a question as to why it's available as a port then? It seems strange to make something available that is known to be completely broken.

Quote:
Originally Posted by GarryRr
I can't help you at all, but my suggestion would be to try to contact the package maintainer, there should be some information on who, etc. at the bottom of the page if you run the 'man valgrind'
If that's an acceptable action to take in the community, then that sounds like a fine idea. Perhaps the maintainer could even use a helping hand...

Quote:
Originally Posted by J65nko
Don't know if it as an alternative, but on FreeBSD valgrind seems to be functional. See https://www.freshports.org/devel/valgrind/
My entry into BSD derivatives was inspired by coworker who is a notable advocate of OBSD, and sold me on it to the point that I didn't even consider its siblings/cousins. It also seems a bit hasty to drop an OS entirely for the want of a particular port. However, it would certainly help expand my knowledge of the BSD's in general to play with FreeBSD a bit.

Also, thanks to everyone who responded. I appreciate your help, patience, and understanding.
Reply With Quote
  #8   (View Single Post)  
Old 23rd July 2019
ibara's Avatar
ibara ibara is offline
Real-life IT professor
 
Join Date: Jan 2014
Posts: 717
Default

Quote:
Originally Posted by falconhoof View Post
My I hazard a question as to why it's available as a port then? It seems strange to make something available that is known to be completely broken.
It worked when it was initially imported and there is hope it will work again.

Quote:
Originally Posted by falconhoof View Post
If that's an acceptable action to take in the community, then that sounds like a fine idea. Perhaps the maintainer could even use a helping hand...
That would be a great idea. Fair warning if you're too good at maintaining Valgrind on OpenBSD then the job might become yours!
Reply With Quote
Reply

Tags
c/c++, development, tools, valgrind

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternatives to x86 cynwulf OpenBSD General 28 10th April 2017 06:52 PM
no valgrind in openbsd? billy_bazooka Programming 1 20th February 2017 12:52 AM
Amarok alternatives ? LeFrettchen OpenBSD Packages and Ports 4 27th October 2016 02:41 PM
alternatives to raspberry pi osw94k OpenBSD General 2 15th February 2015 04:58 AM
Alternatives for Bind9? windependence FreeBSD Ports and Packages 16 27th June 2009 11:42 AM


All times are GMT. The time now is 07:24 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick