Bug #45797 Build failed with gcc 4.4.0
Submitted: 27 Jun 2009 6:47 Modified: 30 Jun 2009 8:51
Reporter: Remi Collet (OCA) Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.15 OS:Linux (Fedora 11)
Assigned to: CPU Architecture:Any

[27 Jun 2009 6:47] Remi Collet
Some include are no more implicit with gcc 4.4.0

How to repeat:
NOCONFIGURE=yes ./autogen.sh
%configure --disable-debug --enable-python-modules
make %{?_smp_mflags}

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I.. -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -DUNIV_LINUX -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wextra -Wall -Wno-unused -Wno-deprecated -MT mysql_ps_resultset.lo -MD -MP -MF .deps/mysql_ps_resultset.Tpo -c mysql_ps_resultset.cpp -o mysql_ps_resultset.o >/dev/null 2>&1
mysql_art_resultset.cpp: In member function 'std::string sql::mysql::MyVal::getString()':
mysql_art_resultset.cpp:57: error: 'snprintf' was not declared in this scope
mysql_art_resultset.cpp:63: error: 'snprintf' was not declared in this scope
mysql_art_resultset.cpp:69: error: 'snprintf' was not declared in this scope
mysql_art_resultset.cpp:75: error: 'snprintf' was not declared in this scope

Suggested fix:
Need an #include <cstdio>  in 
- ext/cppconn/driver/mysql_art_resultset.cpp
- ext/cppconn/driver/mysql_art_rset_metadata.cpp
- ext/cppconn/driver/mysql_resultbind.cpp
- library/canvas/src/mdc_algorithms.cpp
- library/canvas/src/mdc_common.h
- library/forms/filechooser.cpp
- library/forms/mforms.cpp

See http://remi.fedorapeople.org/mysql-workbench-oss-5.1.12-gcc44.patch

This additionnal include doesn't break anything with older gcc.
[30 Jun 2009 8:51] Susanne Ebrecht
This is a duplicate of bug #45798