From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jun 8 06:10:24 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36DE016A468 for ; Fri, 8 Jun 2007 06:10:24 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 1720C13C480 for ; Fri, 8 Jun 2007 06:10:24 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l586ANO5055098 for ; Fri, 8 Jun 2007 06:10:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l586ANMu055097; Fri, 8 Jun 2007 06:10:23 GMT (envelope-from gnats) Resent-Date: Fri, 8 Jun 2007 06:10:23 GMT Resent-Message-Id: <200706080610.l586ANMu055097@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Cristian KLEIN Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7487216A41F for ; Fri, 8 Jun 2007 06:06:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 4C3B713C45A for ; Fri, 8 Jun 2007 06:06:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l5866tw1013094 for ; Fri, 8 Jun 2007 06:06:55 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l5866tGE013093; Fri, 8 Jun 2007 06:06:55 GMT (envelope-from nobody) Message-Id: <200706080606.l5866tGE013093@www.freebsd.org> Date: Fri, 8 Jun 2007 06:06:55 GMT From: Cristian KLEIN To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/113470: [patch] print/freetype2 does not compile in (some) jails X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2007 06:10:24 -0000 >Number: 113470 >Category: ports >Synopsis: [patch] print/freetype2 does not compile in (some) jails >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jun 08 06:10:23 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Cristian KLEIN >Release: FreeBSD 6.2 >Organization: Technical University of Cluj-Napoca >Environment: FreeBSD mail.xxx.xxx 6.2-RELEASE-p3 FreeBSD 6.2-RELEASE-p3 #5: Fri Apr 27 20:01:20 EEST 2007 cristi@bavaria.xxx.xxx:/usr/obj/usr/src/sys/BAVARIA-SMP i386 >Description: print/freetype2 has a mechanism to autodetect the system it should compile on. (for example, ansi or unix). This autodetection mechanism relies on the fact that '/sbin/init' exists on every unix system. This is not necessarily true for FreeBSD jails, in which a paranoic system administrator would delete '/sbin/init' (it isn't useful in a jail anyway). When attempting to compile print/freetype2 in such a jail, it will incorrectly detect the system as 'ansi' and stop with the following error: ===> Building for freetype2-2.2.1_2 cc -I./objs -I./builds/ansi -I./include -O -pipe -march=pentium4 -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER -DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H="" -o objs/ftsystem.o src/base/ftsystem.c In file included from ./include/freetype/config/ftconfig.h:43, from src/base/ftsystem.c:29: ./include/freetype/config/ftoption.h:439:1: warning: "TT_CONFIG_OPTION_BYTECODE_INTERPRETER" redefined :2:1: warning: this is the location of the previous definition /usr/lib/crt1.o(.text+0x82): In function `_start': : undefined reference to `main' gmake: *** [objs/ftsystem.o] Error 1 *** Error code 2 Stop in /usr/ports/print/freetype2. >How-To-Repeat: First solution: 1) create a FreeBSD jail, as described in jail(8) 2) delete /sbin/init from the jail 3) install the ports collection 4) install print/freetype2 Dangerous, but should prove the point: 1) chflags noschg /sbin/init 2) mv /sbin/init /sbin/init.0 3) install print/freetype2 4) mv /sbin/init.0 /sbin/init 5) chflags schg /sbin/init >Fix: Workaround: type the following command in the jail environment: touch /sbin/init or, add the attached patch to print/freetype2/files Patch attached with submission follows: --- builds/unix/detect.mk.orig Tue Jan 31 15:12:28 2006 +++ builds/unix/detect.mk Fri Jun 8 08:48:32 2007 @@ -21,6 +21,10 @@ is_unix := $(strip $(wildcard /sbin/init) \ $(wildcard /usr/sbin/init) \ $(wildcard /hurd/auth)) + # Being part of the FreeBSD ports collection + # I'm pretty sure we're on a unix system. + is_unix := true + ifneq ($(is_unix),) >Release-Note: >Audit-Trail: >Unformatted: