[dead question] Unstripped binaries?
Hi
Since I am not only ordinary desktop user, but software developer, I'm very interested in full versions(where it is possible) of software on my development and testing boxes. Under "full versions" I mean virgin binaries as they were born by builder and/or additional data files which can provide me all possible information about binaries, which is normally excluded or intentionally not included into packaging/distribution. In two words: debugging information. So question: can I and where can I get such of/from Slackware distribution? regards, FeyFre |
you will have to rebuild the packages you need with debugging turned on and avoid stripping them, modifying the corresponding slackbuilds: you will usually find debug turned off explicitly.
build scripts are made for end users that don't need heavier binaries/libraries with debug information (and gotta say that usually also developers don't like a slow O.S. ;) ) |
Quote:
Quote:
Quote:
|
Slackware does not provide a separate debugging symbols package. Writing the build scripts to support both would seem a nice win-win for everybody. Perhaps this thread will help:
http://www.linuxquestions.org/questi...ackage-921106/ If building only for yourself, you could comment out the stripping commands in the build scripts and add the appropriate cmake/automake debugging option to the build flags. Yeah, I know, a lot of work to rebuild everything. Been there, done that. :) |
One assumes that if the end-user knows what to do with debugging binaries, then he will certainly know how to create them. Hats off to those distros which *do* provide debug packages separately -but what a job to maintain them! Slackware used to provide a debugging package for glibc, but no longer does.
|
Quote:
|
Quote:
Quote:
( STRIP=$(which strip) ; mv "$STRIP" "$STRIP-real"; ln -s $(which true) $STRIP ) Spent a few hours to find possibility to set global flags for gcc/g++ - failed. |
Quote:
Quote:
|
"if you build them from the sources editing the slackbuilds (for CFLAGS, debug options and removing/commenting the stripping section) they will be like the distributed ones but with usable debug informations" Unfortunately, this is not really true on Slackware. You'd have to rebuild them with the same mix of already-re-compiled libraries which were in use *at the time* the official build was made -which could be anytime during the last few years. Building the same versions from the same SlackBuilds is in no way a guarantee that you will get the same result as the standard package. This is because things only get re-compiled when 'needed' -which usually means when a bug/segfault gets noticed and reported by someone. In other words, binary compatibility and consistency is a hit-and-miss proposition.
|
you're right Gilbert, I exxagerated a little ;P
|
Quote:
automake: DEBUG_AUTOTOOL_OPT="--enable-debug=full" cmake: DEBUG_CMAKE_OPT="-ggdb" For automake packages the $DEBUG_AUTOTOOL_OPT variable gets added to the ./configure options as another option. For the cmake packages the $DEBUG_CMAKE_OPT variable gets added to the -DCMAKE_CXX_FLAGS option like this: -DCMAKE_CXX_FLAGS:STRING="$CPUOPT $DEBUG_CMAKE_OPT" Doing those steps will create a larger single package, but as long as you are building for your own purposes or limited distribution, everybody will be happy because they then can use the debugging symbols. Be forewarned, in some case the new package will be significantly larger. :) |
"significantly larger" can be up to 300 times larger in some cases! Not very ofetn, I'll admit, but it does happen. Usually it i2 more like 50%-100% larger.
|
Quote:
If you recompile library A with debugging symbols kept in, you now have library A with debugging symbols and will then see them when using gdb, et al. You will however have to recompile everything in the dependency chain to see everything or some symbols will have a very nondescript number instead of a name. Quote:
|
What I mean is this. Take the gtk2 libraries for instance. There is no way to tell which version of glib2, glibc, etc was installed when they were compiled. It is quite likely that it was linked against a previous version of its' requirement, than the ones which are installed right now -whether you are running current or any of the standard install mixes. Slackware rarely recompiles dependent libraries when a library which is depended *on* gets upgraded, patched or re-compiled. Just in the last few days there has been a thread here where some program was segfaulting until it was re-compiled against the just-upgraded glibc -IIRC.
My point is that when you re-compile a Slackware source, you may or may not get resulting binaries which are functionally equal to those contained in the official package for that version. Compile-time configuration options and the mixture of what is installed and not installed at compile time can also effect the functionality/content of the resulting binaries. |
All times are GMT -5. The time now is 03:32 AM. |