From keramida@ceid.upatras.gr  Tue Jun 11 03:31:27 2002
Return-Path: <keramida@ceid.upatras.gr>
Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5])
	by hub.freebsd.org (Postfix) with ESMTP id 3E79D37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Jun 2002 03:31:25 -0700 (PDT)
Received: from hades.hell.gr (patr364-a22.otenet.gr [195.167.109.54])
	by mailsrv.otenet.gr (8.12.3/8.12.3) with ESMTP id g5BAVKZN017295
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Jun 2002 13:31:22 +0300 (EEST)
Received: from hades.hell.gr (hades [127.0.0.1])
	by hades.hell.gr (8.12.3/8.12.3) with ESMTP id g5BAVIeP041108
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Jun 2002 13:31:19 +0300 (EEST)
	(envelope-from charon@hades.hell.gr)
Received: (from charon@localhost)
	by hades.hell.gr (8.12.3/8.12.3/Submit) id g5B389tS039533;
	Tue, 11 Jun 2002 06:08:09 +0300 (EEST)
	(envelope-from charon)
Message-Id: <200206110308.g5B389tS039533@hades.hell.gr>
Date: Tue, 11 Jun 2002 06:08:09 +0300 (EEST)
From: Giorgos Keramidas <keramida@freebsd.org>
Reply-To: Giorgos Keramidas <keramida@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: minor editors/emacs20 build problem
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         39147
>Category:       ports
>Synopsis:       minor editors/emacs20 build problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 11 03:40:01 PDT 2002
>Closed-Date:    Mon Jul 29 15:05:13 PDT 2002
>Last-Modified:  Mon Jul 29 15:05:13 PDT 2002
>Originator:     Giorgos Keramidas
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:

	System: FreeBSD hades.hell.gr 5.0-CURRENT FreeBSD 5.0-CURRENT #0:
	Mon Jun 10 12:05:07 EEST 2002
	root@hades.hell.gr:/usr/obj/usr/src/sys/HECATE i386

>Description:

	While trying to rebuild emacs20 today, to make use of the last
	commits in that port, I came across a minor build problem in
	CURRENT.  This is shown in the partial log below:

: gmake[1]: Entering directory
: `/usr/ports/editors/emacs20/work/emacs-20.7/src'
: cc -c  -Demacs -DHAVE_CONFIG_H   -I.  -I/usr/ports/editors/emacs20/work/emacs-20.7/src -O -march=pentium emacs.c
: emacs.c: In function `main':
: emacs.c:605: conflicting types for `sys_nerr'
: /usr/include/stdio.h:238: previous declaration of `sys_nerr'
: gmake[1]: *** [emacs.o] Error 1
: gmake[1]: Leaving directory
: `/usr/ports/editors/emacs20/work/emacs-20.7/src'
: gmake: *** [src] Error 2
: *** Error code 2

	I'm not sure why the following part of stdio.h causes this to
	fail in my current installation (Jun 10, 2002) with a fresh
	ports tree, and didn't fail a few months back when I last
	rebuilt emacs20.  It seems this is the part of stdio.h that
	causes emacs to fail:

:  237  #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
:  238  extern __const int sys_nerr;            /* perror(3) external variables */
:  239  extern __const char *__const sys_errlist[];
:  240  #endif


Stop in /usr/ports/editors/emacs20.

>How-To-Repeat:

>Fix:

	Manually removing the nested extern declaration from
	work/emacs-2.07/src/emacs.c:main() fixed the build for me.
	This is not a *real* fix of the cause, but thought I'd mention
	in case anyone wants to temporarily fix & investigate further.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: naddy 
State-Changed-When: Mon Jul 29 14:59:08 PDT 2002 
State-Changed-Why:  
I removed the sys_nerr declaration from emacs.c.  I don't see how this 
could cause trouble. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39147 
>Unformatted:
