{"id":641,"date":"2007-10-11T10:17:07","date_gmt":"2007-10-11T15:17:07","guid":{"rendered":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/10\/11\/building-mysql-from-source"},"modified":"2007-10-11T19:34:33","modified_gmt":"2007-10-12T00:34:33","slug":"building-mysql-from-source","status":"publish","type":"post","link":"https:\/\/www.bytebot.net\/blog\/archives\/2007\/10\/11\/building-mysql-from-source","title":{"rendered":"Building MySQL from source"},"content":{"rendered":"<p>So others know how I check out a fresh tree, here are instructions to building MySQL from <a href=\"http:\/\/mysql.bkbits.net\/\">mysql.bkbits.net<\/a>, using the free <tt>bkf<\/tt> tool.<\/p>\n<ul>\n<li>in ~\/code, do <tt>bkf clone bk:\/\/mysql.bkbits.net\/mysql-5.0-community mysql-5.0-community<\/tt> to clone to community tree down to your disk<\/li>\n<li>wait patiently, while bitkeeper attempts to suck some of your bandwidth<\/li>\n<li>now, do <tt>BUILD\/compile-dist<\/tt>, and wait while MySQL builds<\/li>\n<li>you might find it handy to now get the test suite on your build, via <tt>make test<\/tt><\/li>\n<li>run <tt>make dist<\/tt>, and you&#8217;ll have nice dandy <em>source<\/em> tarballs to go with your build for easy installation\/distribution\/etc.<\/li>\n<li>if you encounter problems, say with ndb (and you&#8217;re not testing against it), you can run <tt>make dist --ignore ndb<\/tt> for instance<\/li>\n<\/ul>\n<p>If for some reason you don&#8217;t want the latest development tree, and say, are more interested in a tag, all you need to do is find the appropriate tree under the Repository section on bkbits, click on it, head over to tags, find an appropriate tag, and execute a <tt>bkf clone -rTAG bk:\/\/mysql.bkbits.net\/mysql-5.0-community mysql-5.0-community-TAG<\/tt>. You now have a mysql version that matches a certain tag. Build as per above.<\/p>\n<p>To keep up-to-date, just run <tt>bkf pull<\/tt>.<\/p>\n<p>If you actually need to install supporting packages (or bkf itself!), etc. on say Ubuntu or Fedora, read <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/installing-source-tree.html\">Installing from the Development Source Tree<\/a>, part of the excellent MySQL manual. Also, executing <tt>bkf --help<\/tt> is pretty easy. The tool itself is pretty brain-dead, quite unlike its older (commercial) brother, BitKeeper (bk).<\/p>\n<p><strong>Update:<\/strong> I should clarify that <tt>make dist<\/tt> alone, only gives you a pristine source tarball for distribution, etc. What I normally do is hook it into the package management system of the platform of my choice (usually RPM or DEB), and build binaries that way. However, if you want a binary tarball, there&#8217;s an additional step in that you need to run <tt>scripts\/make_binary_distribution<\/tt> (generally, after running tests!). This will be a tarball that contains a <em><strong>binary<\/strong><\/em> for distribution. Heads up to <a href=\"http:\/\/datacharmer.blogspot.com\/\">Giuseppe<\/a> for dropping me a line.<\/p>\n<p>Technorati Tags: <a href=\"http:\/\/technorati.com\/tag\/mysql\" class=\"performancingtags\" rel=\"tag\">mysql<\/a>, <a href=\"http:\/\/technorati.com\/tag\/bkf\" class=\"performancingtags\" rel=\"tag\">bkf<\/a>, <a href=\"http:\/\/technorati.com\/tag\/bkbits\" class=\"performancingtags\" rel=\"tag\">bkbits<\/a>, <a href=\"http:\/\/technorati.com\/tag\/tarballs\" class=\"performancingtags\" rel=\"tag\">tarballs<\/a>, <a href=\"http:\/\/technorati.com\/tag\/source\" class=\"performancingtags\" rel=\"tag\">source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So others know how I check out a fresh tree, here are instructions to building MySQL from mysql.bkbits.net, using the free bkf tool. in ~\/code, do bkf clone bk:\/\/mysql.bkbits.net\/mysql-5.0-community mysql-5.0-community to clone to community tree down to your disk wait patiently, while bitkeeper attempts to suck some of your bandwidth now, do BUILD\/compile-dist, and wait [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[23],"tags":[],"class_list":["post-641","post","type-post","status-publish","format-standard","hentry","category-mysql"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p4vJD-al","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/comments?post=641"}],"version-history":[{"count":0,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/641\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/media?parent=641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/categories?post=641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/tags?post=641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}