From owner-freebsd-questions@FreeBSD.ORG Wed Nov 21 03:41:45 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2BC716A418 for ; Wed, 21 Nov 2007 03:41:45 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by mx1.freebsd.org (Postfix) with ESMTP id 8885C13C442 for ; Wed, 21 Nov 2007 03:41:45 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: (qmail 28773 invoked from network); 21 Nov 2007 03:41:44 -0000 Received: from april.chuckr.org (chuckr@[66.92.151.30]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 21 Nov 2007 03:41:44 -0000 Message-ID: <4743A8BF.3070802@chuckr.org> Date: Tue, 20 Nov 2007 22:40:47 -0500 From: Chuck Robey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.9) Gecko/20071107 SeaMonkey/1.1.6 MIME-Version: 1.0 To: stevefranks@ieee.org References: <539c60b90711201434s361ec72co898fad601f35535a@mail.gmail.com> <20071120231601.GB1161@slackbox.xs4all.nl> <539c60b90711201612o5c8cfc99ma53829b181959e15@mail.gmail.com> In-Reply-To: <539c60b90711201612o5c8cfc99ma53829b181959e15@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rsmith@xs4all.nl, User Questions Subject: Re: arbitrary build can't find libs - right way to do this? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2007 03:41:45 -0000 Steve Franks wrote: > On Nov 20, 2007 4:16 PM, Roland Smith wrote: >> On Tue, Nov 20, 2007 at 03:34:29PM -0700, Steve Franks wrote: >>> I'm trying to compile a non-port application for the first time ever. >>> The associated library built and installed just fine - I can see them >>> right in /usr/local/lib and usr/local/include/libnamefoo.h However, >>> when I run ./configure for the application, it clearly can't find the >>> libs. So my question is, should I be changing my path, is there a >>> standard variable I need to export, or what? Obviously for ports this >>> just works, so I've never had to do it. I'm sure there's a standard >>> way, so I thought I'd get in the habit of doing that right from the >>> start... >> The best way would be to write a port makefile and submit it. That way >> you only have to figure it out once. Especially if the app needs patches >> to work correctly on FreeBSD. And in case of a free software app, others >> can use it as well, _and_ help you with bugfixing. :-) For closed source >> stuff submitting a port would probably be useless. > > I'd love to (submit a port), but how do I make a port if I can't even > get it to work the first time myself? > configure --includedir=/usr/local/include doesn't work; > export CPATH =/usr/local/include doesn't work; > export CPPFLAGS -l/usr/local/include doesn't work; > I've checked the permissions, > and I can see the file right there, but configure/gcc can't. The > developer swears something must be 'different' about freebsd because > his gcc finds the same file in /usr/local/include. Appears his system > is gentoo You don't givec me really enoough for me to go on, but I think really you need to know about 3 options to gcc (at least one of which you should be using, but you aren't) -v = means for gcc (which is really a smallish driver program for the real compiler) to show all of the subprograms that it kicks off, including all of the parameters it uses, and specifically for you, it shows the entire lib and include file search path it knows aboout. You aren't using this, so far as I can see. The other two are options to add to the default search path. Above, it seems like you are using -l to add an include file path, this is wrong, you should use -I, -l is to specify specific libraries to link in, not a path to search for the libs in. To add a library search path, you use -L. ... > > Steve > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"