Bug #45798 Build failed with gcc 4.4.0 - boost version is too old
Submitted: 27 Jun 2009 8:17 Modified: 28 Aug 2009 10:53
Reporter: Remi Collet (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.15 OS:Linux (Fedora 11)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: CHECKED

[27 Jun 2009 8:17] Remi Collet
Description:
I seems than "#elif BOOST_PP_ITERATION_DEPTH()" syntax is no more accepted by GCC 4.4.

See https://svn.boost.org/trac/boost/ticket/2069

How to repeat:
NOCONFIGURE=yes ./autogen.sh
./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-debug --enable-python-modules
make -j3

--------

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -Isrc -I../../generated -I../../backend/wbpublic -I../../library/grt/src -I../../library/utilities/src -I../../modules/interfaces -I../../modules -I../../library/grt/src/diff -I../../library/sql-parser/include -I../../library/sql-parser/source -I../../library/sql-parser/source/linux -I../../ext -I../../library/tinyxml -I../../library/utilities/src -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 -I/usr/include/python2.6 -DENABLE_LUA_MODULES -DENABLE_PYTHON_MODULES -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -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_sql_inserts_loader.lo -MD -MP -MF .deps/mysql_sql_inserts_loader.Tpo -c src/mysql_sql_inserts_loader.cpp  -fPIC -DPIC -o .libs/mysql_sql_inserts_loader.o
In file included from ../../ext/boost/mpl/apply.hpp:23,
                 from ../../ext/boost/iterator/iterator_facade.hpp:34,
                 from ../../ext/boost/iterator/iterator_adaptor.hpp:15,
                 from ../../ext/boost/iterator/reverse_iterator.hpp:12,
                 from ../../ext/boost/range/reverse_iterator.hpp:20,
                 from ../../ext/boost/range/rend.hpp:19,
                 from ../../ext/boost/foreach.hpp:72,
                 from src/mysql_sql_inserts_loader.cpp:5:
../../ext/boost/mpl/apply_wrap.hpp:81:31: error: missing binary operator before token "("
../../ext/boost/mpl/apply_wrap.hpp:173:31: error: missing binary operator before token "("
In file included from ../../ext/boost/mpl/bind.hpp:27,
                 from ../../ext/boost/mpl/lambda.hpp:18,
                 from ../../ext/boost/mpl/apply.hpp:25,
                 from ../../ext/boost/iterator/iterator_facade.hpp:34,
                 from ../../ext/boost/iterator/iterator_adaptor.hpp:15,
                 from ../../ext/boost/iterator/reverse_iterator.hpp:12,
                 from ../../ext/boost/range/reverse_iterator.hpp:20,
                 from ../../ext/boost/range/rend.hpp:19,
                 from ../../ext/boost/foreach.hpp:72,
                 from src/mysql_sql_inserts_loader.cpp:5:
../../ext/boost/mpl/apply_wrap.hpp:81:31: error: missing binary operator before token "("
../../ext/boost/mpl/apply_wrap.hpp:173:31: error: missing binary operator before token "("
In file included from ../../ext/boost/mpl/lambda.hpp:18,
                 from ../../ext/boost/mpl/apply.hpp:25,
                 from ../../ext/boost/iterator/iterator_facade.hpp:34,
                 from ../../ext/boost/iterator/iterator_adaptor.hpp:15,
                 from ../../ext/boost/iterator/reverse_iterator.hpp:12,
                 from ../../ext/boost/range/reverse_iterator.hpp:20,
                 from ../../ext/boost/range/rend.hpp:19,
                 from ../../ext/boost/foreach.hpp:72,
                 from src/mysql_sql_inserts_loader.cpp:5:
../../ext/boost/mpl/bind.hpp:364:31: error: missing binary operator before token "("
../../ext/boost/mpl/bind.hpp:531:31: error: missing binary operator before token "("
In file included from ../../ext/boost/mpl/lambda.hpp:22,
                 from ../../ext/boost/mpl/apply.hpp:25,
                 from ../../ext/boost/iterator/iterator_facade.hpp:34,
                 from ../../ext/boost/iterator/iterator_adaptor.hpp:15,
                 from ../../ext/boost/iterator/reverse_iterator.hpp:12,
                 from ../../ext/boost/range/reverse_iterator.hpp:20,
                 from ../../ext/boost/range/rend.hpp:19,
                 from ../../ext/boost/foreach.hpp:72,
                 from src/mysql_sql_inserts_loader.cpp:5:
../../ext/boost/mpl/aux_/full_lambda.hpp:230:31: error: missing binary operator before token "("
In file included from ../../ext/boost/iterator/iterator_facade.hpp:34,
                 from ../../ext/boost/iterator/iterator_adaptor.hpp:15,
                 from ../../ext/boost/iterator/reverse_iterator.hpp:12,
                 from ../../ext/boost/range/reverse_iterator.hpp:20,
                 from ../../ext/boost/range/rend.hpp:19,
                 from ../../ext/boost/foreach.hpp:72,
                 from src/mysql_sql_inserts_loader.cpp:5:
../../ext/boost/mpl/apply.hpp:138:31: error: missing binary operator before token "("

Suggested fix:
Update to boost >= 1.37

Using system boost library is also a solution, and a packaging common rules in most distribution (this also apply to curl, libsigc++, ...).
[30 Jun 2009 8:51] Susanne Ebrecht
Verified as described.
[30 Jun 2009 8:52] Susanne Ebrecht
Bug #45797 is a duplicate of this bug here
[30 Jun 2009 8:53] Susanne Ebrecht
Bug #45049 is a duplicate of this bug here
[30 Jun 2009 8:53] Susanne Ebrecht
All added duplicates also have patches from users attached
[30 Jun 2009 12:13] Susanne Ebrecht
We don't support gcc 4.4.0 at the moment but we will fix this soon so that compiling with gcc 4.4.0 also will work.
[12 Aug 2009 19:29] Alfredo Kojima
Changed so that boost is taken from system not bundled one. 
Note: other libs (libsigc++ etc) are mostly taken from system too, they're there only for Windows
[14 Aug 2009 14:58] Johannes Taxacher
included in 5.1.17
[28 Aug 2009 10:53] Tony Bedford
An entry was added to the 5.1.17 changelog:

When compiling the MySQL Workbench source code with GNU C Compiler (GCC) version 4.4.0, the compilation failed, as the version of the Boost library used was not compatible with GCC 4.4.0.

The version of the Boost library required for compatibility with GCC 4.4.0 is 1.37 or later.