From truckman@FreeBSD.org  Tue Feb 25 02:49:47 2014
Return-Path: <truckman@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id A0E19F7C
	for <FreeBSD-gnats-submit@FreeBSD.org>; Tue, 25 Feb 2014 02:49:47 +0000 (UTC)
Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 757F614EE
	for <FreeBSD-gnats-submit@FreeBSD.org>; Tue, 25 Feb 2014 02:49:47 +0000 (UTC)
Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2])
	by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s1P2nkva075790
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 24 Feb 2014 18:49:46 -0800 (PST)
	(envelope-from truckman@FreeBSD.org)
Received: from mousie.catspoiler.org (localhost.catspoiler.org [127.0.0.1])
	by mousie.catspoiler.org (8.14.7/8.14.7) with ESMTP id s1P2nkaK068421
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 24 Feb 2014 18:49:46 -0800 (PST)
	(envelope-from truckman@FreeBSD.org)
Received: (from dl@localhost)
	by mousie.catspoiler.org (8.14.7/8.14.7/Submit) id s1P2nk1e068420;
	Mon, 24 Feb 2014 18:49:46 -0800 (PST)
	(envelope-from truckman@FreeBSD.org)
Message-Id: <201402250249.s1P2nk1e068420@mousie.catspoiler.org>
Date: Mon, 24 Feb 2014 18:49:46 -0800 (PST)
From: Don Lewis <truckman@FreeBSD.org>
Reply-To: Don Lewis <truckman@FreeBSD.org>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:
Subject: print/xdvik fails with iconv linker errors
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         187014
>Category:       ports
>Synopsis:       print/xdvik fails with iconv linker errors
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    hrs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 25 02:50:01 UTC 2014
>Closed-Date:    
>Last-Modified:  Thu Mar  6 09:20:00 UTC 2014
>Originator:     Don Lewis
>Release:        FreeBSD 11.0-CURRENT i386
>Organization:
FreeBSD project
>Environment:
System: FreeBSD scratch.catspoiler.org 11.0-CURRENT FreeBSD 11.0-CURRENT #70 r262340M: Sat Feb 22 15:58:39 PST 2014     dl@scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERICSMB  i386


Ports revision r345674

>Description:

The build phase for print/xdvik fails at this point:

cc -o xdvi-motif browser.o dl_list.o dvi-draw.o dvi-init.o dvisel.o encodings.o events.o exit-handlers.o filehist.o font-open.o gf.o string_list.o hypertex.o image-magick.o main.o mime.o my-snprintf.o my-vsnprintf.o pagehist.o pk.o print-internal.o psdps.o psgs.o psheader.o psnews.o read-mapfile.o search-internal.o special.o string-utils.o tfmload.o util.o vf.o xdvi.o xserver-info.o x_util.o -Wl,--allow-multiple-definition  ./gui/libgui.a -L/usr/local/lib /usr/local/lib/libt1.so ../kpathsea/.libs/libkpathsea.a /usr/local/lib/libXm.so /usr/local/lib/libXft.so /usr/local/lib/libfontconfig.so /usr/local/lib/libexpat.so /usr/local/lib/libfreetype.so -lz -lbz2 -lpng15 /usr/local/lib/libXrender.so /usr/local/lib/libjpeg.so -lpng /usr/local/lib/libXmu.so /usr/local/lib/libXt.so /usr/local/lib/libSM.so /usr/local/lib/libICE.so /usr/local/lib/libXp.so /usr/local/lib/libXext.so /usr/local/lib/libXpm.so /usr/local/lib/libX11.so /usr/local/lib/libxcb.so /usr/local/lib/libXau.so /usr/loc!
 al/lib/libXdmcp.so /usr/local/lib/libpthread-stubs.so -lrpcsvc -lm -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
encodings.o: In function `cjk2unicode':
encodings.c:(.text+0x12f): undefined reference to `libiconv_open'
encodings.c:(.text+0x17a): undefined reference to `libiconv'
encodings.o: In function `close_iconv':
encodings.c:(.text+0x33d2): undefined reference to `libiconv_close'
util.o: In function `iconv_convert_string':
util.c:(.text+0x2950): undefined reference to `libiconv_open'
util.c:(.text+0x29e5): undefined reference to `libiconv'
util.c:(.text+0x29f9): undefined reference to `libiconv_close'
util.c:(.text+0x2b23): undefined reference to `libiconv_close'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [xdvi-motif] Error 1
gmake[3]: Leaving directory `/usr/ports/print/xdvik/work/xdvik-22.84.16/texk/xdvik'
gmake[2]: *** [all] Error 1
gmake[2]: Leaving directory `/usr/ports/print/xdvik/work/xdvik-22.84.16/texk'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/usr/ports/print/xdvik/work/xdvik-22.84.16'
*** Error code 1

Stop.
make: stopped in /usr/ports/print/xdvik


