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

Max Brazhnikov makc at issp.ac.ru
Mon May 18 22:46:32 CEST 2009


On Mon, 18 May 2009 15:53:18 -0300, Raphael Kubo da Costa wrote:
> 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?
Often /usr/local/ is included already via Ports framework and/or configure 
tools. As for building Qt4/KDE4 you should be sure to include /usr/local/ 
after all other paths.

> And is the recommended way to compile trunk (to $HOME/kde4, for
> example) to export LIBRARY_PATH and CPLUS_INCLUDE_PATH?
Of course, when there is no qt3/kde3 installed, it is safe to add /usr/local 
to lib/include paths. Alternatively, cmake modules can be fixed to search in 
/usr/local as well.

Max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-freebsd/attachments/20090519/489784a8/attachment.sig 


More information about the kde-freebsd mailing list