ports/55844: PATCH: fix analog crash by linking against system libz
Matthew Reimer
mreimer at vpop.net
Thu Aug 21 17:40:25 UTC 2003
>Number: 55844
>Category: ports
>Synopsis: PATCH: fix analog crash by linking against system libz
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 21 10:40:22 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Matthew Reimer
>Release: FreeBSD 4.8-STABLE i386
>Organization:
VPOP Technologies, Inc.
>Environment:
System: FreeBSD bilbo.vpop.net 4.8-STABLE FreeBSD 4.8-STABLE #8: Mon Jul 28 16:56:35 CDT 2003 mreimer at bilbo.vpop.net:/usr/obj/usr/src/sys/BILBO i386
i386 FreeBSD thorin.vpop.net 4.8-STABLE FreeBSD 4.8-STABLE #0: Wed May 28 07:54:46 PDT 2003
current analog port (version 5.32_1,1)
>Description:
Occasionally analog crashes when processing compressed log files.
Linking against the system libz instead of analog's libz solves
the problem.
>How-To-Repeat:
Run analog against the right mix of gzipped log files.
>Fix:
Use this new files/patch-aa, which adds -DHAVE_ZLIB:
--- src/Makefile.orig Sun Mar 23 05:57:02 2003
+++ src/Makefile Thu Aug 21 10:26:26 2003
@@ -2,15 +2,22 @@
# Please read docs/Readme.html, or http://www.analog.cx/
# This is a general Unix-like Makefile: Makefiles for other OS's can be found
# in the "build" directory.
-CC = gcc # which compiler to use: eg cc, acc, gcc. NB Different
+CC ?= gcc # which compiler to use: eg cc, acc, gcc. NB Different
# compilers need different CFLAGS, e.g., -O instead of -O2.
MAKE = make # which "make" to use
-CFLAGS = -O2 # options, e.g. for optimisation or ANSI compilation.
+CFLAGS += -I${LOCALBASE}/include -I${LOCALBASE}/include/gd
+#CFLAGS = -O2 # options, e.g. for optimisation or ANSI compilation.
# HP/UX cc needs CFLAGS = -Aa (HP/UX 9) or -Ae (HP/UX 10)
# BeOS needs CFLAGS = -O2 -Wl,-L/boot/home/config/lib
# BS2000/OSD needs CFLAGS = -XLLML -XLLMK
# NeXTSTEP needs CFLAGS = -O2 -pipe -no-precomp
-DEFS = # any combination of -DNOPIPES -DNODNS -DNODIRENT -DNOGLOB ...
+DEFS = -DLOGFILE=\"/var/log/httpd-access.log\" \
+ -DIMAGEDIR=\"/images/\" \
+ -DDEFAULTCONFIGFILE=\"$(PREFIX)/etc/analog.cfg\" \
+ -DLANGDIR=\"${PREFIX}/share/analog/lang/\" \
+ -DCONFIGDIR=\"$(PREFIX)/share/analog/\" \
+ -DHAVE_ZLIB
+#DEFS = # any combination of -DNOPIPES -DNODNS -DNODIRENT -DNOGLOB ...
# ... -DNOOPEN -DNOFOLLOW -DNOALARM -DNOGRAPHICS -DNOGMTIME ...
# ... -DEBCDIC -DUSE_PLAIN_SETJMP ...
# ... -DHAVE_GD -DHAVE_ZLIB -DHAVE_PCRE ...
@@ -30,6 +37,12 @@
OS = UNIX # Operating system: UNIX, DOS, WIN32, MAC, OS2, OSX, VMS
# RISCOS, BEOS, NEXTSTEP, MPEIX, BS2000, AS400, OS390
LIBS = -lm # extra libraries needed; most platforms (but not OS X or BeOS)
+
+.if !defined(WITHOUT_GD)
+DEFS+= -DHAVE_GD
+LIBS+= -L${LOCALBASE}/lib -lgd -lpng -ljpeg -lz
+.endif
+
# need -lm LAST
# if you defined HAVE_GD above you also need -lgd -lpng -ljpeg -lz
# if you defined HAVE_ZLIB above you also need -lz
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list