Feb
23
2009

Installing Apache Thrift on Mac OS X 10.5 Leopard

Thrift is a efficient framework for cross-language serialization and RPC that recently became an Apache Incubator project. It’s definately a cool project to check out if you are building a high traffic web application or are writing distributed computing code. Installing the framework on OS X isn’t currently totally straightforward, provided below is a guide to get Thrift built on OS X Leopard.

First, gather required sources – Thrift depends on the Boost and libevent libraries, grab the latest revisions of each and then download the latest Thrift snapshot.

Build Boost first:

cd [boost root]
./configure
sudo make install

This takes a while, go make a cup of coffee – and when it finishes build libevent, which takes much less time:

cd [libevent root]
./configure
make
sudo make install

At this point is where most Thrift builds will run into trouble, as the pkg.m4 file required by autoconf in upcoming steps does not get correctly found.The following error will be encountered when trying to configure the package:

./configure: line 21183: syntax error near
unexpected token `MONO,'
./configure: line 21183: `  PKG_CHECK_MODULES(MONO, mono >= 1.2.6,
have_mono=yes, have_mono=no)'

The official faq says that in order to get this file, one should install macports, and then use it to install pkg-config – but as macports is a colossal pain in the ass, we’ll do something else.  The pkg.m4 file is also installed when X11 is installed off the OS install disc, and since X11 is something you can’t live without if you’re working on or with mainstream open source software, that is the route we will take. After installing X11 (not shown here, because it just consists of running the installer package on the OS X disc), do the following to get pkg.m4 where it needs to be:

cd [thrift root]
cp /usr/X11/share/aclocal/pkg.m4 aclocal/

After doing this, Thrift can build without issues, which will take some time, but not nearly as long as Boost did:

./bootstrap.sh
./configure
make
sudo make install

Hope this helps anyone trying to write Thrift code on OS X!

12 Comments »

  • [...] a recent post, I explained how to install the Thrift RPC framework on OS X 10.5. Another scenario that doesn’t install as advertised out of the box is building Thrift on [...]

  • dyu says:

    Thanks man, this really helped!
    Have you tried running thrudb on 10.5 leopard as well?

    Cheers

  • mluebbe says:

    Have not tried thrudb on OS X yet, but probably will soon as I’m doing a lot of work currently with Lucene and am interested in thrudex.
    Have you done any work with thrudb on OS X?

  • [...] the Mac you can use the MacPorts to install the required packages.. Max also had a good page on Installing Apache Thrift on Mac OS X 10.5 Leopard that doesn’t require [...]

  • Jake says:

    I’ve spent a lot of time getting things to compile smoothly on osx. let me know if you have any issues.

  • mluebbe says:

    Jake, your project looks really interesting! Thanks for taking the time to comment, I’m looking forward to having a chance to play with thrudb this weekend!

  • Dan says:

    I had an additional problem with the current code as of April 22, 2009. When building the java module, the build fails because it can’t find a copy of log4j.jar. This is the fix:

    Create ~/.thrift-build.properties and use it to point to a log4j jar somewhere on your system:

    thrift.extra.cpath=/tmp/log4j-1.2.15.jar

    There is an open issue about this you can track:

    http://issues.apache.org/jira/browse/THRIFT-453

  • mluebbe says:

    Thanks for posting that! I’m going to try and replicate that tonight – I’ll add your workaround after I check it out myself.

  • Ovidiu S says:

    Thank you very much for posting this. It works like a charm. It would have taken me ages to solve this by myself.

  • andrew says:

    On my Mac, the thrift install hung during make at

    (dix) enabling device 0
    (dix) enabling device 1
    (dix) enabling device 2
    (dix) enabling device 3
    (dix) enabling device 4
    (dix) enabling device 6
    AllocNewConnection: client index = 1, socket fd = 9

    Somehow the installer then managed to pop up X11, and if I went over to X11 and created a new window, I’d see a new line of

    AllocNewConnection: client index = [another number], socket fd = [some other number]

    The solution is to SKIP the bootstrap.sh step. If you’ve already run bootstrap.sh, just re-download a fresh copy of thrift.

  • Anil Pillai says:

    @Andrew.

    I got the same error : “AllocNewConnection: client index = [another number], socket fd = [some other number]“.

    Reinstalled thrift package and ran make. It worked fine. Thanks

    Somewhere else on the web, folks have recommended installing X11 since this is caused by some python dependency. Id highly recommend against that since X11 is quite central and can screw other things up.

    -ap

  • Bhupesh Bansal says:

    I ran into this error

    /usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
    /usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
    src/protocol/fastbinary.c:1203: fatal error: error writing to -: Broken pipe
    compilation terminated.
    lipo: can’t open input file: /var/tmp//ccfANjoF.out (No such file or directory)
    error: command ‘gcc-4.2′ failed with exit status 1

    setting ARCHFLAGS helped

    export ARCHFLAGS=’-arch i386 -arch x86_64′

RSS feed for comments on this post. TrackBack URL


