Date: Fri, 8 Jun 2007 06:06:55 GMT From: Cristian KLEIN<cristi@net.utcluj.ro> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/113470: [patch] print/freetype2 does not compile in (some) jails Message-ID: <200706080606.l5866tGE013093@www.freebsd.org> Resent-Message-ID: <200706080610.l586ANMu055097@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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="<ftmodule.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 <command line>: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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706080606.l5866tGE013093>