[kde-freebsd] gcc's CPLUS_INCLUDE_PATH and LIBRARY_PATH when compiling trunk

Raphael Kubo da Costa kubito at gmail.com
Mon May 18 20:53:18 CEST 2009


2009/5/18 Max Brazhnikov <makc at issp.ac.ru>:
> On Mon, 18 May 2009 11:29:28 -0300, Raphael Kubo da Costa wrote:
>> Hello,
>>
>> When trying to compile trunk with kdesvn-build I often got build
>> errors because some files needed headers from /usr/local/include (such
>> as GL/gl.h and others), but didn't explicitly include
>> /usr/local/include with -I during compilation. I had to export
>> LIBRARY_PATH and CPLUS_INCLUDE_PATH for it to work.
>>
>> Is this the default behaviour of gcc in FreeBSD? Shouldn't headers in
>> /usr/local/include (and libraries from /usr/local/lib) be included
>> automatically?
>
> Yes, this is by default. /usr/local is intended for third-party apps and
> FreeBSD ports framework use it also as default prefix (however this can be
> redefined by user). Having /usr/local/(include|libs) automatically in flags
> might do more harm than profit, e.g. currently qt3/kde3 stuff is installed to
> /usr/local/ so we're forced to install kde4 into different prefix to avoid
> conflicts.
Thanks for the response. When you're writing a port don't you often
need /usr/local/{include,lib}? Don't you end up having path conflicts
then?

And is the recommended way to compile trunk (to $HOME/kde4, for
example) to export LIBRARY_PATH and CPLUS_INCLUDE_PATH?


More information about the kde-freebsd mailing list