[MDEV-2378] LP:942266 - 5.5 builds fail with systemtap-sdt-dev installed on Ubuntu Created: 2012-02-27  Updated: 2014-06-20  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Hartmut Holzgraefe Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug942266.xml    

 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



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2012-05-11 ]

Launchpad bug id: 942266

Generated at Thu Feb 08 06:41:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.