Actually trying to do something techical: branch a MySQL Cluster bzr repository - part 1, branch and build

My collagues Anders and even Ivan sometimes blog about the grandeur of being a Sales Engineer. And I agree, it is a great job, probably the best I ever had, so far. But let me share a secret: It's not as technical as you'd think. Sure, they call me a "pre-sales consultant" alright, but I would be ashamed of comparing my own work with those of the real consultants. I sometimes jokingly say that the most amazing technical things in my job are airplanes (they fly in the air!) and how to make a nice slideshow. (OpenOffice Impress sucks btw, and I always envy my OS X + Keynote using friends on this one point.) What I mean is, I mostly meet with customers and talk about the technical stuff, and they think I know what I'm talking about.

Last week I met a childhood friend, and we caught up on each ones careers and families. I told him that the story of my life seems to be that I'm a wannabe developer. I think I am a developer, but in practice I always slip into some quasi technical roles like the one I currently am. He jokingly pointed out: "Have you thought about that it could be because you're not any good at programming".

Anyway, now I'm in a situation that I don't even know how to use Bazaar, because it didn't exist the last time I actually had a real developer job. (Hmm... Actually it did, and Mark Shuttleworth was explaining this new concept to people at DebConf 5 in 2005.) So for whatever reason, I decided I should prove to myself I can use bazaar, download and branch the MySQL Cluster trunk, and do a trivial bugfix.

  1. Read the bzr Manual and some Scenarios. (5 hours, spread on a few nights.)
  2. My canonical source for finding various MySQL Cluster releases and download is of course the Fine Manual. So I end up at Launchpad for the MySQL Cluster 7.0 trunk.
  3. Hmm... I already notice: "Repository format: Packs 6 (uses btree indexes, requires bzr 1.9)" and anticipate that this will become an issue.
  4. So I do "bzr repo-init" and realize bzr is not installed on my laptop. I told you, I only pretend to have a technical job! "sudo apt-get install bzr" installs it in a split second.
  5. $ bzr branch lp:~mysql/mysql-server/mysql-cluster-7.0
    bzr: ERROR: Unknown repository format: 'Bazaar RepositoryFormatKnitPack6 (bzr 1.9)\n'
    $ bzr --version
    Bazaar (bzr) 1.3.1

    ...I knew it!
  6. From the website, click on Downloads, Ubuntu and eventually end up on the bzr launchpad archive page. Follow the instructions there to add a few lines to sources.list file and the GPG key of the bzr developers. When done, Kubuntu automatically notifies me to update to a newer available version of bzr. Next, Next, Next... done. (1 hour (though multitasking on other things at the same time). Total 6 hours.)
  7. Pause, because I don't want to start a big download while on a Skype call.
  8. $ bzr branch lp:~mysql/mysql-server/mysql-cluster-7.0 Again. Go for lunch 2 hours (didn't use exact timing). At the end Kubuntu complains about being out of disk space... But this is more because first-day-of-month backup eats 10G of space at the same time. The bzr tree of mysql-cluster-7.0 turns out to be only 2G.
  9. I create a separate branch called "test".
  10. I cheat and look at Johan's script to get easy parameters for ./configure. But it doesn't work. So I find in the Fine Manual that building from a bzr tree is different than building a source tarball. So I follow the advice there and get obscure "possibly undefined macro: AC_PROG_LIBTOOL" errors. Ok, so I didn't have libtool installed.
  11. I get lots of "`%'-style pattern rules are a GNU make extension errors. But I am using GNU make??? And this should have been fixed? Hmm... So it is pushed into 6.0.12-alpha, a release that is not about to happen, ever. Ok, so I'll continue and just use GNU make then...
  12. Now I can ./configure with the parameters stolen from Johan. Then make.
  13. Take another break. I'll go and vote for Jyrki Kasvi now.
  14. Ok so there are many things I don't know about, but this is funny:
    g++ -I../../../storage/ndb/src/mgmapi -I../../../storage/ndb/src/mgmsrv -I../../../storage/ndb/include/mgmcommon -DMYSQLCLUSTERDIR=\"\" -O3 -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o ndb_config ndb_config-ndb_config.o ndb_config-Config.o ndb_config-ConfigInfo.o ndb_config-InitConfigFileParser.o ../../../storage/ndb/src/.libs/libndbclient.a -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread ../../../dbug/.libs/libdbuglt.a -lpthread -lpthread -lpthread -lpthread ../../../mysys/.libs/libmysyslt.a -lpthread -lpthread -lpthread -lpthread ../../../strings/.libs/libmystringslt.a -lpthread -lpthread -lpthread -lpthread ../../../zlib/.libs/libzlt.a -lrt -lpthread -lcrypt -lnsl -lm -lpthread

    Are you sure you didn't forget one -lpthread?
  15. ../ylwrap: line 111: -d: command not found
    Google tells me I must install flex or bison. I install both. Installing stuff is the one thing where Linux beats everything else. Just a few words and it's done in a second.
  16. Still get the same error. Also try to install yacc - there is no such thing. Install byacc - error persists. Google leads me to Drizzle mailing list where I get the advice to start again from ./configure, since whether tools exist or not will have effects on its output. make. It works!
  17. make install; ls /usr/local/mysqlcluster70/. Yup. It's there. (Another hour or two. In total still less than 10 hours to have both bzr and build toolchain working. I'd say it's acceptable for a rusty old man.

So I can use bzr now. I still don't get why the building has to be so complicated: 1) Why isn't it easier to get yourself a working build environment on Kubuntu? I have installed build-essential package long time ago, but it didn't save me from above. 2) the build tools really give bad error messages when something is missing.

Stay tuned for part II where I try to do something useful with the source code.

Add new comment

The content of this field is kept private and will not be shown publicly. Cookie & Privacy Policy
  • No HTML tags allowed.
  • External and mailto links in content links have an icon.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • Each email address will be obfuscated in a human readable fashion or, if JavaScript is enabled, replaced with a spam resistent clickable link. Email addresses will get the default web form unless specified. If replacement text (a persons name) is required a webform is also required. Separate each part with the "|" pipe symbol. Replace spaces in names with "_".
About the bookAbout this siteAcademicAmazonBeginnersBooksBuildBotBusiness modelsbzrCassandraCloudcloud computingclsCommunitycommunityleadershipsummitConsistencycoodiaryCopyrightCreative CommonscssDatabasesdataminingDatastaxDevOpsDrizzleDrupalEconomyelectronEthicsEurovisionFacebookFrosconFunnyGaleraGISgithubGnomeGovernanceHandlerSocketHigh AvailabilityimpressionistimpressjsInkscapeInternetJavaScriptjsonKDEKubuntuLicensingLinuxMaidanMaker cultureMariaDBmarkdownMEAN stackMepSQLMicrosoftMobileMongoDBMontyProgramMusicMySQLMySQL ClusterNerdsNodeNoSQLodbaOpen ContentOpen SourceOpenSQLCampOracleOSConPAMPPatentsPerconaperformancePersonalPhilosophyPHPPiratesPlanetDrupalPoliticsPostgreSQLPresalespresentationsPress releasesProgrammingRed HatReplicationSeveralninesSillySkySQLSolonStartupsSunSybaseSymbiansysbenchtalksTechnicalTechnologyThe making ofTungstenTwitterUbuntuvolcanoWeb2.0WikipediaWork from HomexmlYouTube