|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
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.
|
|
|||
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?
|
|
|||
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.
|
|
|||
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. |
|
|||
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.
|
|
||||
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). |
Thread Tools | |
Display Modes | |
|
|
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 |