Re: gcc-4.3 build failure of bonnie++

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

 



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

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux