Bug 214413 - Error in specfile makes newscache segfault
Summary: Error in specfile makes newscache segfault
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: newscache
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dmitry Butskoy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-07 15:05 UTC by Bart Vanbrabant
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-11-09 12:46:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bart Vanbrabant 2006-11-07 15:05:24 UTC
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 16:02:50 UTC
> 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 17:46:39 UTC
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 17:56:54 UTC
> 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 18:15:02 UTC
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.