From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 20:21:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B34B71065678 for ; Fri, 31 Oct 2008 20:21:47 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 501118FC08 for ; Fri, 31 Oct 2008 20:21:47 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id m9VKLjLB001424; Fri, 31 Oct 2008 16:21:46 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Fri, 31 Oct 2008 16:21:46 -0400 (EDT) Date: Fri, 31 Oct 2008 16:21:45 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Nate Eldredge In-Reply-To: Message-ID: References: <539c60b90810311123w2aa94b8akcd0a5d0fe791885a@mail.gmail.com> <539c60b90810311230i11460966la7ff35b0093642ec@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers , Steve Franks Subject: Re: includes, configure, /usr/lib vs. /usr/local/lib, and linux coders X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 20:21:47 -0000 On Fri, 31 Oct 2008, Nate Eldredge wrote: > On Fri, 31 Oct 2008, Steve Franks wrote: > >> Let's backup. What's the 'right' way to get a bloody linux program >> that expects all it's headers in /usr/include to compile on freebsd >> where all the headers are in /usr/local/include? That's all I'm >> really asking. Specifically, it's looking for libusb & libftdi. If I >> just type gmake, it can't find it, but if I manually edit the >> Makefiles to add -I/usr/local/include, it can. Obviously, manually >> editing the makefiles is *not* the right way to fix it (plus it's >> driving me crazy). > > C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include > LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib > export C_INCLUDE_PATH LIBRARY_PATH > ./configure > gmake > > Adjust as appropriate if using csh. > > Personally, I set those environment variables in my .profile. > > By the way, I think you're being a little unfair to blame this on Linux > programs or programmers. Normally it's the user's responsibility to ensure > that their compiler searches for include files, etc, in the appropriate > place. Many Linux distributions put everything in /usr/include, which is > searched by default. FreeBSD puts stuff from ports in /usr/local/include > which isn't searched by default. I find that behavior inconvenient, which is > why I set those environment variables, so I don't have to think about it. I don't really care who's to blame (I'd guess I'd blame both the Linux distros and the Linux application developers), but the move to put everything in /usr/include and /usr/lib annoys the heck out of me. It blurs the line between the base OS and installed 3rd party software. Perhaps that's because Linux is really just a kernel, and to the distributors - most, if not all, of their software is 3rd-party. It's really nice to be able to install 3rd-party software so that it doesn't affect the base OS. On FreeBSD, it's easy enough just to 'rm -rf /usr/local' and start fresh without having to worry about screwing up the base OS. -- DE