[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] "buffer overflow detected" error on fedora distributions.

On Sat, 2008-02-16 at 17:50 +0100, Kern Sibbald wrote:
> > There may be another way around this. All of the above is only true when
> > you invoke the %configure macro. Kern, correct me if I'm wrong, but if I
> > replaced %configure with ./configure then wouldn't the configure script
> > set up all the compiler flags as intended by bacula?
> Yes, it should do as you expect, providing the rpm has not modified the 
> environment variables, and providing they don't count on any of their 
> particular options being set.  You might try it since it would be a much 
> simpler solution.
Well that should have worked according to what I see in the system macro
files but it didn't. It's difficult to actually catch a compiler command
in bacula anymore, most being hidden behind "compiling file.c" sort of
stuff. But QT stills bares itself and when I made the above change and
tested it on Fedora 8, FORTIFY_SOURCE was still set to 2.

So I think I am done with this issue unless someone can advise me. For
now I have set the following line in my .rpmmacros file for building the
Fedora 8 binaries I will supply:

%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=0
-fno-exceptions -fno-strict-aliasing -fno-rtti

It will require a different solution in other distributions as it
becomes a problem since they don't share common macro names or even file
structure. For example in SUSE, were it necessary at this point to do
the same thing, there is no %__global_cflags variable, you have to set 
%optflags as copied and modified from the platform folder
in /usr/lib/rpm/...

The use of global distribution compiler options is generally accepted to
be a good thing, it gives you a certainty that all software is compiled
in a consistent manner. And the distribution can say things like, we are
addressing security concerns by setting FORTIFY_SOURCE=2. The problem is
that rpm doesn't permit modification of those global settings at the
package level in the way that say Gentoo does with portage as far as I
can determine.

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.