5.5 builds fail with systemtap-sdt-dev installed on Ubuntu

Bug #942266 reported by Hartmut Holzgraefe on 2012-02-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Vladislav Vaintroub

Bug Description

With systemtap-sdt-dev installed compilation fails with

[ 25%] Building CXX object storage/myisam/CMakeFiles/myisam.dir/ha_myisam.cc.o
In file included from /usr/include/sys/sdt.h:65:0,
                 from /home/hartmut/projects/mariadb/releases/mariadb-5.5.20/build/include/probes_mysql_dtrace.h:9,
                 from /home/hartmut/projects/mariadb/releases/mariadb-5.5.20/include/probes_mysql.h:24,
                 from /home/hartmut/projects/mariadb/releases/mariadb-5.5.20/sql/sql_class.h:38,
                 from /home/hartmut/projects/mariadb/releases/mariadb-5.5.20/storage/myisam/ha_myisam.cc:32:
/usr/include/c++/4.6/limits:309:11: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/4.6/limits:313:11: error: macro "max" requires 2 arguments, but only 1 given

as min/max macros have already been defined by my_globals.h when mysql_probe_dtrace.h is included which in turn includes sys/sdt.h and (when compiled in C++ mode) eventually the C++ limits header. This header defines some template classes with min() and max() methods. These method names are mangled due to the previous macro definitions and so compilation fails.

Solution: make sure probes_mysql_dtrace.h gets included before my_globals.h

Workarounds: set ENABLE_DTRACE=OFF in cmake cache or uninstall systemtap-sdt-dev

See also upstream bug http://bugs.mysql.com/bug.php?id=64477

Changed in maria:
assignee: nobody → Vladislav Vaintroub (wlad-montyprogram)
importance: Undecided → Medium
milestone: none → 5.5
Changed in maria:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers