Initial import of pgbouncer-1.4.2
[pkgsrcv2.git] / doc / HACKS
1 # $NetBSD: HACKS,v 1.32 2009/10/11 16:14:39 asau Exp $
2 #
3 # This file is intended to document workarounds for currently unsolved
4 # (mostly) compiler bugs.
5 #
6 # Format:
7 #   hack                title
8 #   cdate               creation date
9 #   mdate               mod date
10 #   who                 responsible developer
11 #   port                ...
12 #         affected ports, space separated, if not "all"
13 #   file                affected file : revision : line from : line to
14 #         affected files and revision and line numbers describing hack
15 #         multiple lines if necessary.
16 #   pr                  NNNN ...
17 #         problem reports this hack works around, if known. Space
18 #         separated.
19 #   regress             src/regress/directory/where/test/found
20 #         regression test directories, if available.
21 #   descr
22 #         insert short informal description (multi-line). (Longer ones
23 #         should be in the PR database. More formal descriptions might
24 #         be in the regress tree. See above).
25 #   kcah
26 #         closing bracket.
27 #
28 # this is a comment.
29
30
31 hack    gcc 2.95.3/alpha -O2 bug
32 cdate   Wed Feb  5 16:36:58 EST 2003
33 who     dmcmahill
34 port    alpha
35 file    audio/xsidplay/patches/patch-aa : 1.8
36         cad/qcad/patches/patch-aa : 1.4
37         devel/guile-gtk//Makefile : 1.10
38         devel/guile-gtk/patches/patch-aa : 1.6
39         x11/qt2-libs/patches/patch-ae : 1.8
40         x11/qt2-libs/patches/patch-ae : 1.18
41         x11/kdelibs3/patches/patch-cd : 1.1
42         x11/kdelibs3/patches/patch-ce : 1.1
43         lang/gcc3/Makefile : 1.5
44         net/bing/Makefile : 1.12
45         net/isic/Makefile : 1.5
46         net/ettercap/patches/patch-aa : 1.4
47         net/ettercap/Makefile : 1.11
48 descr
49         Compiler crashes
50 kcah
51
52 hack    gcc 2.95.3/alpha -O2 bug
53 cdate   Thu Jan 23 15:42:57 UTC 2003
54 who     dmcmahill
55 port    alpha
56 file    mail/imap-uwwm/Makefile : 1.52
57 descr
58         Compiler crashes
59 kcah
60
61 hack    gcc 2.95.3/alpha c++ -O2 bug
62 cdate   Fri Aug 16 06:38:16 EDT 2002
63 who     dmcmahill
64 port    alpha
65 file    print/cjk-lyx/patches/patch-ab : 1.2
66 file    print/cjk-lyx/patches/patch-ad : 1.1
67 file    print/cjk-lyx/patches/patch-ae : 1.1
68 file    print/cjk-lyx/patches/patch-af : 1.1
69 descr
70         Assembler runs forever and never returns with -O2 on some files.
71 kcah
72
73 hack    gcc 2.95.3/alpha -O2 bug
74 cdate   Sun Aug 11 12:39:46 EDT 2002
75 who     dmcmahill
76 port    alpha
77 file    wm/flubox/patches/patch-ab : 1.3
78 descr
79         Assembler runs forever and never returns with -O2 on some files.
80 kcah
81
82 hack    gcc 2.95.3/m68k -O2 bug
83 cdate   Fri Jul 19 04:33:29 UTC 2002
84 who     fredb
85 port    mac68k, amiga
86 file    graphics/gdk-pixbuf/patches/patch-aa : 1.3
87 descr
88         pixops.c gives 'Internal compiler error' with -O2 (but not -O),
89         on m68k only. The exact error message is reproduced in the patch.
90 kcah
91
92 hack    gas 2.11.2 commutative constraint bug
93 cdate   Fri May 10 04:51:29 UTC 2002
94 who     fredb
95 port    mac68k
96 file    devel/gmp/patches/patch-aa : 1.7
97 descr
98         The __asm__() in longlong.h fails to assemble on m68k with an
99         "unrecognized instruction" error, unless the commutative
100         constraint ('%') is removed (which makes it *more* constrained).
101 kcah
102
103 hack    gcc 2.95.3 -O2 bug
104 cdate   Thu Apr 18 15:42:57 UTC 2002
105 who     fredb, dmcmahill
106 port    alpha, mac68k
107 file    print/lyx/patches/patch-ab : 1.2
108 file    print/lyx/patches/patch-ac : 1.1
109 file    print/lyx/patches/patch-ae : 1.1
110 descr
111         lyxfunc.C causes 'Internal compiler error' with -O2 (but not -O).
112         The exact error message is reproduced in the patch.
113         Various other files cause the assembler to run forever (well,
114         I gave up after several hours) on netbsd-1.5.3/alpha using
115         gcc-2.95.3 and -O2.
116 kcah
117
118 hack    cc -O* bug
119 mdate   23 Aug 2001
120 who     abs
121 port    sparc64
122 file    graphics/tiff/patches/patch-aa  : 1.3 : 52 : 58
123 descr
124         on tif_dirread.c -O[12] causes the compiler to abort
125 kcah
126
127 hack    cc -O* bug
128 cdate   08 Nov 2000
129 mdate   10 Jan 2002
130 who     abs
131 port    arm32 arm
132 file    benchmarks/lmbench/patches/patch-aa     : 1.2 :
133 file    benchmarks/lmbench/Makefile             : 1.9 :
134 descr
135         on certain c files, using -O[1-3] will cause the arm32 cc1 to run
136         forever.
137         reported to GCC people as PR optimization/2391.
138 kcah
139
140 hack    cc -O* bug
141 mdate   18 May 2001
142 who     abs
143 file    x11/xscreensaver/distinfo               : 1.2 :
144 file    x11/xscreensaver/patches/patch-ab       : 1.7 :
145 descr
146         on distort.c -O[12] causes the compiler to abort
147 kcah
148
149 hack    mac68k-jade
150 mdate   29 Mar 2001
151 who     hubertf
152 port    mac68k
153 file    textproc/jade/patches/patch-aa: 1.1 : 1 : 999
154 descr
155         jade on mac68k seems to dump core under certain conditions, the
156         patch was sent in by "Kogule, Ryo" <kogule@mars.dti.ne.jp> via
157         tech-pkg. The subject of the thread is "Jade doesn't work"
158         It is suspected that the patch really works around a bug in the
159         toolchain.
160 kcah
161
162 hack    gcc-2.95.3 -O* bug
163 mdate   12 Feb 2002
164 who     mrauch
165 port    i386
166 file    devel/pth/Makefile      : 1.37 : 20 : 22
167 descr
168         OpenOffice segfaults after some time in the pthread library with a
169         completely thrashed stack. Removing optimization when building
170         pth (-O0) avoids this problem.
171 kcah
172
173 hack    binutils-2.11.2 ld versioned symbols bug
174 cdate   26 Feb 2002
175 who     mrauch
176 file    misc/openoffice/patches/patch-dj
177 file    misc/openoffice/patches/patch-dk
178 descr   Using versioned symbols the special symbol _etext can end up
179         in the shared library with a junk value for the version string
180         instead of "0" for no version. Sometimes it is sufficient to
181         reorder the -l flags on the link line but the general hack is to
182         disable versioned symbols.
183 kcah
184
185 hack    sparc64-kth-krb
186 cdate   29 Mar 2002
187 who     hubertf
188 file    security/kth-krb4/Makefile
189 descr   This package hangs when compiling one of the files with the
190         compiler that comes with 1.5ZC. The compiler needs to be killed
191         manually - the package is marked as interactive on sparc64 for
192         that reason.
193 kcah
194
195 hack    cc -O* bug
196 mdate   04 Jun 2002
197 who     cjep
198 port    arm
199 file    net/ucspi-tcp/Makefile  : 1.11 :
200 descr
201         some compilations go into infinite loop if optimisation enabled in
202         gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with
203         a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's
204         entry above. First hang at:
205         ( ( ./compile tryulong32.c && ./load tryulong32 &&  ./tryulong32 ) \
206         >/dev/null 2>&1  && cat uint32.h2 || cat uint32.h1 ) > uint32.h
207 kcah
208
209 hack    cc -O* bug
210 mdate   04 Jun 2002
211 who     cjep
212 port    arm
213 file    net/djbdns/Makefile : 1.19 :
214 descr
215         various files go into infinite loop if optimisation enabled in
216         gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with
217         a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's
218         entry above. First hang as ucspi-tcp.
219 kcah
220
221 hack    cc -O* bug
222 mdate   06 Jun 2002
223 who     cjep
224 port    arm
225 file    emulators/stella/Makefile : 1.5 :
226 descr
227         Usual arm optimisation problem. The first problem is at:
228         c++ -c -O2 -fno-rtti -I. -I../emucore -I../emucore/m6502/src    \
229         -I../emucore/m6502/src/bspf/src -I../ui/x11 -I../ui/sound       \
230         -I/usr/X11R6/include -DBSPF_UNIX ../emucore/m6502/src/M6502.cxx
231 kcah
232
233 hack    cc -O* bug
234 mdate   07 Jun 2002
235 who     cjep
236 port    arm
237 file    databases/cdb/Makefile : 1.3 :
238 descr
239         Usual arm optimisation problem. The first problem occurs around
240         ( cat warn-auto.sh;  echo exec "`head -1 conf-cc`" '-c ${1+"$@"}'  \
241         ) > compile
242         chmod 755 compile
243 kcah
244
245 hack    gcc 2.95.3 -O2 bug
246 mdate   22 Jun 2002
247 who     jlam
248 port    sparc64
249 file    x11/openmotif/patches/patch-ap : 1.2 : 209
250 pr      15477
251 descr
252         With -O2 optimization, a "if {} else if {} else {}" C statement
253         isn't converted into the correct code.
254 kcah
255
256 hack    cc -O* bug
257 mdate   28 Nov 2002
258 who     agc
259 port    arm
260 file    emulators/simh/Makefile : 1.3 :
261 descr
262         Usual arm optimisation problem. The first problem occurs around
263         compilation of altairz80
264 kcah
265
266 hack    gcc-sparc64-memorysize
267 mdate   8 Jan 2003
268 who     salo
269 port    sparc64
270 file    security/skey/patch-aa : 1.2
271 file    security/skey/patch-ab : 1.1
272 descr
273         The SHA1Transform() function causes the sparc64 compiler to use
274         excessive amounts of memory attempting to optimise this function.
275         Using no optimisation allows the function to build.
276 kcah
277
278 hack    ImageMagick arm32+mipsel -O2 bug
279 mdate   25 Jan 2003
280 who     hubertf (the mipsel one, dunno who did the arm32 one)
281 port    cobald (probably other mipsel's), arm32
282 file    graphics/ImageMagick/Makefile : 1.90
283 descr
284         When compiling with -O2, gcc spins at one file. Going back to
285         -O fixes this. (The usual story...)
286 kcah
287
288 hack    zip -O bug
289 mdate   1 Jun 2003
290 who     grant
291 port    powerpc
292 file    archivers/zip/Makefile : 1.33
293 descr
294         When compiling with -O or -O2, gcc dies with an internal
295         compiler error on crypt.c. Turning off optimization fixes this.
296 kcah
297
298 hack    gcc 2.95.3/arm -O2 bug
299 cdate   2 Aug 2003
300 who     kristerw
301 port    arm
302 file    devel/ftnchek/Makefile : 1.13
303 descr   Internal compiler error for fortran.c when -O2. Use -O1 instead.
304 kcah
305
306 hack    gcc 2.95.3/arm -O* bug
307 cdate   19 Oct 2003
308 who     kristerw
309 port    arm
310 file    mail/safecat/patches/patch-aa : 1.1
311 descr   Compilation of the tryulong32.c configuration test takes ~forever.
312 kcah
313
314 hack    gcc 2.95.3/arm internal error
315 cdate   31 Jan 2004
316 who     kristerw
317 port    arm
318 file    games/sjeng/Makefile : 1.7
319 descr   Internal compiler error when compiling search.c.
320 kcah
321
322 hack    gcc 2.95.3/arm -O* bug
323 cdate   31 Jan 2003
324 who     kristerw
325 port    arm
326 file    databases/cdb/patches/patch-aa : 1.1
327 descr   Compilation of the tryulong32.c configuration test takes ~forever.
328 kcah
329
330 hack    perl 5.8/openssl/sparc64 bug
331 cdate   Wed Feb 16 13:24:06 2000
332 who     seb
333 port    sparc64
334 file    security/openssl/patches/patch-ak
335 descr
336         Perl's int() function gives bad result on sparc64.
337         Hence openssl's bn_prime.pl perl script fails.
338         Use POSIX::floor() as a workaround.
339         See perl ticket #25249.
340 kcah
341
342 hack    alpha c++ -O2 bug
343 cdate   Wed Feb 16 13:24:06 2000
344 who     recht
345 port    alpha
346 file    graphics/freetype2/Makefile
347 pr      25742
348 descr
349         The default compiler flags on the alpha port "-O2 -mieee"
350         cause the c++ compiler to generate buggy code.
351 kcah
352
353 hack    sparc64 gcc 3.3.x -O2 bug
354 cdate   29 Apr 2004
355 who     adam
356 port    sparc64
357 file    graphics/netpbm/patches/patch-ab
358 descr
359         sparc64 gcc 3.3.x toolchain bug means we must compile exif.o
360         without optimisation
361 kcah
362
363 hack    i386 g++ 3.3.x -O2 bug
364 cdate   Tue Aug 17 00:59:31 NZST 2004
365 who     dsainty
366 port    i386
367 file    emulators/palmosemulator/patches/patch-an
368 descr
369         EmPoint.cpp malfunctions with optimisation on, trashing point
370         coordinates.  Apparently an aliasing issue with automatic variables on
371         the stack and some fairly dodgy type casting.  The patch file contains
372         more details.
373 kcah
374
375 hack    libtool nawk line length problem
376 cdate   Tue Sep  7 01:23:10 UTC 2004
377 who     jschauma
378 port    mipseb (IRIX)
379 file    x11/gtk2/Makefile
380 descr
381         If we're on IRIX and we're using gcc, then, apparently, we need gawk,
382         as otherwise the awk invocation in libtool breaks complaining about
383         the ``Input record [...] too long'' near the end of the build process.
384         Oddly this does not occur using the mipspro compiler.  Possible
385         reason: using gcc we have longer CFLAGS.  Fix:  add USE_GNU_TOOLS+=awk
386         iff IRIX and gcc.  Problem: this might affect other packages as well.
387         One might consider depending libtool on gawk for IRIX.
388 kcah
389
390 hack    devel/bison -O* bug with sunpro
391 cdate   Tue Nov  2 17:30:48 GMT 2004
392 who     sketch
393 port    sparc (Solaris)
394 file    devel/bison/Makefile : 1.49
395 descr
396         bison's quotearg_buffer_restyled() has issues with certain compilers
397         using optimisation flags.  The resulting bison with optimsation
398         breaks on at least net/libIDL.  BUILDLINK_TRANSFORM -O* away until
399         the root cause can be fixed.
400 kcah
401
402 hack    security/libgpg-error awk on IRIX
403 cdate   Sun May 15 18:08:48 EDT 2005
404 who     jschauma
405 port    mipseb (IRIX)
406 file    security/libgpg-error/Makefile
407 descr
408         Apparently, for as of yet undetermined reasons, gawk as built on IRIX
409         under pkgsrc croaks on regular expressions including a combination of
410         alpha- and numerical matches, such as the rather trivial
411         /^[ \t]*[0-9]+/
412         Let's use the system's AWK (ie nawk) for this package to avoid
413         breaking hundreds of dependents.
414         Speculation: somehow the regular expression library used to build gawk
415         conflicts with the systems regular expression library or some such.
416         Note: gawk from SGIs freeware collection depends on expat -- why is
417         that?  Does that have anything to do with anything?
418 kcah