Bug #45246 Compilation errors - probably gcc4.4 related
Submitted: 1 Jun 2009 15:14 Modified: 15 Oct 2009 15:56
Reporter: Michal Hrusecky Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL GUI Common Severity:S3 (Non-critical)
Version:5.0r14 OS:Linux
Assigned to: CPU Architecture:Any
Tags: Contribution

[1 Jun 2009 15:14] Michal Hrusecky
Description:
I've got two errors during compilation of MySQL GUI Tools. First one is missing stdio.h include in common/library/generic-canvas/source/myx_gc_variant.cpp. In this file functions like sprtinf are used but not defined (their definition is in missing stdio.h file)

Second error is complaining about conversion from const char* to char*.

Both errors were pretty easy to fix and both of them were probably related to usage of gcc 4.4 or glibc 2.10.1. Patch attached, shouldn't do any harm to people using older versions of gcc/glibc

How to repeat:
Try to compile MySQL-Gui-Tools with probably quite new development tools like gcc4.4 or glibc2.10.1

Suggested fix:
Index: common/library/generic-canvas/source/myx_gc_variant.cpp
===================================================================
--- common/library/generic-canvas/source/myx_gc_variant.cpp.orig
+++ common/library/generic-canvas/source/myx_gc_variant.cpp
@@ -22,6 +22,7 @@
 
 #include "myx_gc_variant.h"
 #include "myx_gc_datatypes.h"
+#include <stdio.h>
 
 //----------------------------------------------------------------------------------------------------------------------
 
Index: common/source/linux/MySQLGRT/MGRT.cc
===================================================================
--- common/source/linux/MySQLGRT/MGRT.cc.orig
+++ common/source/linux/MySQLGRT/MGRT.cc
@@ -891,7 +891,7 @@ void MGRT::set_global_value(const char *
 
 void MGRT::unset_global_value(const char *path)
 {
-  char *end= strrchr(path, '/');
+  const char *end= strrchr(path, '/');
   std::string subpath(path, end-path);
   MYX_GRT_VALUE *dict;
[10 Jun 2009 9:36] Susanne Ebrecht
Many thanks for writing a bug report. We are on the way to implement full functionality of MySQL GUI Tools into MySQL Workbench. Unfortunately you are using an unsupported platform. More informations about supported platforms you will find here:

http://www.mysql.com/support/supportedplatforms/tools.html

More informations about MySQL Workbench you will find here:

http://dev.mysql.com/workbench/
[31 Jul 2009 15:50] Lenz Grimmer
Reopening and assigning it to Mike Lischke for inclusion. Mike, this is a trivial fix, can you please apply it?
[15 Sep 2009 15:56] Liz Drachnik
Hello Michal

In order for us to continue the process of reviewing your contribution to MySQL - We need
you to review and sign the Sun|MySQL contributor agreement (the "SCA")

The process is explained here: 
http://forge.mysql.com/wiki/Sun_Contributor_Agreement

Getting a signed/approved SCA on file will help us facilitate your contribution-- this
one, and others in the future.

Thank you !
[15 Oct 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".