Bug 56955

Summary: /usr/ports/lang/ezm3 broken big/little endian detection problem
Product: Ports & Packages Reporter: Meyser+bugs.freebsd.org
Component: Individual Port(s)Assignee: John Polstra <jdp>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Meyser+bugs.freebsd.org 2003-09-17 16:40:13 UTC
	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<-------------------------------------------------------------

Fix: 

Unknown
How-To-Repeat: 	cd /usr/ports/lang/ezm3; make;
Comment 1 Sergey A. Osokin freebsd_committer freebsd_triage 2003-09-17 16:52:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jdp

Over to maintainer.
Comment 2 John Polstra freebsd_committer freebsd_triage 2003-09-23 02:46:58 UTC
State Changed
From-To: open->feedback

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?
Comment 3 John Polstra freebsd_committer freebsd_triage 2003-10-23 01:48:50 UTC
State Changed
From-To: feedback->closed

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.