Forum: Building VoltDB Clients

Post: Compiling the C++ Client Library on a 32-bit environment

Compiling the C++ Client Library on a 32-bit environment
junjun
Jul 5, 2010
Hello,
Thank you for releasing the C++ client library. It compiles without a hitch on my 64-bit Ubuntu. But when I attempt compiling it on the 32-bit, I run into these 2 related group of errors in Decimal.hpp
1. The line:
static const int64_t kMaxScaleFactor = 1000000000000;
raises "int64_t constant is too large". So I use the LL suffix to declare the above and the error goes away.
2. But then I get ambiguous type errors when doing arithmetic on the said constant and ttmath's TTInt. Like on the line:
whole *= kMaxScaleFactor;
I don't know enough about TTMath to attempt fixing error #2.
So I'd like to know if there's an easy way to make this work or if 32-bit isn't really supported here and I should just forget about it. :)
Thanks again.
Junjun
Hi Junjun, What version of
aweisberg
Jul 5, 2010
Hi Junjun,
What version of Ubuntu are you running? There is no reason it can't be made to work in a 32-bit environment. All of our testing is done on 64-bit hardware and kernels so it is unlikely that we will ever support anything 32-bit, but it is reasonable to make the client library build and run on 32-bit.
Thanks,
Ariel Weisberg
Both of them are Ubuntu 10.04
junjun
Jul 6, 2010
Hi Junjun,
What version of Ubuntu are you running? There is no reason it can't be made to work in a 32-bit environment. All of our testing is done on 64-bit hardware and kernels so it is unlikely that we will ever support anything 32-bit, but it is reasonable to make the client library build and run on 32-bit.
Thanks,
Ariel Weisberg


Both of them are Ubuntu 10.04 LTS running as VirtualBox VMs.
Here is the make log with errors:
http://gist.github.com/465444
Thanks, Ariel!
Some success
aweisberg
Jul 6, 2010
Hi Junjun,
I committed some changes today that allow it to compile on Ubuntu 10.04 32-bit. One of the serialization tests fails on 32-bit (64-bit is fine) and it looks like the problem is with Decimal serialization. I filed a ticket for the Decimal serialization issue. Let me know if you have trouble building and running.
Good luck,
Ariel
Nice. Works now. Thanks, man!
junjun
Jul 7, 2010
Hi Junjun,
I committed some changes today that allow it to compile on Ubuntu 10.04 32-bit. One of the serialization tests fails on 32-bit (64-bit is fine) and it looks like the problem is with Decimal serialization. I filed a ticket for the Decimal serialization issue. Let me know if you have trouble building and running.
Good luck,
Ariel


Nice. Works now. Thanks, man!