Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2008 19:39:16 +0900 (JST)
From:      Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        turutani@scphys.kyoto-u.ac.jp
Subject:   ports/121462: building print/ghostscript-gpl fails with WITH_FT_BRIDGE=1
Message-ID:  <200803071039.m27AdGQ8061735@h116.65.226.10.32118.vlan.kuins.net>
Resent-Message-ID: <200803071040.m27Ae22h092140@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121462
>Category:       ports
>Synopsis:       building print/ghostscript-gpl fails with WITH_FT_BRIDGE=1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 07 10:40:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Tsurutani Naoki
>Release:        FreeBSD 6.3-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD h116.65.226.10.32118.vlan.kuins.net 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #15: Wed Jan 16 23:56:19 JST 2008 turutani@h116.65.226.10.32118.vlan.kuins.net:/usr/local/work/usr/obj/usr/src/sys/POLYMER13 amd64


	
>Description:
	building print/ghostscript-gpl fails with WITH_FT_BRIDGE=1, only on
	FreeBSD/amd64, not on FreeBSD/i386.
	
>How-To-Repeat:
	% cd /usr/ports/print/ghostscrip-gpl
	% make WITH_FT_BRIDGE=1
	...
	cat ./obj/../soobj/ld.tr >>./obj/../soobj/ldt.tr
	./obj/../soobj/echogs -a ./obj/../soobj/ldt.tr -s - -liconv -lfontconfig -Wl,-export-dynamic -Wl,-export-dynamic -lm
	if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \
	        XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
	        FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
	        DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
	        DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
	        DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \
	        DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \
	        DEVICE_DEVS_EXTRA= \
	        /bin/sh <./obj/../soobj/ldt.tr
	/usr/bin/ld: /usr/local/work/usr/ports/print/ghostscript-gpl/work/ghostscript-8.61/freetype/objs/freetype214MT_D.a(ftinit.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
	/usr/local/work/usr/ports/print/ghostscript-gpl/work/ghostscript-8.61/freetype/objs/freetype214MT_D.a: could not read symbols: Bad value
	gmake[1]: *** [bin/../sobin/libgs.so.8.61] error 1

	
>Fix:
	This is caused by "freetype.a"; originally "libfreetype.a" in /usr/local/lib.
	This file is used to build library in building ghostscript-gpl process,
	but the file is not position independent.
	We should build libfreetype.a using position independent objects.
	Fix print/freetype2 using the following patch:

--- /dev/null	2008-03-07 19:33:00.000000000 +0900
+++ files/patch-builds-freetype.mk	2008-03-07 19:26:28.000000000 +0900
@@ -0,0 +1,11 @@
+--- builds/freetype.mk.orig	2008-03-07 19:25:58.000000000 +0900
++++ builds/freetype.mk	2008-03-07 19:15:21.000000000 +0900
+@@ -152,7 +152,7 @@
+              $(CFLAGS) \
+              $DFT2_BUILD_LIBRARY \
+              $DFT_CONFIG_MODULES_H="<ftmodule.h>" \
+-             $(FTOPTION_FLAG)
++             $(FTOPTION_FLAG) -fPIC
+ FT_CC      = $(CC) $(FT_CFLAGS)
+ FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
+ 

	I do not know whether this problem often seen on FreeBSD/amd64 should
	be fixed with this way, but it can solve the problem.
	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803071039.m27AdGQ8061735>