Tuesday, August 18, 2009

Building Tokyo Cabinet for use with Java on OS X

I've been really interested in playing with Tokyo Cabinet lately. I thought that it would be fun to take a hack at the GitHub Contest using Scala and Tokyo Cabinet. I then set out to build Tokyo Cabinet and its Java bindings (since I can call those easily from Scala). The Java bindings for Tokyo Cabinet are not pure Java, they use JNI, so you need to compile some C as well as Java. Everything looked fine and dandy until I tried to run some code. I then ran into this stack trace from Scala:



To translate, what is going on here is that by default Tokyo Cabinet will build a 32 bit binaries. Java 1.6 on OS X is 64 bit and will look for a 64 bit version of the library. Here is what I did to make things happy.

When running the configure script for Tokyo Cabinet itself, I added a flag:



I tried the same trick when configuring the Java bindings, but it didn't seem to end up in the resulting Makefile. So I edited the Makefile by hand. In the end, my CFLAGS line looks like this:



After that, I was able to get a small Scala script to create a Hash database.

As an aside, the Scala IDE for Eclipse seems really nice. I had tried it out a few months ago, and it has clearly made a lot of progress since then.

44 comments:

pbsl said...

you have a nice site.thanks for sharing this site. various kinds of ebooks are available here

http://feboook.blogspot.com

pbsl said...

you have a nice site.thanks for sharing this site. various kinds of ebooks are available here

http://feboook.blogspot.com

javieth said...

I liked this blog because is easy understandable and very useful. for me Os X is the best software that i proved before. I really like this kind of technology because isn´t complex to use.
buy viagra

Penis Enlargement Pills said...

Erectile Dysfunction FAQ's

Impotence, or penile erectile dysfunction, in men is not as rare as one would think it is.
In fact, one out of ten men around the world is affected by this condition. It is not exclusive to old men either. Impotence is caused not just by physical factors,
but mental factors as well.
Exercising on a regular basis and eating healthy food will increase your ability to sustain prolonged physical effort and we all know that sex is effort.
Smoking, frequently drinking large quantities of alcohol, taking recreational drugs and lack of exercising will sap your stamina and also slow down the flow of blood.
Penis exercises can be used for maintaining fitness, preventing or controlling premature ejaculation and increasing the length and girth of the penis.
by penis enlargement pills you can overcome these problems and not only that you can also enlarge, extend also to strengthen your penis and premature ejaculation will not exist anymore for you.
visit http://www.factspenisenlargement.com for more info.

pedro velasquez said...

The problem isdominical costa rica tours that vectors and strings have variable length. When I pass a void* (my object) to Tokyo Cabinet so it can store it, I also have to pass the size of the object in bytes. But that can't be trivially done.
What is the best way to determine the number of bytes of an object? Or what is the best way to store variable length objects in Tokyo Cabinet.
http://www.dominicalcostaricatours.com

Josh said...

Vimax is reliable stuff to accomplish your sexual dysfunction. It has been proven by many men to augment virility and genital.

admin said...

I’ve been browsing on-line way more than three hours today, nonetheless I don’t ever found any interesting posting like your site. It’s pretty value ample for me. In my opinion, if most of web site homeowners and other people produced nice content material as you do, the web might be much far more helpful than ever before.

how to get rid of cellulite

weerah said...

This is really interesting, You're a very skilled blogger. I've joined your feed and look forward to seeking more of your wonderful post.

buy codeine online

john said...

Thank you, I have recently been searching for information about this topic for ages and yours is the best I have discovered so far.
buy vicodin online

weerah said...

I would like to pay a heartily tribute to the author of this article for sharing such innovative ideas.
buy xanax online

weerah said...

Good article. Well written! Keep them coming. Love to know more from you!
buy ritalin online

john said...

Amazing!I also wish him good luck to defend his gold medal. I like to share it with all my friends and hope they will also encourage him.
best online pharmacy

Muhammad Alexander said...

Thanks for sharing the information!
I found this article very interesting and informative!
Keep sharing!



the best seo company

mark said...

cost effective advertisingThis is good site to spent time on .I just stumbled upon your informative blog and wanted to say that I have really enjoyed reading your very well written blog posts. I will be your frequent visitor, that's for sure.

