[Gluster-devel] Embedding debug symbols in glusterfsd

Lluís Pàmies i Juárez llpamies at pamies.cat
Tue Feb 4 23:29:00 UTC 2014


Jeff,

Unfortunately, even with the "--enable-debug=yes", "make install" does not
include the debugging symbols for neither libraries (xlators) nor binaries.
I realized that the problem is with the "install" command that strips both
binaries and libraries even when the flag "-s" is not set. At least this is
the behavior in my Arch Linux setting.

I found a solution which is to define my own PKGBUILD file (to build arch
linux installation packages), with "options=(debug !stripe)". Somehow the
"!stripe" must be setting some environment variable to force the "install"
command to not stripe things. After installing the generated package with
"pacman -U" I have binaries and libraries with their own debugging symbols
;). In your case you might be able to do the same with the rpmbuild [1].

[1] https://groups.google.com/forum/#!topic/linux.redhat.rpm/TKz6JZHK0ck

Thank you,





On Tue, Feb 4, 2014 at 2:44 PM, Jeff Darcy <jdarcy at redhat.com> wrote:

>
> I also tried with "export enable_debug=yes" as suggested in [1] without
> success.
>
> At the end of ./configure it indeed says "Enable Debug: yes", and when
> doing "make -n" I can see that the correct flags "-g -O0" are passed to
> gcc. My guess is that at some point of "make install" the debug symbols are
> striped, but I don't see where.
>
> Can anyone guide me on how to embed the debug symbols in the gluster
> daemon?
>
> [1]
> http://www.gluster.org/pipermail/gluster-users/2013-December/038390.html
>
>
> As the cited email mentions, executables seem to get stripped even with
> enable_debug set, but libraries (including translators) should be fine.
> I've
> been building that way (using rpmbuild) and successfully debugging
> translators
> all day today. On the very rare occasions that I want to debug the
> gluster{d,fs,fsd,shd} executable itself, I grab the unstripped version from
> here:
>
> /rpmbuild/BUILD/glusterfs-3git/glusterfsd/src/.libs/glusterfsd
>
> In the past I've used some other tricks to disable the stripping phase of
> rpmbuild, but it seems like those wouldn't apply if you're just doing "make
> install" instead. In fact, I'm not even sure why things would get stripped
> that way, but our build process is so screwy I only look at it when
> something
> breaks.
>



-- 
Lluís Pàmies i Juárez
http://lluis.pamies.cat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20140204/7b263da5/attachment-0001.html>


More information about the Gluster-devel mailing list