gcc-4.3 build failure of bonnie++

Benjamin Kreuter ben.kreuter at gmail.com
Sat Feb 9 20:15:25 UTC 2008


On Friday 08 February 2008 19:25:17 Warren Togami wrote:
> bonnie++ hasn't changed in many years now.
>
> http://koji.fedoraproject.org/koji/getfile?taskID=405053&name=build.log
> g++ -O2  -DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wwrite-strings
> -pedantic -ffor-scope  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 zcav.cpp
> -o zcav bon_suid.o
> zcav.cpp: In function 'int main(int, char**)':
> zcav.cpp:73: error: 'strdup' was not declared in this scope
> zcav.cpp:75: warning: suggest a space before ';' or explicit braces
> around empty body in 'for' statement
> zcav.cpp:112: error: 'strcmp' was not declared in this scope
> make: *** [zcav] Error 1
> make: *** Waiting for unfinished jobs....
> error: Bad exit status from /var/tmp/rpm-tmp.62211 (%build)

Add this to the very top of zcav.cpp:

#include <cstring>

using namespace std;

GCC 4.3 uses a streamlined header structure, which is standards compliant but 
causes code that relied on implicitly included headers to break.  For future 
reference, all C++ programmers should be aware that it is a best practice to 
always explicitly include whatever you need.

-- Benjamin Kreuter



-- 
Message sent on: Sat Feb 9 15:13:57 EST 2008
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20080209/73269f6d/attachment.sig>


More information about the fedora-devel-list mailing list