Leave a Reply

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com

  • Buy Cheap phentermine fedex Online Low Prices. Discount Pharmacy Online.
  • Buy Cheapest weight loss medication over the counter Online Pharmacy Store. Cheap Pharmacy Online.
  • Buy Cheap nexium canadian Now Online Prices For nexium canadian! Pharmacy Store.
  • Buy Cheap buy online without prescription ativan Now Cheap Pharmacy Online. No Prescription Needed.
  • Buying Cheap levitra sample. Worldwide Rx, Good Prices. WorldWide Shipping.
  • Buy Cheap online valtrex Now Low Prices. Safe And Secure Payment System.
  • Buy cheap generic viagra Online Without Prescription. Best Internet. Best Prices.
  • Buy Cheapest low cost zolpidem Now Pharmacy Store. Discount Pharmacy Online.
  • Buy Cheapest sleeping disorder information Online 24/Online Pharmacy. Pharmacy Store.
  • Buy Cheap genuine viagra Now Drug Store Without A Prescription. Low Prices.
  • Buy Cheap prescription medications for depression Now Best Internet. Special Prices For prescription medications for depression!
  • Buy Cheapest should i take valium Now WorldWide Shipping. Buy Medications Online.
  • Buy Cheap uk levitra Online WorldWide Shipping. 24/Online Pharmacy.
  • Buy Cheap cialis from india Now Free Viagra Pills! Top Online Pharmacy.
  • Buy Cheap non-prescription drugs against depression Now Drug Store Without A Prescription. Low Prices.
  • Buy Cheap healthcare pharmacy Now Best Drugstore. 24/Internet)(safe Pharmacy.
  • Buy Cheap prescription medicine for weight loss Now Cheap Meds Without Prescription. Best Prices.
  • Buy Cheapest valium info Now Cheap Prescription Drugs. Best Prices.
  • Buy Cheap meclizine drug Now Cheap Pharmacy Online. Cheap Online Pharmacy.
  • Buy Cheap extreme weight loss pills Now Top Online Pharmacy Supplier. Best Prices.
  • Buy Cheapest propecia online prescription Now Internet Prices For propecia online prescription! Best Drugstore.
  • Buy Cheapest cialis 20 Online No Prescription Needed. Pharmacy Store.
  • Get impotence pill Without Prescription Consultation. 24/Online Pharmacy.
  • Buy Cheapest sleep disorder and medication Online Buy %items% Online Without Prescription.
  • Buy Cheapest lorazepam Now Pharmacy Store. Buy Medications Online.
  • Buy Cheapest canadian drug store Now Best Prices. Top Online Pharmacy Supplier.
  • pain medication for sale Online Without Prescription Pharmacy Store. Best Online.
  • Buy Cheapest buy phentermine tablets without prescription Online Pharmacy At The Best Price! Best Online.
  • Buy Cheap cheap appetite suppressants Online Cheap Online Pharmacy. Pharmacy Store.
  • Buy Cheap overdose on xanax Online Low Prices. The Largest Internet Pharmacy.
  • Buy Cheap order bactrim Online Pharmacy Store. Online Prices For order bactrim!
  • Buy Cheap how to get pain medication Now Cheap Online Pharmacy. Buy Medications Online.
  • Buy Cheapest free prescription medicine Now Special Prices For free prescription medicine! Best Prices.
  • Buy Cheapest deep diet pills Now No Prescription Needed. WorldWide Shipping.
  • Buy Cheap on-line drugstore Now Internet Prices For on-line drugstore! Best Online.
  • Buy Cheap phentermine on line consultation Now Online Medical Shop. WorldWide Shipping.
  • Buy Cheap clonazepam .5mg Now Discount Online Pharmacy Shopping. Low Prices.
  • Buy Cheap cialis super viagra Online 24/Internet)(safe Pharmacy. Low Prices.
  • Buy Cheap drug viagra Now 24/Internet)(safe Pharmacy. Pharmacy Store.
  • Buy Cheapest levitra without prescriptions Online Best Online. Drugs, Health And Beauty.
  • Buy Cheap promethazine codeine Now Best Drugstore. Top Online Pharmacy Supplier.
  • Buy Cheapest reaction to codeine Now Online Prices For reaction to codeine! Best Drugstore.
  • Buy Cheapest valium baby effects Online Top Online Pharmacy. Best Internet.
  • Buy Cheapest find viagra free sites Online Best Online. Special Prices For find viagra free sites!
  • Buy Cheapest order cialis online Online Low Prices. 24/Online Pharmacy.
  • Buy Cheapest buy xanax cheap medication Now WorldWide Shipping. Buy Medications Online.
  • Buy Cheapest cheap viagra pill Online Online Medical Shop. Best Online.
  • Buy Cheap fat burning supplements Online Pharmacy Store. No Prescription Needed.
  • Buy Cheap valium generic Now Buy Medications Online. Cheap Pharmacy Online.
  • Buy Cheapest online pharmacy usa Online No Prescription Needed. Best Online.
  • Buy Cheap valtrex side effects Online Free Viagra Pills! Top Online Pharmacy.
  • Buy Cheap phentermine in florida Now Pharmacy Store. Top Online Pharmacy Supplier.
  • cheap buspar Online Without Prescription Free Viagra Pills! Best Prices.
  • Buying Cheap generic 5mg proscar cheap. Mexican Pharmacy, Best Prices. Best Drugstore.
  • Buy Cheap buy xanax overnight Now Discount Online Pharmacy. Free Viagra Pills!
  • Buy Cheap prescription antidepressants Online WorldWide Shipping. Free Viagra Pills!
  • Buy Cheap orgasm with levitra Now Discount Pharmacy Online. Best Drugstore.
  • Buy Cheap order cialis online Online Best Drugstore. Buy Medications Online.
  • Buy Cheap affects of viagra Now Low Prices. 24/Internet)(safe Pharmacy.
  • Buy Cheap parasitic helminths Now 24/Online Pharmacy. Top Online Pharmacy.
  • Buy Cheap cheap arthritis medication Online WorldWide Shipping. Cheap Pharmacy Online.
  • Buy Cheap ultram 50mg buy Online Low Prices. 100% Satisfaction Guaranteed.
  • Buy Cheapest fertility treatment guidelines Online Online Medical Shop. WorldWide Shipping.
  • Buy Cheapest order xenical cheap Online Best Prices. Discount Pharmacy Online.
  • Buy Cheapest valium withdrawl Online Best Drugstore. Cheap Online Pharmacy.
  • Buy Cheapest propecia ordering Now Pharmacy At The Best Price! Best Online.
  • Buy Cheapest atenolol withdrawal Online Drugs, Health And Beauty. Best Online.
  • Buy Cheapest diet pills online prescription Now Top Online Pharmacy. Cheap Online Pharmacy.
  • Buy Cheapest valtrex side effects Now Guaranteed Shipping. WorldWide Shipping.
  • Buy Cheapest codeine prescriptions for cough Online Low Prices. Discount Pharmacy Online.
  • Buy Cheapest viagra sale Now Special Prices For viagra sale! Low Prices.
  • Buy Cheap erectile dysfunction syndrome drugs Online Best Internet. Special Prices For erectile dysfunction syndrome drugs!
  • Buy Cheap online levitra Now No Prescription Needed. Top Online Pharmacy.
  • Buy viagra canada Without Prescription Doctor. Best Internet. Best Prices.
  • Buy Cheapest purchase viagra Now 24/Online Pharmacy. Best Drugstore.
  • Buy Cheapest phentermine websites Online WorldWide Shipping. Pharmacy Store.
  • Buy Cheapest effects of norvasc Online Drugs, Health And Beauty. Best Online.
  • Buy Cheap viagra sildenafil oral jelly Now No Prescription Online Pharmacy. Low Prices.
  • Buy Cheap medication on line Online Pharmacy Store. Discount Online Pharmacy.
  • Buy Cheap pain meds buy cheap Online Cheap Online Pharmacy. Top Online Pharmacy.
  • Buy Cheap ativan online Online Low Prices. Discount Pharmacy Online.
  • Buy Cheapest fat burners Online Best Prices. Cheap Online Pharmacy.
  • levitra information Online Without Prescription Best Drugstore. Low Prices.
  • Buying Cheap lexapro antidepressant. Mexican Pharmacy, Best Prices. Best Drugstore.
  • Buy Cheap purchase proactive acne solution Now Online Medical Shop. No Prescription Needed.
  • Buy Cheap online shopping coupons for vitamin shoppe Now Top Online Pharmacy. Cheap Pharmacy Online.
  • Buy Cheap xenical orlistat Now Top Online Pharmacy Supplier. Low Prices.
  • Buy Cheapest levitra alternative Now Best Prices. Order Cheap Meds Without Rx.
  • Buy Cheap effects of xanax Now Top Online Pharmacy. Drugs, Health And Beauty.
  • Buy Cheap cheap tramadol Online No Prescription Needed. Best Internet.
  • Buy Cheapest lipitor reaction Now Discount Online Pharmacy. Best Online.
  • Buy Cheap reliable online pharmacy ativan Online Best Online. 24/Internet)(safe Pharmacy.
  • Buy Cheapest ambien without prescription Now Pharmacy Store. Online Medical Shop.
  • Buy Cheap viagra amsterdam Online Free Viagra Pills! No Prescription Needed.
  • Buy Cheapest no prescription diet pills sale Online Online Prices For no prescription diet pills sale! Best Online.
  • Buy Cheapest free sample of herbal cialis Now Best Prices. 100% Satisfaction Guaranteed.
  • Buy Cheap ultimate weight loss Now Online Prices For ultimate weight loss! Guaranteed Shipping.
  • Get order xanax overnight shipping Without Prescription Consultation. 24/Online Pharmacy.
  • Buy Cheapest phentermine cheap online Online Best Prices. Buy Medications Online.
  • Buy Cheapest clomid 25mg Now Best Internet. Online Prices For clomid 25mg!