summaryrefslogtreecommitdiff
path: root/doc/HACKS
blob: 72bb2d8a50867faec576d20aff204b287dcbbd2e (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# $NetBSD: HACKS,v 1.33 2011/08/01 11:59:47 asau Exp $
#
# This file is intended to document workarounds for currently unsolved
# (mostly) compiler bugs.
#
# Format:
#   hack		title
#   cdate		creation date
#   mdate		mod date
#   who			responsible developer
#   port		...
#  	  affected ports, space separated, if not "all"
#   file		affected file : revision : line from : line to
#  	  affected files and revision and line numbers describing hack
#  	  multiple lines if necessary.
#   pr			NNNN ...
#  	  problem reports this hack works around, if known. Space
#  	  separated.
#   regress		src/regress/directory/where/test/found
#  	  regression test directories, if available.
#   descr
#  	  insert short informal description (multi-line). (Longer ones
#  	  should be in the PR database. More formal descriptions might
#  	  be in the regress tree. See above).
#   kcah
#  	  closing bracket.
#
# this is a comment.


hack	gcc 2.95.3/alpha -O2 bug
cdate	Wed Feb  5 16:36:58 EST 2003
who	dmcmahill
port	alpha
file	audio/xsidplay/patches/patch-aa : 1.8
	cad/qcad/patches/patch-aa : 1.4
	devel/guile-gtk//Makefile : 1.10
	devel/guile-gtk/patches/patch-aa : 1.6
	x11/qt2-libs/patches/patch-ae : 1.8
	x11/qt2-libs/patches/patch-ae : 1.18
	x11/kdelibs3/patches/patch-cd : 1.1
	x11/kdelibs3/patches/patch-ce : 1.1
	lang/gcc3/Makefile : 1.5
	net/bing/Makefile : 1.12
	net/isic/Makefile : 1.5
	net/ettercap/patches/patch-aa : 1.4
	net/ettercap/Makefile : 1.11
descr
	Compiler crashes
kcah

hack	gcc 2.95.3/alpha -O2 bug
cdate	Thu Jan 23 15:42:57 UTC 2003
who	dmcmahill
port	alpha
file	mail/imap-uwwm/Makefile : 1.52
descr
	Compiler crashes
kcah

hack	gcc 2.95.3/alpha c++ -O2 bug
cdate	Fri Aug 16 06:38:16 EDT 2002
who	dmcmahill
port	alpha
file	print/cjk-lyx/patches/patch-ab : 1.2
file	print/cjk-lyx/patches/patch-ad : 1.1
file	print/cjk-lyx/patches/patch-ae : 1.1
file	print/cjk-lyx/patches/patch-af : 1.1
descr
	Assembler runs forever and never returns with -O2 on some files.
kcah

hack	gcc 2.95.3/alpha -O2 bug
cdate	Sun Aug 11 12:39:46 EDT 2002
who	dmcmahill
port	alpha
file	wm/flubox/patches/patch-ab : 1.3
descr
	Assembler runs forever and never returns with -O2 on some files.
kcah

hack	gcc 2.95.3/m68k -O2 bug
cdate	Fri Jul 19 04:33:29 UTC 2002
who	fredb
port	mac68k, amiga
file	graphics/gdk-pixbuf/patches/patch-aa : 1.3
descr
	pixops.c gives 'Internal compiler error' with -O2 (but not -O),
	on m68k only. The exact error message is reproduced in the patch.
kcah

hack	gas 2.11.2 commutative constraint bug
cdate	Fri May 10 04:51:29 UTC 2002
who	fredb
port	mac68k
file	devel/gmp/patches/patch-aa : 1.7
descr
	The __asm__() in longlong.h fails to assemble on m68k with an
	"unrecognized instruction" error, unless the commutative
	constraint ('%') is removed (which makes it *more* constrained).
kcah

hack	gcc 2.95.3 -O2 bug
cdate	Thu Apr 18 15:42:57 UTC 2002
who	fredb, dmcmahill
port	alpha, mac68k
file	print/lyx/patches/patch-ab : 1.2
file	print/lyx/patches/patch-ac : 1.1
file	print/lyx/patches/patch-ae : 1.1
descr
	lyxfunc.C causes 'Internal compiler error' with -O2 (but not -O).
	The exact error message is reproduced in the patch.
	Various other files cause the assembler to run forever (well,
	I gave up after several hours) on netbsd-1.5.3/alpha using
	gcc-2.95.3 and -O2.
kcah

hack	cc -O* bug
mdate	23 Aug 2001
who	abs
port	sparc64
file	graphics/tiff/patches/patch-aa	: 1.3 : 52 : 58
descr
	on tif_dirread.c -O[12] causes the compiler to abort
kcah

hack	cc -O* bug
cdate	08 Nov 2000
mdate	10 Jan 2002
who	abs
port	arm32 arm
file	benchmarks/lmbench/patches/patch-aa	: 1.2 :
file	benchmarks/lmbench/Makefile		: 1.9 :
descr
	on certain c files, using -O[1-3] will cause the arm32 cc1 to run
	forever.
	reported to GCC people as PR optimization/2391.
kcah

hack	cc -O* bug
mdate	18 May 2001
who	abs
file	x11/xscreensaver/distinfo		: 1.2 :
file	x11/xscreensaver/patches/patch-ab	: 1.7 :
descr
	on distort.c -O[12] causes the compiler to abort
kcah

hack	mac68k-jade
mdate	29 Mar 2001
who	hubertf
port	mac68k
file	textproc/jade/patches/patch-aa:	1.1 : 1 : 999
descr
	jade on mac68k seems to dump core under certain conditions, the
	patch was sent in by "Kogule, Ryo" <kogule@mars.dti.ne.jp> via
	tech-pkg. The subject of the thread is "Jade doesn't work"
	It is suspected that the patch really works around a bug in the
	toolchain.
kcah

hack	gcc-2.95.3 -O* bug
mdate	12 Feb 2002
who	mrauch
port	i386
file	devel/pth/Makefile	: 1.37 : 20 : 22
descr
	OpenOffice segfaults after some time in the pthread library with a
	completely thrashed stack. Removing optimization when building
	pth (-O0) avoids this problem.
kcah

hack	binutils-2.11.2 ld versioned symbols bug
cdate 	26 Feb 2002
who	mrauch
file	misc/openoffice/patches/patch-dj
file	misc/openoffice/patches/patch-dk
descr	Using versioned symbols the special symbol _etext can end up
	in the shared library with a junk value for the version string
	instead of "0" for no version. Sometimes it is sufficient to
	reorder the -l flags on the link line but the general hack is to
	disable versioned symbols.
kcah

hack	sparc64-kth-krb
cdate	29 Mar 2002
who	hubertf
file	security/kth-krb4/Makefile
descr	This package hangs when compiling one of the files with the
	compiler that comes with 1.5ZC. The compiler needs to be killed
	manually - the package is marked as interactive on sparc64 for
	that reason.
kcah

hack	cc -O* bug
mdate	04 Jun 2002
who	cjep
port	arm
file	net/ucspi-tcp/Makefile	: 1.11 :
descr
	some compilations go into infinite loop if optimisation enabled in
	gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with
	a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's
	entry above. First hang at:
	( ( ./compile tryulong32.c && ./load tryulong32 &&  ./tryulong32 ) \
	>/dev/null 2>&1  && cat uint32.h2 || cat uint32.h1 ) > uint32.h
kcah

hack	cc -O* bug
mdate	04 Jun 2002
who	cjep
port	arm
file	net/djbdns/Makefile : 1.19 :
descr
	various files go into infinite loop if optimisation enabled in
	gcc-2.95.3 20010315 (release) (NetBSD nb2) as shipped with
	a releng snapshot (May 31st) of NetBSD-1.6_BETA1. See also abs's
	entry above. First hang as ucspi-tcp.
kcah

hack	cc -O* bug
mdate	06 Jun 2002
who	cjep
port	arm
file	emulators/stella/Makefile : 1.5 :
descr
	Usual arm optimisation problem. The first problem is at:
	c++ -c -O2 -fno-rtti -I. -I../emucore -I../emucore/m6502/src    \
	-I../emucore/m6502/src/bspf/src -I../ui/x11 -I../ui/sound       \
	-I/usr/X11R6/include -DBSPF_UNIX ../emucore/m6502/src/M6502.cxx
kcah

hack	cc -O* bug
mdate	07 Jun 2002
who	cjep
port	arm
file	databases/cdb/Makefile : 1.3 :
descr
	Usual arm optimisation problem. The first problem occurs around
	( cat warn-auto.sh;  echo exec "`head -1 conf-cc`" '-c ${1+"$@"}'  \
	) > compile
	chmod 755 compile
kcah

hack	gcc 2.95.3 -O2 bug
mdate	22 Jun 2002
who	jlam
port	sparc64
file	x11/openmotif/patches/patch-ap : 1.2 : 209
pr	15477
descr
	With -O2 optimization, a "if {} else if {} else {}" C statement
	isn't converted into the correct code.
kcah

hack	cc -O* bug
mdate	28 Nov 2002
who	agc
port	arm
file	emulators/simh/Makefile : 1.3 :
descr
	Usual arm optimisation problem. The first problem occurs around
	compilation of altairz80
kcah

hack	gcc-sparc64-memorysize
mdate	8 Jan 2003
who	salo
port	sparc64
file	security/skey/patch-aa : 1.2
file	security/skey/patch-ab : 1.1
descr
	The SHA1Transform() function causes the sparc64 compiler to use
	excessive amounts of memory attempting to optimise this function.
	Using no optimisation allows the function to build.
kcah

hack	ImageMagick arm32+mipsel -O2 bug
mdate	25 Jan 2003
who	hubertf (the mipsel one, dunno who did the arm32 one)
port	cobald (probably other mipsel's), arm32
file	graphics/ImageMagick/Makefile : 1.90
descr
	When compiling with -O2, gcc spins at one file. Going back to
	-O fixes this. (The usual story...)
kcah

hack	zip -O bug
mdate	1 Jun 2003
who	grant
port	powerpc
file	archivers/zip/Makefile : 1.33
descr
	When compiling with -O or -O2, gcc dies with an internal
	compiler error on crypt.c. Turning off optimization fixes this.
kcah

hack	gcc 2.95.3/arm -O2 bug
cdate	2 Aug 2003
who	kristerw
port	arm
file	devel/ftnchek/Makefile : 1.13
descr	Internal compiler error for fortran.c when -O2. Use -O1 instead.
kcah

hack	gcc 2.95.3/arm -O* bug
cdate	19 Oct 2003
who	kristerw
port	arm
file	mail/safecat/patches/patch-aa : 1.1
descr	Compilation of the tryulong32.c configuration test takes ~forever.
kcah

hack	gcc 2.95.3/arm internal error
cdate	31 Jan 2004
who	kristerw
port	arm
file	games/sjeng/Makefile : 1.7
descr	Internal compiler error when compiling search.c.
kcah

hack	gcc 2.95.3/arm -O* bug
cdate	31 Jan 2003
who	kristerw
port	arm
file	databases/cdb/patches/patch-aa : 1.1
descr	Compilation of the tryulong32.c configuration test takes ~forever.
kcah

hack	perl 5.8/openssl/sparc64 bug
cdate	Wed Feb 16 13:24:06 2000
who	seb
port	sparc64
file	security/openssl/patches/patch-ak
descr
	Perl's int() function gives bad result on sparc64.
	Hence openssl's bn_prime.pl perl script fails.
	Use POSIX::floor() as a workaround.
	See perl ticket #25249.
kcah

hack	alpha c++ -O2 bug
cdate	Wed Feb 16 13:24:06 2000
who	recht
port	alpha
file	graphics/freetype2/Makefile
pr	25742
descr
	The default compiler flags on the alpha port "-O2 -mieee"
	cause the c++ compiler to generate buggy code.
kcah

hack	sparc64 gcc 3.3.x -O2 bug
cdate	29 Apr 2004
who	adam
port	sparc64
file	graphics/netpbm/patches/patch-ab
descr
	sparc64 gcc 3.3.x toolchain bug means we must compile exif.o
	without optimisation
kcah

hack	i386 g++ 3.3.x -O2 bug
cdate	Tue Aug 17 00:59:31 NZST 2004
who	dsainty
port	i386
file	emulators/palmosemulator/patches/patch-an
descr
	EmPoint.cpp malfunctions with optimisation on, trashing point
	coordinates.  Apparently an aliasing issue with automatic variables on
	the stack and some fairly dodgy type casting.  The patch file contains
	more details.
kcah

hack	libtool nawk line length problem
cdate	Tue Sep  7 01:23:10 UTC 2004
who	jschauma
port	mipseb (IRIX)
file	x11/gtk2/Makefile
descr
	If we're on IRIX and we're using gcc, then, apparently, we need gawk,
	as otherwise the awk invocation in libtool breaks complaining about
	the ``Input record [...] too long'' near the end of the build process.
	Oddly this does not occur using the mipspro compiler.  Possible
	reason: using gcc we have longer CFLAGS.  Fix:  add USE_GNU_TOOLS+=awk
	iff IRIX and gcc.  Problem: this might affect other packages as well.
	One might consider depending libtool on gawk for IRIX.
kcah

hack	devel/bison -O* bug with sunpro
cdate	Tue Nov  2 17:30:48 GMT 2004
who	sketch
port	sparc (Solaris)
file	devel/bison/Makefile : 1.49
descr
	bison's quotearg_buffer_restyled() has issues with certain compilers
	using optimisation flags.  The resulting bison with optimsation
	breaks on at least net/libIDL.  BUILDLINK_TRANSFORM -O* away until
	the root cause can be fixed.
kcah

hack	security/libgpg-error awk on IRIX
cdate	Sun May 15 18:08:48 EDT 2005
who	jschauma
port	mipseb (IRIX)
file	security/libgpg-error/Makefile
descr
	Apparently, for as of yet undetermined reasons, gawk as built on IRIX
	under pkgsrc croaks on regular expressions including a combination of
	alpha- and numerical matches, such as the rather trivial
	/^[ \t]*[0-9]+/
	Let's use the system's AWK (ie nawk) for this package to avoid
	breaking hundreds of dependents.
	Speculation: somehow the regular expression library used to build gawk
	conflicts with the systems regular expression library or some such.
	Note: gawk from SGIs freeware collection depends on expat -- why is
	that?  Does that have anything to do with anything?
kcah