Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Nov 2009 06:51:48 GMT
From:      "David G. Johns" <dgjohns@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/140992: [maintainer update] patch converters/libutf-8 for CFLAGS
Message-ID:  <200911290651.nAT6pmIS043764@www.freebsd.org>
Resent-Message-ID: <200911290700.nAT706bb012179@freefall.freebsd.org>

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

>Number:         140992
>Category:       ports
>Synopsis:       [maintainer update] patch converters/libutf-8 for CFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 29 07:00:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     David G. Johns
>Release:        7.2-STABLE
>Organization:
>Environment:
FreeBSD freebsd-dev.local.lan 7.2-STABLE FreeBSD 7.2-STABLE #6: Fri Nov 27 04:02:07 UTC 2009     root@freebsd-dev.local.lan:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Small patch to fix 'CFLAGS+= -fPIC' not being properly added during compilation. 
>How-To-Repeat:
Have CFLAGS set in /etc/make.conf, compile current converters/libutf-8 on amd64.

Fails with the following:

ld: fget.utf-8.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
fget.utf-8.o: could not read symbols: Bad value
>Fix:
The included patch, tested on i386 and amd64.

Patch attached with submission follows:

diff -ruN libutf-8.bak/Makefile libutf-8/Makefile
--- libutf-8.bak/Makefile	2007-05-30 15:04:33.000000000 +0000
+++ libutf-8/Makefile	2009-11-28 23:42:35.000000000 +0000
@@ -7,16 +7,16 @@
 
 PORTNAME=	libutf-8
 PORTVERSION=	1.0
+PORTREVISION=   1
 PORTEPOCH=	1
 CATEGORIES=	converters
 MASTER_SITES=	http://www.whizkidtech.redprince.net/i18n/ \
 		ftp://ftp.whizkidtech.redprince.net/unix/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	dgjohns@gmail.com
 COMMENT=	Unicode conversion routines between UCS-4 and UTF-8
 
 USE_LDCONFIG=	yes
-CFLAGS+=	-fPIC
 
 MAN3=		libutf-8.3 fgetu8.3 fputu8.3 sgetu8.3 sputu8.3
 
diff -ruN libutf-8.bak/files/patch-aa libutf-8/files/patch-aa
--- libutf-8.bak/files/patch-aa	1999-04-16 23:34:30.000000000 +0000
+++ libutf-8/files/patch-aa	2009-11-28 23:42:35.000000000 +0000
@@ -1,6 +1,11 @@
---- Makefile.orig	Thu Apr  1 01:00:12 1999
-+++ Makefile	Fri Apr 16 18:11:12 1999
-@@ -29,5 +29,5 @@
+--- Makefile.orig	1999-04-01 11:00:12.000000000 +0400
++++ Makefile		2009-11-28 18:08:54.000000000 -0800
+@@ -26,8 +26,10 @@
+ #	 Makefile for libutf-8 library
+ #
+ 
++CFLAGS+=-fPIC
++
  all: libutf-8.so.1
  
  libutf-8.so.1: fget.utf-8.o sget.utf-8.o fput.utf-8.o sput.utf-8.o nomacros.o


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



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