Truecrypt 5.0 on AMD64 Debian & Ubuntu

I successfully managed to compile Truecrypt 5.0 on my Ubuntu 7.10 64 bit.
There are good reason to upgrade from 4.3a (5.0 is kernel version independent) and to avoid.


The patch, comes from the work of Heinzelotto addresses some 32bit->64bit issue in the code.

The binary produced works pretty well, but I’m not going to distribute it at the moment. Moreover, for a sensitive software like Truecrypt, it’s wise to use only the Developer Binaries or the Ubuntu/Debian issues. Rogues third party packages (including my one), could be tampered with.

While I address the issue to find a way to distribuite a building system without violating the Truecrypt licence, maybe you’ll need the patch.

Heinzelotto 64 bit patch for Truecrypt 5.0

Pre-requisites: as well as the various basic build-essential prerequisites (will not cover them here), to compile the 5.0 you’ll need to install also libfuse-dev and have wxWigdets sources handy.
Briefly, your steps should be:
(Legalese disclaimer, follow the instructions on your risk)

$ sudo apt-get install libfuse-dev
$ cd /usr/src
/
$ sudo tar xvzf wxWidgets-2.8.7.tar.gz
Let’s suppose the truecrypt sources and the patch you downloaded are in your home directory
$ cd
$ gunzip truecrypt_64bit.txt.gz
$ tar xvzf TrueCrypt 5.0 Source.tar.gz
You got the tar.gz version, didn’t you?
$ cd truecrypt-5.0-source/
$ patch -p1 <../truecrypt_64bit.txt

There you go, follow the Truecrypt provided Readme.txt
$ make WX_ROOT=/usr/src/wxWidgets-2.8.7 wxbuild
(and not WXROOT like I stated, thanks anonymous and spoons for pointing out the mistake )
$ make

From now you’re on your own with the Readme instruction, but keep in mind that Debian and Ubuntu discourage to trash with manually compiled binaries (e.g binaries you compiled outside the ubuntu/debian building system, and install bypassing dpkg, apt-get, synaptic and all the rest of the funny circus) the /usr/bin and the other system directories.
If you decide to install manually/using a foreign script, consider placing stuff in /usr/local/* .
I must say that using a different directory (such as you home) from /usr/src to place the wxWigdet stuff could probably save you from sudoing and/or becoming root. But I did not try (I will).

[Update]Truecrypt 5.0a is out, but the patch provided by Heinzelotto works as well as with the bare 5.0.
He managed to provided a new .deb for the new version 5.0a; as well as another deb that should be less sensitive to version issues older debian (and ubuntu?) versions.

Advertisements

6 thoughts on “Truecrypt 5.0 on AMD64 Debian & Ubuntu

  1. Hi, I try to apply the patch for my Debian distrib but I get the following message:

    $ patch -p1 < ./truecrypt_64bit.txt
    can’t find file to patch at input line 3
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    ————————–
    |— Platform/PlatformTest.cpp
    |+++ Platform/PlatformTest.cpp
    ————————–
    File to patch:
    Skip this patch? [y]

    Do you know what to do ?

  2. I succed to appli the patch with giving location of the file, for example:
    ./Platform/PlatformTest.cpp

    The error when linking is:

    Linking truecrypt
    /usr/bin/ld: unrecognized option ‘–hash-style=sysv’
    /usr/bin/ld: use the –help option for usage information
    collect2: ld returned 1 exit status
    make[1]: *** [truecrypt] Error 1
    make: *** [all] Error 2

  3. mmh, glad to hear you succeed to apply the patch.
    It seems that ld doesn’t like an option used by truecrypt’s makefile.
    Can you give some info about the system?
    ld –help shows the option mentioned?
    Later on this day I’ll probably have the chance to check on my system.
    Bye

  4. Hi, I try to apply the patch for my Debian distrib but I get the following message:

    $ patch -p1 < ./truecrypt_64bit.txt
    can’t find file to patch at input line 3
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    ————————–
    |— Platform/PlatformTest.cpp
    |+++ Platform/PlatformTest.cpp
    ————————–
    File to patch:
    Skip this patch? [y]

    Do you know what to do ?

    I got the same thing. To fix this one, you have to do -p0 instead of -p1

    Also, it appears that you need to do make WX_ROOT instead of make WXROOT

  5. Thanks for pointing out the mistake, I corrected it in the text.
    As for the -p strip option, it depends by the position you are in the root tree (or maybe I should say, on the relative position of the files you’re going to patch).
    Following the steps I tried to outline, if you’re inside the main level of truecrypt-5.0a-source, the right strip level should be -p1. This will strip the first level from
    truecrypt-5.0-source/Main/Forms/VolumeSizeWizardPage.cpp leaving just
    Main/Forms/VolumeSizeWizardPage.cpp
    If you are one step above the truecrypt source directory, then -p0 should work for you.
    In these cases I found useful to look at the paths in the diff files.

Comments are closed.