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:

Unknown said...

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

http://feboook.blogspot.com

Unknown said...

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

http://feboook.blogspot.com

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

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

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

Penis enlargement device said...

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

Penis Enlargement

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

Unknown said...

Thank god for this information!

iori 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

Unknown said...

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

Unknown 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.

Unknown 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

Unknown 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

Unknown 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

Unknown 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

Unknown 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


Unknown 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

paulsmith198914@gmail.com 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!

Unknown 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

Unknown 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

Unknown 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

Unknown 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

Unknown 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

Unknown 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

Justin said...

Doing research online gives you a huge measure of vital data readily available. Next, you are going to need to know where you can locate an utilized auto. Utilizing the web to search for utilized autos as a part of your territory is a decent choice. cash advance

Justin said...

Separated people truly don't have wherever to go for direction. Beyond any doubt a decent companion offers a comfort in times of dire need, however the deplorability of having individual credit wrecked from a broken marriage is not kidding. In another article we manage approved clients of a charge card. This is imperative after a separation moreover. payday loans san-diego

Justin said...

Alternately you watch the TV news stories with interest however get the paper and read a couple sections or carry on a discussion with your life partner or go to the kitchen or simply hit the quiet catch amid the advertisements! Sound recognizable. cash advance

Justin said...

Keep in mind that private unions are dependent on your FICO rating and that of your co-signor. You can apply for lower rates if your co-signor has great credit. Obviously, it is fitting to take a gander at your other money related commitments before you choose to unite your private understudy credits. auto title loans chicago

Robbert said...

On the off chance that you offer your auto to be scrapped, ensure you get the demolition declaration for the auto as generally the merchant may offer it after repairs to some clueless client who may turn into a movement peril on the streets. Cash Advance Costa-mesa

Robbert said...

The loaning firm will need to support this auto credit proposition. In the event that it goes through, bear in mind that you will in any case need to obtain the cash over the same time frame as stipulated in the credit understanding. check cashing

marko said...

Most understudy advances that are given by governments and which can't be effectively paid back may not generally be freed off even through recording chapter 11 understudy credits, and the main choice open to such a defaulting understudy is demonstrating significant budgetary hardship which in it is frequently entirely difficult to demonstrate. check cashing san-diego

Paulo said...

As a rule, understudies think that its direct to get financing for their training. This is on the grounds that loan specialists realize that the interest in training will pay off later on. Since government credits are sponsored by the Department of Education, advance endorsement with low intrigue is ensured, while the reimbursement timetable is normally conceded until after graduation. payday loans

Robbert said...

As you are hunting online down the best auto advance financing, remember that you just need to work with a credit organization that is respectable. Obviously, that is a given, as nobody would intentionally give their own data to an organization that is by all accounts a bit on the shady side. Check Cashing

Robbert said...

Contemplating purchasing another auto under the administration CARS program? On the off chance that you resemble numerous individuals with poor credit, purchasing another auto may appear like an inconceivable dream. There are approaches to get a terrible credit auto advance, yet you will must be more adaptable and shop around significantly more than a prime applicant with superb credit would. In the event that you prepare, getting an auto advance with awful credit still is conceivable. Check Cashing

Robbert said...

Guaranteed mechanics or car experts will help you in completely surveying the state of any auto you wish to buy. He will decide the restorative, mechanical and security issues of the auto before you could settle on your official conclusion in acquiring. These mechanics are specialists on their field and won't neglect to do a general review. check cashing

Robbert said...

Another helpful explanation behind auto shrouded spy cameras is to watch out for that young person who simply got his or her permit. At the point when your adolescent gets the auto, you can do a reversal through the recordings of such cameras to check whether they were getting into inconvenience. You ought to believe your young person, yet realizing that high schoolers at times cause harm, you now have a vigilant gaze on them. Check Cashing

Anonymous said...

Are you tired of seeking loans and mortgages from banks? Have you been turned down constantly by your banks and other financial institutions due to bad credit? Are you about loosing your home due to financial constraints? Global Lenders Inc is here to set you free from debt. For immediate enquires you can contact us via email powerfinance7@gmail.com

LOAN APPLICATION FORM
**********************
1) Full Name:.....
2) Gender:........
3) Loan Amount Needed :...
4) Loan Duration:...............
5) Country:.......
6) Home Address:..
7) Mobile Number:.....
8) Fax Number:......
9) Occupation:....
10) Monthly Income:......
11) Salary Date:....
12) Purpose of loan;...
13) Where did you get our loan advertisement:....
14)Contact email:........

Awaiting your swift response.
May Allah bless you.
IBRAHIM MUSA
Leverage Pvt Ltd.
Associate Director
power Financial Service Pvt.
Contact Us At :powerfinance7@gmail.com

Transport company in Taif said...

The best Transport company in Taif and Imher carpenters in the dismantling and installation of furniture.

osma said...

Hello Everybody,
My name is Ahmad Asnul Brunei, I contacted Mr Osman Loan Firm for a business loan amount of $250,000, Then i was told about the step of approving my requested loan amount, after taking the risk again because i was so much desperate of setting up a business to my greatest surprise, the loan amount was credited to my bank account within 24 banking hours without any stress of getting my loan. I was surprise because i was first fall a victim of scam! If you are interested of securing any loan amount & you are located in any country, I'll advise you can contact Mr Osman Loan Firm via email osmanloanserves@gmail.com

LOAN APPLICATION INFORMATION FORM
First name......
Middle name.....
2) Gender:.........
3) Loan Amount Needed:.........
4) Loan Duration:.........
5) Country:.........
6) Home Address:.........
7) Mobile Number:.........
8) Email address..........
9) Monthly Income:.....................
10) Occupation:...........................
11)Which site did you here about us.....................
Thanks and Best Regards.
Derek Email osmanloanserves@gmail.com