From owner-freebsd-ports@FreeBSD.ORG Sat Aug 31 14:42:50 2013 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB7DF2E2; Sat, 31 Aug 2013 14:42:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CE872561; Sat, 31 Aug 2013 14:42:50 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::5907:1035:4f58:aa70] (unknown [IPv6:2001:7b8:3a7:0:5907:1035:4f58:aa70]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E0A395C44; Sat, 31 Aug 2013 16:42:47 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r325668 - head/x11-toolkits/open-motif From: Dimitry Andric In-Reply-To: <5221FD7C.1040501@FreeBSD.org> Date: Sat, 31 Aug 2013 16:42:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <2EBE9400-E1EF-4F3D-9C63-8454DA05ED90@FreeBSD.org> References: <201308300952.r7U9qKsF026518@svn.freebsd.org> <52206DF8.1000401@FreeBSD.org> <5221CEB4.7090109@passap.ru> <5221FD7C.1040501@FreeBSD.org> To: Guido Falsi X-Mailer: Apple Mail (2.1508) Cc: Baptiste Daroussin , Boris Samorodov , Peter Wemm , FreeBSD ports list X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 14:42:50 -0000 On Aug 31, 2013, at 16:28, Guido Falsi wrote: > On 08/31/13 15:38, Dimitry Andric wrote: ... >> Yes, the basic problem is that programs do "#include ", = which >> pulls in /usr/local/include/iconv.h (the GNU version) instead of >> /usr/include/iconv.h (the base version). The GNU version redefines = all >> the iconv-related functions to point to the GNU implementations. >> However, most configure scripts fail to detect that the linker flags >> should then be modified to add -L/usr/local/lib -liconv. >>=20 >> I don't know of a good way to force ports to ignore the GNU version = of >> iconv.h, and use the base iconv.h instead. Maybe we should rename = the >> GNU version to gnuiconv.h, and use some sort of wrapper header to = make >> sure ports only get the GNU version when they really want or need it. ... > I have spent a few hours experimenting and produced this PR: >=20 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/181693 >=20 > The fixes themselves are trivial and for the subset of ports I have = tested it seems to work fine. I have asked for an exp-run since I don't = have the horsepower to properly test all the ports tree in an acceptable = time frame. >=20 > Most of the problematic ports seem not to work because of our patches = in the ports tree forcing them to look in /usr/local/ for iiconv, while = the software itself would prefer to use the system iconv implementation = if left to it's own devices. >=20 > My patch there is a little messy perhaps, since I had to make all the = Makefile changes conditional to the OS version. I'm quite sure cleaner = patches can be worked out, but I wanted to set some starting point. >=20 > I hope my work on this to be useful, and will try to improve it. I'm = quite open to suggestions and improvements. Thats why I decided to send = this email. I don't think your approach will work correctly. For every port, you basically add: +.if !exists(/usr/include/iconv.h) && ${OSVERSION} < 1000043 LIB_DEPENDS+=3D libiconv.so.3:${PORTSDIR}/converters/libiconv +.endif However, if someone has the libiconv port installed through some other means, almost any iconv-using port will still find the GNU iconv.h header before the base iconv.h header, so the problem of linking against the base iconv implementation is not solved. I suspect that the only robust way of solving this is with a wrapper header in /usr/local/include. Or by entirely banning GNU iconv. ;-) -Dimitry