aboutsummaryrefslogtreecommitdiff
path: root/doc/ltbug.texi
blob: 9f6f983de8aa5088ae46ee8f31219da9e1bc1ebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
\input texinfo @c -*-texinfo-*-
@c %**start of header
@settitle Two libtool issues

@node Abstract
@unnumbered Abstract

@uref{https://www.gnu.org/software/libtool,GNU libtool} is a generic
library support script used by many software packages as a portable
interface for creating shared libraries.  In contrast to the
conventional approach where the build process results in binary
programs and libraries being created, libtool produces, along with
each binary, a @dfn{wrapper script} which is used to invoke that
binary from the source tree.  The wrapper invokes the binary in such
way as to guarantee that shared objects from the local source tree are
preferred over those already installed on the systems.

It has been discovered that under certain conditions @command{libtool}
creates wrappers that prefer installed versions of the shared objects
over those built in the source tree.  This makes results of any tests
run in the source tree unreliable.

This article describes two such cases.  Minimal test suites are
provided.  Patches for libtool are proposed, both for the current
stable version and the recent commit in the repository.

@node ltb1
@unnumbered Issue 1 (LTB1)
@lowersections
@include ltb1.texi
@raisesections

@node ltb2
@unnumbered Issue 2 (LTB2)
@lowersections
@include ltb2.texi
@raisesections

@node affected systems
@unnumbered Affected Systems
The following systems are known to be affected:

@itemize @bullet
@item GNU/Linux
@example
host-triplet:   x86_64-pc-linux-gnu
shell:          /bin/sh
compiler:       gcc
compiler flags: -g -O2
linker:         /usr/x86_64-slackware-linux/bin/ld -m elf_x86_64 (gnu? yes)
version:        libtool (GNU libtool) 2.4.6
automake:       automake (GNU automake) 1.15
autoconf:       autoconf (GNU Autoconf) 2.69
@end example

@item GNU/Linux with libtool from repository
@example
host-triplet:   x86_64-pc-linux-gnu
shell:          /bin/sh
compiler:       gcc
compiler flags: -g -O2
linker:         /usr/x86_64-slackware-linux/bin/ld -m elf_x86_64 (gnu? yes)
version:        libtool (GNU libtool) 2.4.6.44-b9b4
automake:       automake (GNU automake) 1.15
autoconf:       autoconf (GNU Autoconf) 2.69
@end example

@item FreeBSD
@example
host-triplet:   amd64-portbld-freebsd12.0
shell:          /bin/sh
compiler:       cc
compiler flags: -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing 
linker:         /usr/bin/ld (gnu? yes)
version:        libtool (GNU libtool) 2.4.6
automake:       automake (GNU automake) 1.16.1
autoconf:       autoconf (GNU Autoconf) 2.69
@end example
@end itemize

@node patches
@unnumbered Proposed Fixes

Patches are available both for the current stable and for the
repository version of GNU libtool.  Both patched versions successfully
pass libtool tests as well as the ltb1 and ltb2 tests.

@unnumberedsec Patches for libtool git HEAD

These patches were built over
@uref{http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=b9b44533fbf7c7752ffd255c3d09cc360e24183b,
commit b9b44533fbf7c7752ffd255c3d09cc360e24183b}:

@enumerate 1
@item 
@uref{0001-ltmain.in-append-rpath-option-arguments-to-finalize_.patch}
@item
@uref{0002-ltmain.in-ensure-that-local-source-tree-directories-.patch}
@end enumerate

The patches should be applied in order.

@unnumberedsec Patch for libtool version 2.4.6

Cumulative patch: @uref{libtool-2.4.6-ltb1-2.patch}.

@bye

Return to:

Send suggestions and report system problems to the System administrator.