gcc46 header search path

Andriy Gapon avg at FreeBSD.org
Sat Jul 7 08:27:56 UTC 2012


on 07/07/2012 11:20 David Chisnall said the following:
> On 6 Jul 2012, at 23:29, Andriy Gapon wrote:
> 
>> I think that this is a dummy argument.  One could easily want his LOCALBASE to
>> be /opt and the real ports system should support that.  So what ports currently
>> do, they really have to do (assuming $LOCALBASE as opposed to /usr/local).
> 
> That's completely irrelevant.  If a user installs things in a non-standard location, then that user should expect to have to point things that they build from source at that non-standard location.  If, however, a user installs things in the standard location, then this should Just Work.  
> 
> The workflow that I have seen where this fails:
> 
> - User runs ./configure
> - Configure script says 'libpng is not installed!'
> - User installs libpng from ports / packages
> - User runs ./configure
> - Configure script says 'libpng is not installed!'
> - User sends me an email asking why they can't install on FreeBSD, usually including a small whine that this works on their favourite Linux distro.
> - I tell the user 'Oh, you need to say --with-png-include=/usr/local/include --with-png-lib=/usr/local/lib'
> - User says 'Why doesn't the compiler that FreeBSD ships know where to find headers and libraries that FreeBSD installs?'
> - I shrug.

So we talked about different things: creating/maintaining ports vs manually
building software outside of port system.

> I assumed this was done for a sensible reason, but so far no one has actually said what that reason is.  In an ideal world, the system compiler should be able to automatically find any headers and libraries installed by any supported mechanism (ports, pkg_add, pkg add), but in an almost-ideal world it should at least find them if they are in the default locations.

I agree.

-- 
Andriy Gapon




More information about the freebsd-toolchain mailing list