Compiling with mysql on intel mac


I am trying to compile ROOT 5.12.00f on a new intel mac (OS X 10.4.8, gcc 4.0.1) with mysql (5.0.27) enabled. MySQL is installed in /usr/local/mysql/*. After configuring the ROOT build, config.status reads:


and config.log indicates that mysql_config was found successfully. However, when compiling, I get the following error:

[quote]mysql/src/TMySQLServer.cxx: In constructor ‘TMySQLServer::TMySQLServer(const char*, const char*, const char*)’:
mysql/src/TMySQLServer.cxx:94: error: ‘ulong’ was not declared in this scope
mysql/src/TMySQLServer.cxx:94: error: expected )' before numeric constant mysql/src/TMySQLServer.cxx:94: error: expected)’ before ‘;’ token
mysql/src/TMySQLServer.cxx:100: error: ‘ulong’ was not declared in this scope
mysql/src/TMySQLServer.cxx:100: error: expected )' before numeric constant mysql/src/TMySQLServer.cxx:100: error: expected)’ before ‘;’ token
make: *** [mysql/src/TMySQLServer.o] Error 1
make: *** Waiting for unfinished jobs…
rm utils/src/RStl_tmp.cxx utils/src/rootcint_tmp.

I also have tried specifying the mysql include/lib directories to configure by hand, but the error is the same. The same error also occurs when trying to compile ROOT v5.13.04.[/quote]

Thanks in advance for any thoughts/suggestions!



this has just been fixed in the cvs head of ROOT. To fix it in your version add in mysql/src/TMySQLServer.cxx the line:

#include “TObjArray.h”

#include <my_global.h> // <- add this line