nore...@launchpad.net writes: > ------------------------------------------------------------ > revno: 2809 > committer: Sergei Golubchik <ser...@pisem.net> > branch nick: maria-5.1 > timestamp: Fri 2010-01-29 21:35:56 +0100 > message: > Support building with system libevent > modified: > config/ac-macros/libevent.m4
Thanks! Unfortunately, I was a bit too optimistic about using system libevent. It turns out that the thread scheduler code needs libevent 1.4, but lots of our build systems have only libevent 1.3 in their distros. So we get build failures like this when libevent-dev 1.3 is installed: scheduler.cc: In function ‘bool init_socketpair(int*)’: scheduler.cc:146: error: ‘evutil_socketpair’ was not declared in this scope scheduler.cc:147: error: ‘evutil_make_socket_nonblocking’ was not declared in this scope scheduler.cc: In function ‘void close_socketpair(int*)’: scheduler.cc:154: error: ‘EVUTIL_CLOSESOCKET’ was not declared in this scope scheduler.cc:156: error: ‘EVUTIL_CLOSESOCKET’ was not declared in this scope I guess the solution is to check for system libevent version also, and if too old treat it the same way as not present. Seems we can check for the presense of the evutil_socketpair() function, which was added in libevent 1.4. Then I also need to decide what to do for packages when system libevent is too old. I checked, and Debian 4+5 and Ubuntu up to 9.04 have only libevent 1.3. Ubuntu >= 9.10 has libevent 1.4. I think the best is to use bundled libevent on those older distros. We will then still suffer from https://bugs.launchpad.net/maria/+bug/509521 on those, but hopefully most people using plugins which require libevent will build mariadb themselves and/or use a newer distro. Alternatively, we can disable pool-of-threads on those older distros. (A different alternative would be to see if we can modify the pool-of-threads code to work with libevent 1.3. Not too keen to spend time on this though.) Opinions? - Kristian. _______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp