Bug #62901 5.2.35 build fails with Fedora 15's gcc 4.6 due to missing stddef.h include
Submitted: 23 Oct 2011 23:32 Modified: 1 Nov 2011 1:23
Reporter: Lee Clemens Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.35 OS:Linux (Fedora 15)
Assigned to: CPU Architecture:Any
Tags: compile, Contribution, gcc, workbench

[23 Oct 2011 23:32] Lee Clemens
Description:
Bundled ctemplate prevents successful compilation.

ext/ctemplate/ctemplate-src/src/ctemplate/template_dictionary.h - due to a missing include for the ptrdiff_t definition

How to repeat:
Attempt to make mysql-workbench-gpl-5.2.35-src on Fedora 15 with gcc4.6.1

Suggested fix:
Add #include <stddef.h> to:
./ext/ctemplate/ctemplate-src/src/ctemplate/template_dictionary.h
./ext/ctemplate/ctemplate-src/src/ctemplate/template_dictionary.h.in

Patch provided previously, but not implemented in 5.2.35:
http://bugs.mysql.com/file.php?id=17102
[29 Oct 2011 19:36] Alfredo Kojima
The recommended method to build WB is by using a distribution supplied package for ctemplate, instead of using the bundled one. Our build machines use the following packages:

ctemplate-0.97-1.fc14.x86_64
ctemplate-devel-0.97-1.fc14.x86_64
[1 Nov 2011 1:18] Lee Clemens
Just so I understand correctly, you have bundled source files which will not compile, a very simple patch (an additional #include) has been provided, and you say you Won't Fix? That we should use some other source file instead of the one YOU provide in the source tree?
[1 Nov 2011 1:23] Lee Clemens
In my utter disbelief that yet another pertinet bug has simply been marked Won't Fix, I missed an important part of your post. You are building again Fedora 14's ctemplate, correct?

As Fedora 15 is officially supported (http://dev.mysql.com/doc/workbench/en/wb-requirements-software.html), please reopen this bug and incorporate the included patch (or another solution).
[1 Nov 2011 11:42] Alfredo Kojima
Sources are bundled to make it easier to build WB against distributions where 
ctemplate is not shipped. Which by the time it was included was pretty much everything.
Now that it is being shipped by many distributions, it will soon be unbundled.
Distributors themselves strongly recommend FOR using their own binaries. 
As for the reason fedora15 only has fc14 binaries of ctemplate Fedora people will probably 
know better.