Missing flag on compilation causes some parts of code not to be compiled

Bug #623203 reported by Cezary Tarnowski
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libtomcrypt (Ubuntu)
Fix Released

Bug Description

When the library is compiled without -DLTM_DESC flag, the ltm_desc is undefined which can cause some issues while using this lib.

try compile small program: gcc test.c -ltomcrypt

#define LTM_DESC
#include <tomcrypt.h>
int main() { ltc_math_descriptor test = ltm_desc; }

Tags: patch testcase
Revision history for this message
Pali (pali) wrote :

Not only DLTM_DESC but USE_LTM flag is needed too. And then appending -ltommath to EXTRALIBS is needed.

I'm attaching patch which fix this problem.

Changed in libtomcrypt (Ubuntu):
status: New → Confirmed
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libtomcrypt - 1.17-3

libtomcrypt (1.17-3) unstable; urgency=low

  * Define -DLTM_DESC to enable the libtommath functions
    (Thanks Cezary and Pali)
  * Add ${misc:Depends}
  * Bump standards-version
 -- Bhavani Shankar <email address hidden> Wed, 12 Jan 2011 14:12:02 +0100

Changed in libtomcrypt (Ubuntu):
status: Confirmed → Fix Released
Pali (pali)
description: updated
Revision history for this message
Bhavani Shankar (bhavi) wrote :


Can you please convert your patch to a debdiff like in the example given in the SRU wiki page


and as given in


with the release target as the stable release you want to point to as for example if its lucid then its lucid-proposed or if its maverick then its maverick-proposed also make a note of the regression impact on stable releases that you are targeting as described in the procedure here:



Revision history for this message
Pali (pali) wrote :
Revision history for this message
Pali (pali) wrote :
Revision history for this message
Pali (pali) wrote :

patches are converted

Revision history for this message
Pali (pali) wrote :

It is now possible to update libtomcrypt package in lucid and maverick?

tags: added: testcase
Revision history for this message
JonnyRo (jonnyro) wrote :

Necrothread i know but it is possible to use the GMP math library even with the broken version of this package.

Change the test program mentioned above to:

#define GMP_DESC
#include <tomcrypt.h>
int main() { ltc_math_descriptor test = gmp_desc; }

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers