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 18th April 2009
WeakSauceIII WeakSauceIII is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Thanked 0 Times in 3 Posts
Default The right way to build an OpenBSD port with debug symbols

I've looked through my books, googled, and read a bunch on this site. I can add and update packages. I can build ports, the kernel , userland ect... I've built and i am running openbsd 4.4 CURRENT. My question is whats the right way to build a port with the debug symbols? I assume there is a global flag maybe? I can do it manually for some things but it'd be cool if i could globally change the ports make command to do it. Thanks for all your help.
Reply With Quote
  #2   (View Single Post)  
Old 18th April 2009
WeakSauceIII WeakSauceIII is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Thanked 0 Times in 3 Posts
Default

ok, it seems that i can use /etc/mk.conf but the file is read only. I can force it but my experience has been that a file is usually read only because you should edit it with some front end program. Am i on the right track?
Reply With Quote
  #3   (View Single Post)  
Old 18th April 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,710
Thanked 214 Times in 189 Posts
Default

/etc/mk.conf is not part of the default install. You can create it, if you are root, as creation needs write access to /etc. You may then set the file mode as you wish.
Reply With Quote
  #4   (View Single Post)  
Old 18th April 2009
WeakSauceIII WeakSauceIII is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Thanked 0 Times in 3 Posts
Default

it was there with some java stuff probably because i compiled java from source the other day, i mean days, so i added DEBUG_FLAGS=-g to it. I recompiled the port and opened with gdb and it still said there were no symbols. I also tried adding that to the Makefile in the port directory. Ill keep it up till i get it.
Reply With Quote
  #5   (View Single Post)  
Old 18th April 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,710
Thanked 214 Times in 189 Posts
Default

I've done this m'self, in the past. I just can't remember exactly how.
Reply With Quote
  #6   (View Single Post)  
Old 19th April 2009
WeakSauceIII WeakSauceIII is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Thanked 0 Times in 3 Posts
Default

your right. My bad. Either the /etc/mk.conf or editing the local make file in the ports both worked. 'make install' just wasn't copying the binary over the one in /usr/local/bin so i was GDBing the wrong non symbol version. ll -t don't lie.
Thanks for the assistance.
Reply With Quote
  #7   (View Single Post)  
Old 20th April 2009
WeakSauceIII WeakSauceIII is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Thanked 0 Times in 3 Posts
Default

I wonder if some one can clarify something for me along the lines of this threads topic. I was able to build many of these ports from source after adding the debug flags. I would pkg_delete the package and this would remove the binary from /usr/local/bin. I would 'make', then 'make install' and the binary would be put back in /usr/local/bin. But one port, gnash, i built before i figured out the debug flag syntax in the make file. Now here is the problem with this one build, it always ends up putting the original file i built out there from the previous day. It's like the make process recognizes that nothing has changed so it doesn't actually rebuild the final binary again. Any ides on why that would be? i have tried to make clean and make clean=depend. Every time though, I wait for the 45 minute build - it puts the same non debug binary out there from the day before.
Reply With Quote
  #8   (View Single Post)  
Old 20th April 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,710
Thanked 214 Times in 189 Posts
Default

Along with checking your settings for port environment variables like TRUST_PACKAGES and FETCH_PACKAGES, you should also inspect /usr/ports/packages/<arch>/cache and perhaps /usr/ports/bulk -- they may need to be cleaned out too.

For more on the how/why of the porting system, see both ports(7) and the very detailed bsd.port.mk(5).
Reply With Quote
Reply

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
Trying to Debug C++ Compile Error [Shibboleth] on FreeBSD starbuck Programming 4 15th January 2009 10:30 PM
jdk 1.6 build error. bsdnewbie999 OpenBSD General 19 3rd January 2009 02:51 PM
Port Build without having to de-overclock p4 (YMMV) jb_daefo Guides 0 29th September 2008 10:29 AM
Do you build your own computers? JMJ_coder Off-Topic 28 28th July 2008 03:04 AM
New server build tanked FreeBSD General 1 5th June 2008 06:41 AM


All times are GMT. The time now is 01:36 AM.


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