jamesfrac said...

Thanks for sharing this great article! I feel strongly about it and love learning more on this topic. It is extremely helpful for me. I hope you post again soon
Lingerie

Penis enlargement device said...

this very incredible blogs and very interesting to read ..
continue to add his writings ..
thanks

Penis Enlargement

john said...

Thanks to a brilliant effort in publishing your article. One can be more informative as this. There are many things I can know only after reading your wonderful article.
organic seo service

mark said...

Thanks for sharing the information!
I found this article very interesting and informative!
Keep sharing!drug discussion
drug discussion forum
drug forum

Best Penis Enlargement Pills said...

Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work.
@ Vimax,Vimax, Vimax Pills, Buy Vimax Pills, VigRX, VigRX Plus, Buy VigRX Plus, VigRX Plus Online, VigRX Plus Canada,Penis Enlargement, Penis Enlargement Pills

blogger de azi said...

Thank god for this information!

Abby said...

If you only know where to buy xanax online we promise that you wont suffer from any anxiety or pain. See more stuff as well

organic vitamins said...

I'm still learning from you, but I try to reach my goals. Since then enjoy
reading all the information that appears on your blog.Keep come. Loved it!

organic vitamins

saim said...

This is one of the most incredible blogs I have read in a very long time. Your blog is great for anyone who wants to understand this subject more. Great stuff; please keep it up!



buy curcumin

Adam said...

I'm still learning from you, but I'm trying to achieve my goals. I certainly enjoy reading all that is posted on your blog.Keep the information coming. I loved it!
buy percocet online

Colin said...

I was just browsing for relevant blog posts for my project research and I happened to stumble upon yours. Thanks for the excellent information!
buy watson

MALE ENHANCEMENT said...

I just added this post as a favorite.
because it is very interesting and provide insight to readers ..
thanks

Penis Enlargement Pills
Vimax Pills
Vimax Extender

Hannah bolton said...

I Like your blog,will sharing this with my friends, excellent work.

business broadband providers

yakenzu toby said...

Thanks a lot for sharing this amazing knowledge with us. This site is fantastic. I always find great knowledge from it. ibcbet, judi bola, sbobet, agen bola, ibcbet, sbobet

steve7876 said...

I certainly enjoy Garcinia cambogia reading all that is posted on your blog.Keep the information coming. I loved it!

Selina Diana said...

To start with the foremost necessary line of my commentaryary – I do resembling to honor a monster as a results of the periodical tribute. If reality be notified it is a wise work by him that I discovered out laurels dependable facilitate by his/her pretty detail and figures payday loans direct lender. I effortlessly crave to declared, nice pleasure comprise it up your work. generally I’ll converse concerning at the aspect of your posting and alter. endeavouring ahead to your a allotment of posts.

Ryud Vant said...

Got a problem with your femininity? get a solution soon overcome here, and be sure to use herbal solution to the problems of your femininity, not a drug that contains chemicals because it is actually harmful to your feminine area. use crystal x regularly and feel a positive difference after wearing
keputihan
ciri-ciri distributor asli PT. Natural Nusantara
crystal x dapat membantu program hamil
Reseller Crystal X
Reseller Crystal X Jogja
Jual crystal x Asli

nova nasa said...

any women experience vaginal discharge, vaginal discharge, and it is reasonable because it is certain that experienced by a woman. But whiteness is also not neglected, because whiteness is that of germs can cause serious problems in your female organs. Whitish an early symptom of cysts, myom and cervical cancer. Therefore let heal whitish and vigorous various diseases due to the whitish
and follow the steps
Crystal X Nasa
Crystal X Asli Nasa
Efek Samping Crystal X
Ciri-ciri Crystal X Asli
Entropy Cream
Bibit Bawor

Sang Pemikir said...

This is a great inspiring article.I am pretty much pleased with your good work.You put really helpful information. Keep it up. Agen Bola

Zacky van Hardi said...

This is exactly what I was looking for. Thanks for sharing this great article! That is very interesting Smile I love reading and I am always searching for informative information like this! Agen Sbobet

asti yuliani said...

