Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

With the whole NSA thing people tried to re-build identically looking binaries to the ones which truecrypt.org provides, but didn't succeed. So some think they might be compiled with back-doors which are not in the source code. -> So how compile on the latest Ubuntu version (I'm using UbuntuGNOME but that shouldn't matter)? I tried some tutorials for previous Ubuntu versions but they seem not to work any-more?


https://madiba.encs.concordia.ca/~x_decarn/truecrypt-binaries-analysis/ Now you might think "ok, we don't need to build", but: To build he used closed-source software and there are proof-of-concepts where a compromised compiler still put backdoors into the binary: 1. source without backdoors 2. binary identically to the reference-binary 3. binary contains still backdoors

edit2 (reply to post):

When using $ make -j 2 PKCS11_INC=$HOME/src/pkcs-11 I get:


/usr/include/wx-2.8/wx/dynarray.h:669:5: note: in expansion of macro ‘_WX_DEFINE_TYPEARRAY_PTR’
     _WX_DEFINE_TYPEARRAY_PTR(_wxArray##name, name, base, classdecl)
/usr/include/wx-2.8/wx/dynarray.h:655:5: note: in expansion of macro ‘WX_DEFINE_TYPEARRAY_WITH_DECL_PTR’
/usr/include/wx-2.8/wx/dynarray.h:829:5: note: in expansion of macro ‘WX_DEFINE_EXPORTED_TYPEARRAY_PTR’
     WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayPtrVoid)
/usr/include/wx-2.8/wx/bookctrl.h:26:1: note: in expansion of macro ‘WX_DEFINE_EXPORTED_ARRAY_PTR’
 WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
Linking truecrypt
/usr/bin/ld: /home/user/src/truecrypt-7.1a-source/Volume/Volume.a(SecurityToken.o): undefined reference to symbol 'dlopen@@GLIBC_2.1'
/lib/i386-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [truecrypt] Error 1
make: *** [all] Error 2

when using $ make -j 2 PKCS11_INC=$HOME/src/pkcs-11 LIBS=-ldl:


Forms/VolumeSizeWizardPage.o: In function `TrueCrypt::VolumeSizeWizardPage::GetVolumeSize() const':
VolumeSizeWizardPage.cpp:(.text._ZNK9TrueCrypt20VolumeSizeWizardPage13GetVolumeSizeEv+0x80): undefined reference to `TrueCrypt::StringConverter::ToUInt64(std::basic_string, std::allocator > const&)'
Forms/VolumeSizeWizardPage.o: In function `TrueCrypt::VolumeSizeWizardPage::SetVolumeSize(unsigned long long)':
VolumeSizeWizardPage.cpp:(.text._ZN9TrueCrypt20VolumeSizeWizardPage13SetVolumeSizeEy+0x8f): undefined reference to `TrueCrypt::StringConverter::FromNumber(unsigned long long)'
Forms/WizardFrame.o: In function `TrueCrypt::WizardFrame::SetStep(int, bool)':
WizardFrame.cpp:(.text._ZN9TrueCrypt11WizardFrame7SetStepEib+0xe6): undefined reference to `TrueCrypt::Event::Connect(TrueCrypt::EventConnectorBase const&)'
collect2: error: ld returned 1 exit status
make[1]: *** [truecrypt] Error 1
make: *** [all] Error 2

(same without the make -j ... parameter BTW)


Now it works, thanks user76204 and GEO:

  1. $ sudo apt-get install build-essential nasm libfuse-dev wx-common wx2.8-headers libwxbase2.8-dev libwxsvg-dev libwxgtk2.8-0 libwxgtk2.8-dev
  2. $ mkdir -p $HOME/src/pkcs-11
  3. put truecrypt sources to /home/USERNAME/truecrypt-7.1a-source
  4. start building: $ LIBS=-ldl make -j 2 PKCS11_INC=/home/USERNAME/src/pkcs-11/
share|improve this question
No reply? I thought people were interested. –  linuxubuntu Oct 25 '13 at 7:58

2 Answers 2

up vote 1 down vote accepted

I had the same problem on Ubuntu 14.04.

LIBS=-ldl make PKCS11_INC=/tmp/truecrypt/pkcs11 

solved my problem (/tmp/truecrypt/pkcs11 is where my pkcs11 files are stored.)

One notice for people compiling on 14.04: do not install libwxgtk3.0-dev, use the older libwxgtk2.8-dev instead, otherwise it wont compile due to a bug in libwxgtk3.0-dev.

see https://groups.google.com/forum/#!topic/wx-users/2D_my-umcLU

share|improve this answer

There is a plan to audit truecrypt regarding the security of the software and a review of the wording of its license, which you may find interesting.

Here's how I successfully compiled it on 12.04, but it should work for later versions of Ubuntu:

sudo apt-get install build-essential nasm libfuse-dev wx-common wx2.8-headers libwxbase2.8-dev libwxsvg-dev libwxgtk2.8-0 libwxgtk2.8-dev

You also need some particular PKCS-11 header files from the official RSA site. You can get them all at once with wget, which can use * with ftp downloads:

mkdir -p $HOME/src/pkcs-11
wget 'ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11*' -P $HOME/src/pkcs-11

Now download the source code from the truecrypt site and verify it with gpg after getting the public key, if necessary. Then perhaps extract it to your ~/src.

You need to supply the name of that pkcs-11 folder containing the header files when running make, so give the correct path if it is different to below. Of course, replace Truecrypt_source with your own real path in the cd command and in the cp command below. (The Truecrypt binary will be found in the Main folder of the source folder.)

cd Truecrypt_source
make PKCS11_INC=$HOME/src/pkcs-11
sudo cp Truecrypt_source/Main/truecrypt /usr/local/bin

Occasionally you might have to add to the make command-line LIBS=-ldl as in this question.

Now your newly compiled truecrypt will be ready to use and you can be confident it has no backdoors.

NOTE: Before installing the new version, you should uninstall truecrypt if it is already installed with the provided uninstall script that was installed with the binary:

sudo /usr/bin/truecrypt-uninstall.sh
share|improve this answer
Thanks, but didn't work, please see my edited first post for answer. –  linuxubuntu Nov 12 '13 at 8:40
@linuxubuntu It did work on 12.04, but I'll have a look at the errors you are getting on 13.10. It could be that you have a different version of gcc to me, and so you could try it with gcc 4.6.3, as you can have different versions of gcc installed and select the one you wish to compile with. –  user76204 Nov 14 '13 at 0:23
Thanks. Try 13.10 in a virtual machine if you don't want to install it natively. It must be possible to compile it using v4.8. Downgrading is not a proper solution. –  linuxubuntu Nov 14 '13 at 18:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.