tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
libunwind: Fix build
William A. Kennington III
11 years ago
aeb0b610
6d0bfb1b
+69
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
libunwind
default.nix
libunwind-1.1-lzma.patch
+6
pkgs/development/libraries/libunwind/default.nix
···
8
8
sha256 = "16nhx2pahh9d62mvszc88q226q5lwjankij276fxwrm8wb50zzlx";
9
9
};
10
10
11
11
+
patches = [ ./libunwind-1.1-lzma.patch ];
12
12
+
13
13
+
postPatch = ''
14
14
+
sed -i -e '/LIBLZMA/s:-lzma:-llzma:' configure
15
15
+
'';
16
16
+
11
17
propagatedBuildInputs = [ xz ];
12
18
13
19
NIX_CFLAGS_COMPILE = if stdenv.system == "x86_64-linux" then "-fPIC" else "";
+63
pkgs/development/libraries/libunwind/libunwind-1.1-lzma.patch
···
1
1
+
From 38c349bb000b427c376e756e3ecdb764a2b4d297 Mon Sep 17 00:00:00 2001
2
2
+
From: Mike Frysinger <vapier@gentoo.org>
3
3
+
Date: Sat, 15 Feb 2014 21:00:59 -0500
4
4
+
Subject: [PATCH] link sublibs against liblzma as needed
5
5
+
6
6
+
The coredump/elf32/elf64/elfxx libs use lzma funcs but don't link against
7
7
+
it. This produces sub-shared libs that don't link against lzma and can
8
8
+
make the linker angry due to underlinking like so:
9
9
+
10
10
+
libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=amdfam10 -pipe -g \
11
11
+
-frecord-gcc-switches -Wimplicit-function-declaration -fexceptions \
12
12
+
-Wall -Wsign-compare -Wl,-O1 -Wl,--hash-style=gnu \
13
13
+
-o .libs/test-coredump-unwind test-coredump-unwind.o \
14
14
+
../src/.libs/libunwind-coredump.so ../src/.libs/libunwind-x86_64.so
15
15
+
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_footer_decode'
16
16
+
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_buffer_decode'
17
17
+
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_size'
18
18
+
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_end'
19
19
+
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_uncompressed_size'
20
20
+
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_buffer_decode'
21
21
+
collect2: error: ld returned 1 exit status
22
22
+
23
23
+
So add LIBLZMA to the right LIBADD for each of these libraries.
24
24
+
25
25
+
URL: https://bugs.gentoo.org/444050
26
26
+
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
27
27
+
---
28
28
+
src/Makefile.am | 4 ++++
29
29
+
1 file changed, 4 insertions(+)
30
30
+
31
31
+
--- a/src/Makefile.in
32
32
+
+++ b/src/Makefile.in
33
33
+
@@ -169,7 +169,7 @@ libunwind_arm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
34
34
+
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
35
35
+
$(libunwind_arm_la_LDFLAGS) $(LDFLAGS) -o $@
36
36
+
@ARCH_ARM_TRUE@am_libunwind_arm_la_rpath = -rpath $(libdir)
37
37
+
-libunwind_coredump_la_LIBADD =
38
38
+
+libunwind_coredump_la_LIBADD = $(LIBLZMA)
39
39
+
am__libunwind_coredump_la_SOURCES_DIST = coredump/_UCD_accessors.c \
40
40
+
coredump/_UCD_create.c coredump/_UCD_destroy.c \
41
41
+
coredump/_UCD_access_mem.c coredump/_UCD_elf_map_image.c \
42
42
+
@@ -214,15 +214,15 @@ am_libunwind_dwarf_local_la_OBJECTS = dwarf/Lexpr.lo dwarf/Lfde.lo \
43
43
+
libunwind_dwarf_local_la_OBJECTS = \
44
44
+
$(am_libunwind_dwarf_local_la_OBJECTS)
45
45
+
@REMOTE_ONLY_FALSE@@USE_DWARF_TRUE@am_libunwind_dwarf_local_la_rpath =
46
46
+
-libunwind_elf32_la_LIBADD =
47
47
+
+libunwind_elf32_la_LIBADD = $(LIBLZMA)
48
48
+
am_libunwind_elf32_la_OBJECTS = elf32.lo
49
49
+
libunwind_elf32_la_OBJECTS = $(am_libunwind_elf32_la_OBJECTS)
50
50
+
@USE_ELF32_TRUE@am_libunwind_elf32_la_rpath =
51
51
+
-libunwind_elf64_la_LIBADD =
52
52
+
+libunwind_elf64_la_LIBADD = $(LIBLZMA)
53
53
+
am_libunwind_elf64_la_OBJECTS = elf64.lo
54
54
+
libunwind_elf64_la_OBJECTS = $(am_libunwind_elf64_la_OBJECTS)
55
55
+
@USE_ELF64_TRUE@am_libunwind_elf64_la_rpath =
56
56
+
-libunwind_elfxx_la_LIBADD =
57
57
+
+libunwind_elfxx_la_LIBADD = $(LIBLZMA)
58
58
+
am_libunwind_elfxx_la_OBJECTS = elfxx.lo
59
59
+
libunwind_elfxx_la_OBJECTS = $(am_libunwind_elfxx_la_OBJECTS)
60
60
+
@USE_ELFXX_TRUE@am_libunwind_elfxx_la_rpath =
61
61
+
--
62
62
+
1.8.5.5
63
63
+