On this occasion I will explain Apa Itu Manfaat Payudara Kecil Wanita and Bagaimana Cara Memperbesar Ukuran Payudara..? payudara kecil actually very beneficial for women because women can be members freedom to perform various kegitana without having to feel uncomfortable because the breasts are rubbed or touched. Also in the field of women's fashion can benefit because they can wear almost all kinds of clothes and bra. But if you want to add a little or a lot ukurang breast. We can do a Olahraga Untuk besarkan Payudara such as push-ups, pull-ups, etc. In addition you can also use Ayla Breast Care Untuk Besarkan Payudara , This cream can accelerate the growth of the breast becomes firmer and larger. This method can NDA combine.
Apart from the appearance of the inside of the course should be treated not the True Way Vaginal care is crucial for intimate areas are not attacked by diseases such as vaginal discharge, itching "and odor. Even Kanker Serviks . But no need to panic now Cara Mencagah Kanker Serviks already available. Such foods do routine maintenance and using Crystal X . Manfaat Crystal X Atasi Keputihan and cervical cancer has been proven in addition to the Efek Samping Crystal X a positive effect, namely the effect penyemubuhan. Thus and thanks Crystal X benefit to be Merapatkan vagina Mengatasi Keputihan Crystal X agar Cepat Hamil


musa ibrahim said...

The far reaching bigger part catch to imagine completed their capacities or as a not adequately strong standard their capacities see developed way fit what they can hold up under. Here to tasteful this pit these unequivocal steps should be taken which brings the issue of advances in setting. Cash Advance

Paul Smith said...

This is not an easy task to build Tokyo Cabinet for use with Java on OS X! However, your post is useful enough to do so! I just wanted to ask a question! Can you help me write my paper for me? Our professors are strict and I can be blamed for plagiarism!

ariyan arifin said...

The adeptness of this artticle is this, charm a sustain calls get organized adeptness address and included arrangements. At proceeded with acute go bottomward to you address any of the ancient affection reports, bolt and absolutely see what you are stamping, in the amphitheatre that you don't absorption your alpha change admission your researcher or action to for able heading. https://www.aaa1autotitleloans.com/chicago

jhon said...

The acclaim bureaus demand to see acclaim cards actuality acclimated and the debt managed. Because revolving accounts are fast and accessible banknote aloft and above income, the debt is generally abolished and mismanaged. It's a accepted actuality yet acclaim companies abide to attract connected acceptance through promotional deals and rewards programs.
check cashing

Big Brother said...

Majority of the car dealers board abounding adorable ante and adjustments in the car price. And today, the advancing up of the online car accommodation companies has revolutionized the accommodation processing and has helped to account the car loan, as accessible as possible. The important acceptation of the online car quotes is its account in the allegory of the ante of altered types of car loan. It will advice one to locate an ideal car accommodation according to your account and prerequisites.Auto Title Loans Chicago

Shan Jonson said...

This includes the abounding acquittal and the fees or charges. We additionally accept a ability date which is the borderline of the abounding acquittal of the loan. On this date, it is accepted that the borrower will acknowledgment to the abundance to accord the accommodation in person. However, if the case arises that the borrower does not acknowledgment again the lender can drop the analysis instead.
https://www.usacheckcashingstore.com/corona

Shan Jonson said...

Here is area it gets complicated. Aback the analysis bounces due to curtailment of funds again the borrower may acquire added accuse because of abortion to pay on the agreed date. There are times aback the borrower could ask for an addendum for the acquittal of the loan. There are some states in the United States which requires the lender to extend the acquittal if bare or requested by the borrower.
car title loans in fresno

Shan Jonson said...

The capital acumen why a chump would demand to use a coffer agenda is because it encourages advisable spending. Short of accepting an defalcation allowance on your blockage account, it becomes absurd to absorb added money than is captivated in your blockage account. This simple actuality encourages anxious spending. It additionally makes one acknowledge added of what one already has in one's possession.
Cash Advance Costa-mesa

Mission Vission said...

Several banks will appropriately acquire action cachet and pay starting now acerbic advancement for a abettor appellation advance. Regardless, all that you acquire to analysis for a appellation change is requesting that you acquire .Cash Advance