The problem seems to be that the build picks up /usr/local/include/iconv.h
instead of /usr/include/iconv.h.  The former include file has #define
statements that rename iconv_open to libiconv_open, etc.  This would
probably work if the port also listed libiconv as a dependency and linked
against /usr/local/lib/libiconv*, but neither of these is true.
The configure script doesn't add -L/usr/local/lib to the command line
when it is checked to see if it should link with -liconv.

This probably used to work before iconv was added to the libc because
configure would not have found iconv support.

>How-To-Repeat:

Attempt to build the port on a version of FreeBSD that includes iconv
in libc.

>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->hrs 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Feb 25 02:50:10 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Tijl Coosemans <tijl@FreeBSD.org>
To: bug-followup@FreeBSD.org, truckman@FreeBSD.org
Cc:  
Subject: Re: ports/187014: print/xdvik fails with iconv linker errors
Date: Tue, 4 Mar 2014 12:49:16 +0100

 --MP_/LJ9Sl.xc4oBF/mGT83+lHoK
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Hi,
 
 This patch should fix the problem:
 
 - Add USES=iconv.
 - Fix libiconv detection on FreeBSD < 10 by setting CPPFLAGS and LDFLAGS.
 - Patch Makefile.in so it doesn't use libiconv on FreeBSD 10.
 
 Tested on redports: https://redports.org/buildarchive/20140304100900-29556/
 --MP_/LJ9Sl.xc4oBF/mGT83+lHoK
 Content-Type: text/x-patch
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment; filename=xdvik.patch
 
 Index: print/xdvik/Makefile
 ===================================================================
 --- print/xdvik/Makefile	(revision 346795)
 +++ print/xdvik/Makefile	(working copy)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	xdvik
  PORTVERSION=	22.84.16
 -PORTREVISION=	5
 +PORTREVISION=	6
  CATEGORIES=	print
  MASTER_SITES=	SF/hoge
  #/xdvi/${PORTNAME}/${PORTVERSION}
 @@ -14,7 +14,7 @@ COMMENT=	DVI Previewer(kpathsearch) for 
  
  LIB_DEPENDS=	t1.5:${PORTSDIR}/devel/t1lib
  
 -USES=		gmake motif
 +USES=		gmake iconv motif
  USE_TEX=	base texmf
  MAKE_JOBS_UNSAFE=	yes
  GNU_CONFIGURE=	yes
 @@ -25,7 +25,8 @@ CONFIGURE_ARGS=	--with-system-t1lib \
  CONFIGURE_ENV=	INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
  		INSTALL_DATA="${INSTALL_DATA}" \
  		INSTALL_PROGRAM="${INSTALL_PROGRAM}"
 -CFLAGS+=	-I${LOCALBASE}/include
 +CPPFLAGS+=	-I${LOCALBASE}/include
 +LDFLAGS+=	-L${LOCALBASE}/lib
  INSTALL_WRKSRC=	${WRKSRC}/texk/xdvik
  
  PLIST_SUB=	TEXMFDIR=${TEXMFDIR} TEXMFCONFIGDIR=${TEXMFDIR}-config
 @@ -65,6 +66,11 @@ PKGINSTALL_SUB=	MKTEXLSR=${MKTEXLSR} \
  		LOCALBASE=${LOCALBASE}
  
  NO_STAGE=	yes
 +post-patch:
 +	@${REINPLACE_CMD} 's/@iconv_libs@/${ICONV_LIB}/' \
 +		${WRKSRC}/texk/xdvik/Makefile.in \
 +		${WRKSRC}/texk/xdvik/tests/Makefile.in
 +
  pre-install:
  	${SED} ${PKGINSTALL_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
  		< ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
 
 --MP_/LJ9Sl.xc4oBF/mGT83+lHoK--

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187014: commit references a PR
Date: Thu,  6 Mar 2014 09:13:33 +0000 (UTC)

 Author: hrs
 Date: Thu Mar  6 09:13:25 2014
 New Revision: 347175
 URL: http://svnweb.freebsd.org/changeset/ports/347175
 QAT: https://qat.redports.org/buildarchive/r347175/
 
 Log:
   Fix iconv issue [*]:
    - Add USES=iconv.
    - Fix libiconv detection on FreeBSD < 10 by setting CPPFLAGS and LDFLAGS.
    - Patch Makefile.in so it doesn't use libiconv on FreeBSD 10.
   
   - Use new syntax of LIB_DEPENDS.
   - Minor style cleanups.
   
   Submitted by:	tijl [*]
   PR:		ports/187014
 
 Modified:
   head/print/xdvik/Makefile
   head/print/xdvik/pkg-plist
 
 Modified: head/print/xdvik/Makefile
 ==============================================================================
 --- head/print/xdvik/Makefile	Thu Mar  6 09:13:24 2014	(r347174)
 +++ head/print/xdvik/Makefile	Thu Mar  6 09:13:25 2014	(r347175)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	xdvik
  PORTVERSION=	22.84.16
 -PORTREVISION=	5
 +PORTREVISION=	6
  CATEGORIES=	print
  MASTER_SITES=	SF/hoge
  #/xdvi/${PORTNAME}/${PORTVERSION}
 @@ -12,9 +12,9 @@ PKGNAMESUFFIX=	-tetex
  MAINTAINER=	hrs@FreeBSD.org
  COMMENT=	DVI Previewer(kpathsearch) for X
  
 -LIB_DEPENDS=	t1.5:${PORTSDIR}/devel/t1lib
 +LIB_DEPENDS=	libt1.so:${PORTSDIR}/devel/t1lib
  
 -USES=		gmake motif
 +USES=		gmake iconv motif
  USE_TEX=	base texmf
  MAKE_JOBS_UNSAFE=	yes
  GNU_CONFIGURE=	yes
 @@ -25,7 +25,8 @@ CONFIGURE_ARGS=	--with-system-t1lib \
  CONFIGURE_ENV=	INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
  		INSTALL_DATA="${INSTALL_DATA}" \
  		INSTALL_PROGRAM="${INSTALL_PROGRAM}"
 -CFLAGS+=	-I${LOCALBASE}/include
 +CPPFLAGS+=	-I${LOCALBASE}/include
 +LDFLAGS+=	-L${LOCALBASE}/lib
  INSTALL_WRKSRC=	${WRKSRC}/texk/xdvik
  
  PLIST_SUB=	TEXMFDIR=${TEXMFDIR} TEXMFCONFIGDIR=${TEXMFDIR}-config
 @@ -45,7 +46,7 @@ TEXMFLOCAL_LSR?=${LOCALBASE}/${TEXMFLOCA
  TEXCONFIGBIN=	${LOCALBASE}/bin/texconfig-sys
  MKTEXLSR?=	${LOCALBASE}/bin/mktexlsr
  LIBT1_PREFIX?=	${LOCALBASE}
 -DOC_FILES=	BUGS CHANGES INSTALL \
 +PORTDOCS=	BUGS CHANGES INSTALL \
  		README README.CVS README_maintainer TODO
  
  .if defined(WITH_LETTERSIZE)
 @@ -55,9 +56,10 @@ PAPERSIZE=	letter
  PAPERSIZE=	a4
  .endif
  
 -PKGINSTALL=	${WRKDIR}/pkg-install.sh
 -PKGDEINSTALL=	${WRKDIR}/pkg-install.sh
 -PKGINSTALL_SUB=	MKTEXLSR=${MKTEXLSR} \
 +PKGINSTALL=	${WRKDIR}/pkg-install
 +PKGDEINSTALL=	${WRKDIR}/pkg-install
 +SUB_FILES=	pkg-install
 +SUB_LIST=	MKTEXLSR=${MKTEXLSR} \
  		XDVIDIR=${PREFIX}/${TEXMFDIR}/xdvi \
  		XDVICONFDIR=${PREFIX}/${TEXMFDIR}-config/xdvi \
  		PAPERSIZE=${PAPERSIZE} \
 @@ -65,15 +67,15 @@ PKGINSTALL_SUB=	MKTEXLSR=${MKTEXLSR} \
  		LOCALBASE=${LOCALBASE}
  
  NO_STAGE=	yes
 -pre-install:
 -	${SED} ${PKGINSTALL_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
 -		< ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
 -	${CHMOD} 0755 ${PKGINSTALL}
 +post-patch:
 +	@${REINPLACE_CMD} 's/@iconv_libs@/${ICONV_LIB}/' \
 +	    ${WRKSRC}/texk/xdvik/Makefile.in \
 +	    ${WRKSRC}/texk/xdvik/tests/Makefile.in
  
  post-install:
  .if !defined(NOPORTDOCS)
  	${MKDIR} ${DOCSDIR}
 -	${INSTALL_DATA} ${DOC_FILES:S@^@${WRKSRC}/@} ${DOCSDIR}
 +	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
  .endif
  	@${PKGINSTALL} ${PKGNAME} POST-INSTALL
  
 
 Modified: head/print/xdvik/pkg-plist
 ==============================================================================
 --- head/print/xdvik/pkg-plist	Thu Mar  6 09:13:24 2014	(r347174)
 +++ head/print/xdvik/pkg-plist	Thu Mar  6 09:13:25 2014	(r347175)
 @@ -7,11 +7,3 @@ bin/xdvi-motif
  %%TEXMFDIR%%/xdvi/pixmaps/toolbar2.xpm
  @dirrm %%TEXMFDIR%%/xdvi/pixmaps
  %%TEXMFCONFIGDIR%%/xdvi/XDvi
 -%%PORTDOCS%%%%DOCSDIR%%/BUGS
 -%%PORTDOCS%%%%DOCSDIR%%/CHANGES
 -%%PORTDOCS%%%%DOCSDIR%%/INSTALL
 -%%PORTDOCS%%%%DOCSDIR%%/README
 -%%PORTDOCS%%%%DOCSDIR%%/README.CVS
 -%%PORTDOCS%%%%DOCSDIR%%/README_maintainer
 -%%PORTDOCS%%%%DOCSDIR%%/TODO
 -%%PORTDOCS%%@dirrm %%DOCSDIR%%
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
