From owner-freebsd-ports Tue Feb 5 3:50:15 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EA66C37B422 for ; Tue, 5 Feb 2002 03:50:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g15Bo2o08128; Tue, 5 Feb 2002 03:50:02 -0800 (PST) (envelope-from gnats) Received: from draco.macsch.com (draco.macsch.com [192.73.8.1]) by hub.freebsd.org (Postfix) with ESMTP id DF0B237B41E for ; Tue, 5 Feb 2002 03:43:02 -0800 (PST) Received: from mailmuc.muc.eu.mscsoftware.com (mailmuc.muc.macsch.com [161.34.37.20]) by draco.macsch.com (8.9.3/8.9.3) with ESMTP id DAA01881 for ; Tue, 5 Feb 2002 03:38:13 -0800 (PST) Received: from hunter.muc.macsch.com (hunter.muc.macsch.com [172.17.22.32]) by mailmuc.muc.eu.mscsoftware.com (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id g15BgIv01973 for ; Tue, 5 Feb 2002 12:42:18 +0100 Received: (from gwk@localhost) by hunter.muc.macsch.com (8.11.6/8.11.6) id g15BgsN73998; Tue, 5 Feb 2002 12:42:54 +0100 (CET) (envelope-from gwk) Message-Id: <200202051142.g15BgsN73998@hunter.muc.macsch.com> Date: Tue, 5 Feb 2002 12:42:54 +0100 (CET) From: "Georg-W. Koltermann" Reply-To: "Georg-W. Koltermann" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/34636: XmHTML does not build: debug.c:113: initializer element is not constant Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 34636 >Category: ports >Synopsis: XmHTML does not build: debug.c:113: initializer element is not constant >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 05 03:50:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Georg-W. Koltermann >Release: FreeBSD 5.0-CURRENT i386 >Organization: MSC Software >Environment: System: FreeBSD hunter.muc.macsch.com 5.0-CURRENT FreeBSD 5.0-CURRENT #46: Mon Jan 28 03:33:12 CET 2002 root@hunter.muc.macsch.com:/usr/obj/usr/src/sys/HUNTER i386 CVSupped on 7-Jan-2002 >Description: When trying to build XmHTML-1.1.7_1 on -current as of 7-JAN-2002, I got the following error during build: rm -f .libs/debug.lo cc -O -pipe -DVERSION=1107 -DHAVE_REGEX_H -DHAVE_LIBJPEG -DHAVE_LIBPNG -DMotif -I. -I../include -I../include/common -I../../include -I../../include/common -I../../include/XmHTML -I/usr/X11R6/include -I/usr/local/include -c debug.c -fPIC -DPIC -o .libs/debug.lo debug.c:113: initializer element is not constant gmake[2]: *** [debug.o] Fehler 1 gmake[2]: Verlassen des Verzeichnisses Verzeichnis »/usr/ports/x11-toolkits/xmhtml/work/XmHTML-1.1.7/lib/common« gmake[1]: *** [common] Fehler 2 gmake[1]: Verlassen des Verzeichnisses Verzeichnis »/usr/ports/x11-toolkits/xmhtml/work/XmHTML-1.1.7/lib« Strangely enough, the build continued without rebuilding the remaining files of this directory. The make install aborted, of course, because parts of the product had not been built. >How-To-Repeat: Try to build the port on a recent -current. >Fix: I have made the following straightforward change to debug.c to get it to compile. I haven't tried to run it (and I don't know how, this port is just a dependency that I need to build ports/math/grace). --- ./work/XmHTML-1.1.7/lib/common/debug.c.old Tue Oct 6 21:58:00 1998 +++ ./work/XmHTML-1.1.7/lib/common/debug.c Tue Feb 5 12:08:16 2002 @@ -110,7 +110,7 @@ /*** Private Function Prototype Declarations ****/ /*** Private Variable Declarations ***/ -static FILE *__rsd_debug_file = stdout; +static FILE *__rsd_debug_file; /***** * When debug output is send to a file, we register an exit func to close @@ -128,7 +128,11 @@ #endif { /* close output file */ - fclose(__rsd_debug_file); + if (__rsd_debug_file) { + fclose(__rsd_debug_file); + __rsd_debug_file = NULL; + } + } /***** @@ -146,6 +150,7 @@ #ifdef __STDC__ __rsd_fprintf(char *fmt, ...) { + register FILE *fp = (__rsd_debug_file ? __rsd_debug_file : stdout); va_list arg_list; va_start(arg_list, fmt); @@ -155,15 +160,16 @@ char *fmt; va_dcl { + register FILE *fp = (__rsd_debug_file ? __rsd_debug_file : stdout); va_list arg_list; va_start(arg_list); #endif /* __STDC__ */ /* flush to file */ - vfprintf(__rsd_debug_file, fmt, arg_list); + vfprintf(fp, fmt, arg_list); va_end(arg_list); - fflush(__rsd_debug_file); + fflush(fp); } /***** @@ -298,8 +304,10 @@ if((chPtr = strstr(argv[i], ":")) != NULL) { /* close any existing output file */ - if(__rsd_debug_file != stdout) + if(__rsd_debug_file) { fclose(__rsd_debug_file); + __rsd_debug_file = NULL; + } chPtr++; /* skip : */ if(!strcmp(chPtr, "pid")) /* .out */ @@ -336,14 +344,14 @@ fprintf(stderr, "__rsd_setDebugLevels: failed to open " "output file %s (errno = %i), reverting to " "stdout\n", tmp, errno); - __rsd_debug_file = stdout; + __rsd_debug_file = NULL; } } else { fprintf(stderr, "__rsd_setDebugLevels: missing arg to " "-dfile:, reverting to stdout\n"); - __rsd_debug_file = stdout; + __rsd_debug_file = NULL; } /* remove from cmd line */ REMOVE_ARG; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message