From kirk@daycos.com  Fri Jun  4 15:38:01 2010
Return-Path: <kirk@daycos.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0A83106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Jun 2010 15:38:01 +0000 (UTC)
	(envelope-from kirk@daycos.com)
Received: from mail.daycos.com (mail.daycos.com [204.26.70.93])
	by mx1.freebsd.org (Postfix) with ESMTP id 7BD798FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Jun 2010 15:38:00 +0000 (UTC)
Received: from mail.daycos.com (mail.daycos.com [10.45.14.81])
	by mail.daycos.com (Postfix) with ESMTP id 1E85426A0A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Jun 2010 10:22:28 -0500 (CDT)
Received: from mail.daycos.com ([10.45.14.81])
	by mail.daycos.com (mail.daycos.com [10.45.14.81]) (amavisd-new, port 10024)
	with LMTP id dVqljhbmo3Ky for <FreeBSD-gnats-submit@freebsd.org>;
	Fri,  4 Jun 2010 10:22:20 -0500 (CDT)
Received: from athena.daycos.com (athena.daycos.com [10.45.12.8])
	by mail.daycos.com (Postfix) with ESMTP id 113A926A04
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  4 Jun 2010 10:22:20 -0500 (CDT)
Received: by athena.daycos.com (Postfix, from userid 1001)
	id F01E4A80; Fri,  4 Jun 2010 10:22:19 -0500 (CDT)
Message-Id: <20100604152219.F01E4A80@athena.daycos.com>
Date: Fri,  4 Jun 2010 10:22:19 -0500 (CDT)
From: Kirk Strauser <kirk@strauser.com>
Reply-To: Kirk Strauser <kirk@strauser.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Can't install devel/gettext whenever the linux.ko module is loaded
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         147474
>Category:       ports
>Synopsis:       Can't install devel/gettext whenever the linux.ko module is loaded
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    autotools
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 04 15:40:01 UTC 2010
>Closed-Date:    Sat Jun 05 00:41:20 UTC 2010
>Last-Modified:  Sat Jun  5 01:20:03 UTC 2010
>Originator:     Kirk Strauser
>Release:        FreeBSD 8.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD athena.daycos.com 8.0-STABLE FreeBSD 8.0-STABLE #0: Thu Apr 8 14:43:56 CDT 2010 root@athena.daycos.com:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
Whenever I try to build devel/gettext with Linux compatibility enabled, it fails during the installation step:

Making install in intl-java
/compat/linux/bin/mkdir -p /usr/local/share/gettext
/compat/linux/bin/mkdir -p /usr/local/share/doc/gettext/javadoc2
/compat/linux/bin/mkdir -p /usr/local/share/doc/gettext/javadoc2/gnu/gettext
install  -o root -g wheel -m 444 ./javadoc2/index.html /usr/local/share/doc/gettext/javadoc2/index.html
install: /usr/local/share/doc/gettext/javadoc2/index.html: No such file or directory
*** Error code 71

Stop in /var/tmp/usr/ports/devel/gettext/work/gettext-0.18/gettext-runtime/intl-java.
*** Error code 1

Stop in /var/tmp/usr/ports/devel/gettext/work/gettext-0.18/gettext-runtime/intl-java.
*** Error code

Running the build and install process inside "script" and diffing the output shows that the port tries to use /compat/linux/bin/mkdir (from emulators/linux_base-f10) instead of /bin/mkdir:

--- /tmp/gettext-withoutlinux   2010-06-04 09:59:11.486925826 -0500
+++ /tmp/gettext-withlinux      2010-06-04 10:02:41.365989642 -0500
@@ -13,8 +13,7 @@
 ===>  Configuring for gettext-0.18_1
 checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
 checking whether build environment is sane... yes
-checking for a thread-safe mkdir -p... ELF binary type "3" not known.
-build-aux/install-sh -c -d
+checking for a thread-safe mkdir -p... /compat/linux/bin/mkdir -p
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes

Using the Linux mkdir causes the directories to be created in /compat/linux instead of / and the rest of the install script is understandably unhappy about that. I can easily repeat this on my system. If you need any further information or experimentation, I'll be happy to provide it.
>How-To-Repeat:
# kldload linux; cd /usr/ports/devel/gettext; make clean; make install
	
>Fix:
# kldunload linux; cd /usr/ports/devel/gettext; make clean; make install

	
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->autotools 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Jun 4 15:41:56 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147474 
State-Changed-From-To: open->feedback 
State-Changed-By: ade 
State-Changed-When: Fri Jun 4 22:08:49 UTC 2010 
State-Changed-Why:  
Merely loading the linux module will do nothing to affect devel/gettext in 
any way at all, so the subject line is misleading. 

With a populated /compat/linux, I am also unable to reproduce this problem. 

It would seem that, for whatever reason, you have /compat/linux/bin in your 
$PATH ahead of everything else, hence the wrong mkdir is being picked up, 
with the resultant fun and games. 

Please verify that /compat/linux/bin is _not_ in your $PATH, and try again. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147474 
State-Changed-From-To: feedback->closed 
State-Changed-By: ade 
State-Changed-When: Sat Jun 5 00:40:16 UTC 2010 
State-Changed-Why:  
Submitter has /compat/linux/bin in their path.  This is non-standard, and 
not required.  Removing this from $PATH causes the port to build as expected 
just like on thousands of other machines. 

It's also nothing to do with the linux.ko kernel module. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147474 

From: Kirk Strauser <kirk@strauser.com>
To: bug-followup@FreeBSD.org,
 kirk@strauser.com
Cc:  
Subject: Re: ports/147474: Can't install devel/gettext whenever the linux.ko module is loaded
Date: Fri, 4 Jun 2010 19:49:31 -0500

 This is a new change, and the only port that requires me to modify my  
 $PATH. It also does not address why devel/gettext is suddenly *not*  
 using FreeBSD's /bin/mkdir. Please consider reopening because the bug  
 still exists.

From: Kirk Strauser <kirk@strauser.com>
To: bug-followup@FreeBSD.org,
 kirk@strauser.com
Cc:  
Subject: Re: ports/147474: Can't install devel/gettext whenever the linux.ko module is loaded
Date: Fri, 4 Jun 2010 20:12:03 -0500

 I have do have /compat/linux/bin in my $PATH, but at the very end  
 (where's it's been since at least 2004, according to "svn log"), and  
 it's not the one that my shell ordinarily uses:
 
 # echo $PATH
 /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/ 
 bin:/home/kirk/bin:/compat/linux/bin:/compat/linux/sbin:/compat/linux/ 
 usr/bin:/compat/linux/usr/sbin
 # type mkdir
 mkdir is /bin/mkdir
 
 However, the port isn't using FreeBSD's mkdir either in that case.  
  From the output of configure:
 
 checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
 checking for a thread-safe mkdir -p... ../build-aux/install-sh -c -d
 
 Removing /compat/linux/bin causes the port to build correctly, so this  
 is also an effective temporary workaround.  I still stand by my  
 subject, though, as the presence of linux.ko triggers allows the port  
 to use the (wrong) Linux mkdir even though FreeBSD's mkdir comes first  
 in my $PATH.
>Unformatted:
