Bug 214413 - Error in specfile makes newscache segfault
Error in specfile makes newscache segfault
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: newscache (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dmitry Butskoy
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-07 10:05 EST by Bart Vanbrabant
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-09 07:46:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bart Vanbrabant 2006-11-07 10:05:24 EST
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.
Comment 1 Dmitry Butskoy 2006-11-07 11:02:50 EST
> 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:
ftp://download.fedora.redhat.com/pub/fedora/linux/extras/6/i386/debug/newscache-debuginfo-1.2-0.4.rc6.fc6.i386.rpm

Perhaps you just recompiled source for some reason, using "gcc" instead of "g++"
?...
Comment 2 Bart Vanbrabant 2006-11-07 12:46:39 EST
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:
http://bart.ulyssis.org/newscache.spec

Everything works like expected when recompiling the rpms with that specfile.
Comment 3 Dmitry Butskoy 2006-11-07 12:56:54 EST
> 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...
Comment 4 Bart Vanbrabant 2006-11-07 13:15:02 EST
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.

Note You need to log in before you can comment on or make changes to this bug.