[syslog-ng] Broken Debug Behavior in libdbi

Matthew Hall mhall at mhcomputing.net
Wed Jan 5 03:20:11 CET 2011


Hello,

Sorry about the cross-post, this came up in the interaction of two 
different pieces of software used together.

libdbi's configure.in and other files contain some broken code which is 
preventing me from debugging a segfault in dbi_initialize when this 
function is called by syslog-ng.

1) The code is stripping the libraries of debug symbols when 'make 
install' is called which violates the GNU coding standards.

To fix this, I want to disable library stripping that it is doing which 
is not in line with the standards and would appreciate advice on how to 
do this.

2) I could work around it using the make debug target, but then the 
could would ignore my CFLAGS which are:

-m32 -g -I /home/y/include

Ignoring these causes it to try to generate a 64-bit library which won't 
be compatible with the syslog-ng binary I want to build.

To fix this, I want to make sure that the DEBUG target is not ignoring 
or overriding the 'upstream' user flags, but merely adding to them, so 
that my '-m32' and my '-I' are not lost, which causes build breakage for 
me, and my '-g' gets duplicated.

3) To work around these problems for now I'm going to patch configure.in 
and rerun autoconf unless there is an alternative proposal.

Thanks,
Matthew Hall.

Here is the problematic flag setup being done in configure.in:

if test -z "$GCC"; then
        case $host in
        *-*-irix*)
                if test -z "$CC"; then
                        CC=cc
                fi
                DEBUG="-g -signed"
                CFLAGS="-O2 -w -signed"
                PROFILE="-p -g3 -O2 -signed" ;;
        sparc-sun-solaris*)
                DEBUG="-v -g"
                CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
                PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
        *)
                DEBUG="-g"
                CFLAGS="-O"
                PROFILE="-g -p" ;;
        esac
else

        case $host in
        *-*-linux*)
                DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
                CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char -std=gnu99"
                PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char -std=gnu99";;
        sparc-sun-*)
                DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8 -std=gnu99"
                CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8 -std=gnu99"
                PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8 -std=gnu99" ;;
        *)
                DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
                CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
                PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char -std=gnu99" ;;
        esac
fi



More information about the syslog-ng mailing list