From owner-freebsd-ports@FreeBSD.ORG Fri Feb 14 08:56:11 2014 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 ESMTPS id 4ADA2BB5 for ; Fri, 14 Feb 2014 08:56:11 +0000 (UTC) Received: from mailrelay012.isp.belgacom.be (mailrelay012.isp.belgacom.be [195.238.6.179]) by mx1.freebsd.org (Postfix) with ESMTP id DBBEE1E9A for ; Fri, 14 Feb 2014 08:56:10 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlQGAL/Z/VJbsJEl/2dsb2JhbABZgwa9O4MGgRUXdIIlAQEFOhwjEAsYCSUPKh4GiBwByHAXjnkHhDgEmCuSJIMuOw Received: from 37.145-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.145.37]) by relay.skynet.be with ESMTP; 14 Feb 2014 09:56:01 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id s1E8u0JX001489; Fri, 14 Feb 2014 09:56:00 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Fri, 14 Feb 2014 09:55:59 +0100 From: Tijl Coosemans To: Rodrigo OSORIO Subject: Re: configure fail in a test performed with -liconv Message-ID: <20140214095559.2a03fdb0@kalimero.tijl.coosemans.org> In-Reply-To: <52FD3A82.5080405@bebik.net> References: <52FD2D16.1000407@bebik.net> <52FD3A82.5080405@bebik.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 08:56:11 -0000 On Thu, 13 Feb 2014 22:34:58 +0100 Rodrigo OSORIO wrote: > On 02/13/14 21:37, Rodrigo OSORIO wrote: >> I'm dealing with an issue in irc/scrollz port. The configure >> script fail and return a "getaddrinfo bug" caused by a failure when >> it compiles the conftest binary. >> >> In fact, conftest is compiled with the -liconv flag, but ld can't >> found it. >> >> Here is the command executed to compile the code >> >> cc -o conftest -O2 -pipe -fno-strict-aliasing -I/usr/local/include >> -I/usr/local/include -Wl,-rpath=/usr/lib:/usr/local/lib >> -Wl,-rpath=/usr/lib:/usr/local/lib conftest.c -lcrypt >> -L/usr/local/lib -L/usr/local/lib -liconv >> >> And the error >> >> /usr/bin/ld: cannot find -liconv cc: error: linker command failed >> with exit code 1 (use -v to see invocation) >> >> Iconv isn't required in any way by the application, but the flag >> is managed by the --enable-utf8 flag, if I call configure disabling >> utf8 support (--disable-utf8) config finish its work without >> error. >> >> Any idea or suggestion? > > After few tests and as an alternative, this code taken from the proter > handbook and modifies a little, does the job pretty well (I hope) > > post-patch: > .if empty(ICONV_LIB) > # native iconv detected > @${REINPLACE_CMD} -e 's|-liconv||' ${WRKSRC}/configure > .endif > > Does it make sense for any of you ? Try this instead: post-patch: @${REINPLACE_CMD} -e 's|-liconv|${ICONV_LIB}|' ${WRKSRC}/configure