NOTE: These instructions may be obsolete; Chandler can be built natively on 64-bit Ubuntu Gutsy Gibbon!
64-bit gnu+linux build notes
While Chandler does not yet build natively on x86_64, it is currently possible to build Chandler inside of a 32-bit chroot running in a 64-bit gnu+linux operating system. A chroot contains the userland of a whole other operating system (in this case, a 32-bit version of your gnu+linux distribution). As such it is non-trivial to set up; this is not a procedure for the faint-hearted.
The following information has not been extensively tested, and is not officially supported. Please do not ask our developers for help with the specifics of setting up a chroot environment to build Chandler. These instructions are strictly for the benefit of the community, and come with no guarantees.
You will first need to follow your distribution's instructions for setting up a 32-bit chroot. See, for example, ubuntu
(if anyone has links for other distros, please add them).
The use of Debian's dchroot
utility is highly recommended. It is a setuid wrapper that allows unprivileged users to execute a shell inside of the chroot environment. It also facilitates easily running the 32-bit chrooted chandler from your 64-bit OS. dchroot comes pre-packaged with Debian, ubuntu, and gentoo, and probably other distros too.
Once the chroot is set up, you will need to install all of the 32-bit build tools and Chandler dependencies inside of the chroot. This procedure varies by distribution, but the general procedure is to enter the chroot, and then invoke the (32-bit) package manager (apt-get, synaptic, yum, emerge, etc) to install everything needed to build Chandler.
After the chroot is configured and the Chandler dependencies are installed, you're ready to build. It's important to note the CHOST value inside of the chroot. Normally, even when entering a 32-bit chroot, the CHOST value remains set to x86_64
. This will ultimately cause the Chandler build to fail, as it will force certain Chandler components to be compiled for the wrong architecture.
When it comes time to build, therefore, you must
enter the chroot using the linux32 wrapper, e.g.
linux32 dchroot -d
sudo linux32 chroot /path/to/chroot /bin/bash
, or find some other way to set the CHOST value properly. Once you've entered the chroot, it's a good idea to check the CHOST value by running
prior to building. In order for the build to succeed, this should return i686
(or perhaps i386
). If it returns x86_64
, something is wrong.
Once you've verified that the CHOST value is correct, you can proceed to follow the normal build instructions?
- NOTE: on ubuntu, you may need to add a symlink from /usr/lib/libgcj.so.6 to /usr/lib/libgcj.so.5.
Using dchroot to run chandler
Once you've built Chandler, you probably don't want to mess with opening a shell and entering a chroot environment every time you want to view your calendar. The solution to this problem is to use Debian's dchroot
The first step is to write a quick wrapper script for starting Chandler. The following example assumes you've built chandler in /opt/chandler, and should be saved as, e.g. /usr/local/bin/chandler32 inside of the 32-bit chroot.
Don't forget to make the script executable (i.e.,
chmod 755 /usr/local/bin/chandler32
Exit the 32-bit chroot, and back in 64-bit land, edit /etc/dchroot.conf to suite your environment, if you haven't already done so (please see the dchroot documentation).
Again in 64-bit userland, create a wrapper script to call dchroot. Save the following in a convenient place, e.g. /usr/local/bin/do_dchroot, and again, don't forget to make it executable. (You can re-use this wrapper to call any other programs in your chroot.)
/usr/bin/dchroot -d "`echo $0 | sed 's|^.*/||'` $*"
Finally, still in 64-bit userland, create a symlink from the dchroot wrapper script, with the same name as the Chandler wrapper script you created inside the chroot earlier:
ln -s /usr/local/bin/do_dchroot /usr/local/bin/chandler32
You should now be able to run chandler by simply invoking
from your 64-bit environment. Enjoy!