From Meyser@xenet.de  Wed Sep 17 08:33:48 2003
Return-Path: <Meyser@xenet.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4CE5216A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 17 Sep 2003 08:33:48 -0700 (PDT)
Received: from server1.xenet.de (server1.xenet.de [193.159.181.120])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7112943FD7
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 17 Sep 2003 08:33:43 -0700 (PDT)
	(envelope-from Meyser@xenet.de)
Received: from server.intern (xenet.harz.de [193.159.181.111])
	by server1.xenet.de (8.12.5/8.12.5) with ESMTP id h8HFXVoH041176
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 17 Sep 2003 17:33:36 +0200 (CEST)
	(envelope-from Meyser@xenet.de)
Received: from server.intern (localhost [127.0.0.1])
	by server.intern (8.12.9/8.12.9) with ESMTP id h8HFXVhO076081
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 17 Sep 2003 17:33:31 +0200 (CEST)
	(envelope-from matthias@server.intern)
Received: (from matthias@localhost)
	by server.intern (8.12.9/8.12.9/Submit) id h8HFXVKj076080;
	Wed, 17 Sep 2003 17:33:31 +0200 (CEST)
	(envelope-from matthias)
Message-Id: <200309171533.h8HFXVKj076080@server.intern>
Date: Wed, 17 Sep 2003 17:33:31 +0200 (CEST)
From: Matthias Meyser <Meyser@xenet.de>
Reply-To: Matthias Meyser <Meyser@xenet.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /usr/ports/lang/ezm3 broken big/little endian detection problem
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         56955
>Category:       ports
>Synopsis:       /usr/ports/lang/ezm3 broken big/little endian detection problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jdp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 17 08:40:13 PDT 2003
>Closed-Date:    Wed Oct 22 17:52:43 PDT 2003
>Last-Modified:  Wed Oct 22 17:52:43 PDT 2003
>Originator:     Matthias Meyser
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
XeNET GmbH, Clausthal
>Environment:
System: FreeBSD fbsd.intern 4.8-STABLE FreeBSD 4.8-STABLE #8: Fri Jun 20 16:47:26 CEST 2003 root@fbsd.intern:/usr/obj/usr/src/sys/FBSD i386


>Description:
	configure script of /usr/ports/lang/ezm3 breaks on detecting big/little endian
	encoding.

        make output ollows: 
   
        --------------8<-------------------------------------------------------------
	===>  Extracting for ezm3-1.1
	>> Checksum OK for ezm3/ezm3-1.1-FreeBSD4-boot.tar.bz2.
	>> Checksum OK for ezm3/ezm3-1.1-src.tar.bz2.
	===>  Patching for ezm3-1.1
	
	[.....]
	
	---------- building m3cc in language/modula3/m3compiler ----------
	
	/usr/ports/lang/ezm3/work/ezm3-1.1/src/../boot-FreeBSD4/m3build/FreeBSD4/m3build -T /usr/ports/lang/ezm3/work/ezm3-1.1/src/../m3config/src -F /usr/ports/lang/ezm3/work/ezm3-1.1/src/../FreeBSD4/config.tmpl
	Created "Makefile" in /usr/ports/lang/ezm3/work/ezm3-1.1/language/modula3/m3compiler/m3cc/FreeBSD4
	Configuring libiberty...
	creating cache ../config.cache
	checking whether to enable maintainer-specific portions of Makefiles... no
	checking for makeinfo... makeinfo
	
	[.....]
	
	checking for thread.h... no
	checking for pthread.h... yes
	checking for CHAR_BIT... yes
	checking byte ordering... od: conftest.o: Bad file descriptor
	unknown
	configure: error: *** unable to determine endianness
	Configure in /usr/ports/lang/ezm3/work/ezm3-1.1/language/modula3/m3compiler/m3cc/FreeBSD4/gcc failed, exiting.
	mkdir FreeBSD4
	--- building in FreeBSD4 ---
	
	m3build: quake error: quake error: runtime error: Failed to configure m3cc
	
	--procedure--  -line-  -file---
	error              --  <builtin>
	                   78  /usr/ports/lang/ezm3/work/ezm3-1.1/language/modula3/m3compiler/m3cc/src/m3makefile
	
	
	m3build: quake error: quake error: runtime error: m3build failed with error code: 1
	
	--procedure--  -line-  -file---
	error              --  <builtin>
	BuildChunk        164  /usr/ports/lang/ezm3/work/ezm3-1.1/src/m3makefile
	PkgInfo           240  /usr/ports/lang/ezm3/work/ezm3-1.1/src/m3makefile
	                   31  /usr/ports/lang/ezm3/work/ezm3-1.1/src/PACKAGES
	
	gmake: *** [packages] Error 1
	*** Error code 2
	
	Stop in /usr/ports/lang/ezm3.
	===>  Cleaning for ezm3-1.1
        --------------8<-------------------------------------------------------------

>How-To-Repeat:
	cd /usr/ports/lang/ezm3; make;

>Fix:

	Unknown


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->jdp 
Responsible-Changed-By: osa 
Responsible-Changed-When: Wed Sep 17 08:52:40 PDT 2003 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56955 
State-Changed-From-To: open->feedback 
State-Changed-By: jdp 
State-Changed-When: Mon Sep 22 18:46:58 PDT 2003 
State-Changed-Why:  
I can reproduce this problem, but only by closing the standard 
input like this (using "sh"): 

make install <&- 

Do you have any idea why the standard input was closed when you 
tried to build this port? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56955 
State-Changed-From-To: feedback->closed 
State-Changed-By: jdp 
State-Changed-When: Wed Oct 22 17:48:50 PDT 2003 
State-Changed-Why:  
The submitter confirmed that he was running the build in such a way 
that the standard input was closed.  Specifically, he was running it 
as a remote job using ssh.  I think the right way to deal with this 
is the "don't do that" approach.  Remote builds should redirect 
standard input from /dev/null, if nothing else.  This same problem 
would no doubt break a lot of other configure scripts, too, 
including those of all the gcc ports.  I don't think it's worth 
changing all the affected ports to handle this case, since it's easy 
to avoid the problem in the first place. 

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