Description of problem:
In the specfile the c, cpp and linker flags are overridden instead of adding the
extra flags for static linking the socket++ library. Changing them to:
export CFLAGS="$CFLAGS -I ... " with ... the actual flags of course
The other two should be changed to. The configure script also uses CXXFLAGS
instead of CPPFlAGS. The segfault occurs in a cpp section of newscache so this
could also be the cause.
The segfault occurs when using pam authentication, I guess all other
authentication methods will suffer from the same problem.
I noticed the problem in the specfile because no debuginfo rpm is generated.
This is possibly due to the -g argument for gcc is omitted.
> In the specfile the c, cpp and linker flags are overridden
I agree for "CFLAGS" only.
Consider the "configure" macro (normally specified in
/usr/lib/rpm/redhat/macros). "CPPFLAGS" and "LDFLAGS" (the preprocessor and
linker additional flags) are not touched anywhere, unlike the CFLAGS surely.
> export CFLAGS="$CFLAGS -I ... "
It should be "export CFLAGS="$RPM_OPT_FLAGS -I ...", as CFLAGS is yet not
defined in that place at all ;)
But I still not understood why it produces a crash in your case. Actually, even
the "wrong" CFLAGS makes no much sense, as all the code seems to be C++ only
(and CFLAGS are used as an addon to CXXFLAGS only).
> The other two should be changed to.
Nope, as shown above.
> The configure script also uses CXXFLAGS instead of CPPFlAGS.
Misunderstanding here: CXXFLAGS for C++ compiler, CPPFLAGS for C preprocessor
(i.e. a step before the actual C or C++ compiling).
> because no debuginfo rpm is generated.
??? Well, what is it then:
Perhaps you just recompiled source for some reason, using "gcc" instead of "g++"
I recompiled the srpm on CentoOS 4.4 and experienced that segfault when using
pam authentication. I didn't find the problem so I installed it on my FC6
machine and there I experienced the same problem.
Today I changed the the specfile on the CentOS like this:
Everything works like expected when recompiling the rpms with that specfile.
> I installed it on my FC6 machine and there I experienced the same problem.
What rpm exactly? The standard FC6's one or you have recompiled srpm under FC6 too?
> Everything works like expected when recompiling the rpms with that specfile.
Under CentOS or under FC6 too?
In other words, could you download and install standard rpm package to your FC6
machine and try it?
I am asking such questions as I cannot catch the problem... Changing CFLAGS does
nothing for me, even compiled binaries are not differ...
I was using newscache from extras on my FC6 box, I didn't compile it myself. I
don't seem to be able to reproduce it now.
So if the compiler options get fixed this bug can be closed.