Bug#673001: liblzma-dev contains wrong static library (liblzma.a)

May 15th, 2012 - 07:40 am ET by Anton Tolchanov | Report spam
Package: liblzma-dev
Version: 5.0.0-2
Severity: important

I was trying to link an application to liblzma statically and got the following linking errors:

/root/build/3rdparty/avro-c/src/libavro.a(codec.o): In function `encode_lzma':
/root/build/3rdparty/avro-c/src/codec.c:303: undefined reference to `lzma_raw_encoder_memusage'
/root/build/3rdparty/avro-c/src/codec.c:316: undefined reference to `lzma_raw_buffer_encode'

It looks like liblzma.a shipped in liblzma-dev does not contain all symbols because liblzma.a from xzdec-build overwrites proper liblzma.a during dh_auto_install.

This simple patch fixed it for me:
rules.orig 2012-05-15 15:27:40.000000000 +0400
+++ rules 2012-05-15 14:49:29.000000000 +0400
@@ -38,8 +38,8 @@
check-TESTS

override_dh_auto_install:
- dh_auto_install --builddirectory debian/normal-build
dh_auto_install --builddirectory debian/xzdec-build
+ dh_auto_install --builddirectory debian/normal-build

override_dh_installchangelogs:
dh_installchangelogs debian/changelog.upstream

I guess, a cleaner way would be to avoid building a static library in xzdec-build, however for some reason --disable-static did not work for me.

Debian Release: 6.0.2
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages liblzma-dev depends on:
ii liblzma2 5.0.0-2 XZ-format compression library

liblzma-dev recommends no packages.

Versions of packages liblzma-dev suggests:
pn liblzma-doc <none> (no description available)



To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Jonathan Nieder
May 15th, 2012 - 02:20 pm ET | Report spam
found 673001 xz-utils/5.1.1alpha+20110809-3
severity 673001 serious
tags 673001 + patch
quit

Hi Anton,

Anton Tolchanov wrote:

/root/build/3rdparty/avro-c/src/libavro.a(codec.o): In function `encode_lzma':
/root/build/3rdparty/avro-c/src/codec.c:303: undefined reference to `lzma_raw_encoder_memusage'
/root/build/3rdparty/avro-c/src/codec.c:316: undefined reference to `lzma_raw_buffer_encode'

It looks like liblzma.a shipped in liblzma-dev does not contain all symbols
because liblzma.a from xzdec-build overwrites proper liblzma.a during
dh_auto_install.



Oh, geez. Thanks for catching it.

Jonathan



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics