|
From: Matthew H. <mh...@mh...> - 2011-01-05 12:29:02
|
I am resending because libdbi-* blocks non-subscriber posts.
On Tue, Jan 04, 2011 at 06:20:11PM -0800, Matthew Hall wrote:
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
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.campin.net/syslog-ng/faq.html
|
|
From: Matthew H. <mh...@mh...> - 2011-01-06 02:03:11
|
On Tue, Jan 04, 2011 at 06:20:11PM -0800, Matthew Hall wrote:
> 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.
As promised, a hacky workaround patch is pasted below.
I'd like to improve upon this bad situation, probably by appending the
user CFLAGS after the custom package CFLAGS to take priority (the last
entries generally take precedence, AIUI), but I'm not incredibly
experienced with how this code is supposed to work so I'd like some
advice before trying something like this.
Thanks,
Matthew.
diff -ruN -x '*m4*' -x 'config.*' -x configure -x 'Makefile.*' -x ltmain.sh old/libdbi-0.8.4/configure.in new/libdbi-0.8.4/configure.in
--- old/libdbi-0.8.4/configure.in 2010-08-31 15:35:12.000000000 -0700
+++ new/libdbi-0.8.4/configure.in 2011-01-05 13:36:54.561314455 -0800
@@ -47,25 +47,25 @@
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
*)
- DEBUG="-g"
- CFLAGS="-O"
- PROFILE="-g -p" ;;
+ DEBUG="-g -m32 -I /home/y/include"
+ CFLAGS="-O -m32 -I /home/y/include"
+ PROFILE="-g -p -m32 -I /home/y/include" ;;
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";;
+ DEBUG="-g -m32 -I /home/y/include -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
+ CFLAGS="-g -O20 -m32 -I /home/y/include -ffast-math -D_REENTRANT -fsigned-char -std=gnu99"
+ PROFILE="-pg -g -O20 -m32 -I /home/y/include -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" ;;
+ DEBUG="-g -m32 -I /home/y/include -Wall -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
+ CFLAGS="-g -O20 -m32 -I /home/y/include -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
+ PROFILE="-O20 -g -pg -m32 -I /home/y/include -D__NO_MATH_INLINES -fsigned-char -std=gnu99" ;;
esac
fi
diff -ruN -x '*m4*' -x 'config.*' -x configure -x 'Makefile.*' -x ltmain.sh old/libdbi-drivers-0.8.3-1/configure.in new/libdbi-drivers-0.8.3-1/configure.in
--- old/libdbi-drivers-0.8.3-1/configure.in 2008-03-03 09:41:41.000000000 -0800
+++ new/libdbi-drivers-0.8.3-1/configure.in 2011-01-05 13:45:48.001227902 -0800
@@ -48,25 +48,25 @@
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
*)
- DEBUG="-g"
- CFLAGS="-O"
- PROFILE="-g -p" ;;
+ DEBUG="-g -m32 -I /home/y/include"
+ CFLAGS="-O -m32 -I /home/y/include"
+ PROFILE="-g -p -m32 -I /home/y/include" ;;
esac
else
case $host in
*-*-linux*)
- DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
- CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char"
- PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
+ DEBUG="-g -m32 -I /home/y/include -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
+ CFLAGS="-g -O20 -m32 -I /home/y/include -ffast-math -D_REENTRANT -fsigned-char"
+ PROFILE="-pg -g -O20 -m32 -I /home/y/include -ffast-math -D_REENTRANT -fsigned-char";;
sparc-sun-*)
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8"
CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
*)
- DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
- CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char"
- PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
+ DEBUG="-g -m32 -I /home/y/include -Wall -D__NO_MATH_INLINES -fsigned-char"
+ CFLAGS="-g -O20 -m32 -I /home/y/include -D__NO_MATH_INLINES -fsigned-char"
+ PROFILE="-O20 -g -pg -m32 -I /home/y/include -D__NO_MATH_INLINES -fsigned-char" ;;
esac
fi
|
|
From: Balazs S. <ba...@ba...> - 2011-01-13 15:58:16
|
On Wed, 2011-01-05 at 18:03 -0800, Matthew Hall wrote: > On Tue, Jan 04, 2011 at 06:20:11PM -0800, Matthew Hall wrote: > > 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. > > As promised, a hacky workaround patch is pasted below. > > I'd like to improve upon this bad situation, probably by appending the > user CFLAGS after the custom package CFLAGS to take priority (the last > entries generally take precedence, AIUI), but I'm not incredibly > experienced with how this code is supposed to work so I'd like some > advice before trying something like this. autoconf automatically adds values to variables like CFLAGS (like it automatically adds -O2 if the user doesn't specify it in the environment). Since this is the default behaviour, packages often completely wipe out the CFLAGS value in their debug-builds in order to avoid -O2 being present. The solution in my configure scripts is to use the shell variable "ac_cv_env_CFLAGS_value", which stores the original user-sipplied value. This way, those don't get ignore in debug builds, but I can strip out -O2 unless explicitly specified by the user. -- Bazsi |