Review Request: Attica will not be found if installed under /usr/local/

Alexander Neundorf neundorf at kde.org
Mon Sep 20 20:33:43 BST 2010


On Monday 20 September 2010, Guy Maurel wrote:
> Hello!
>
> Thanks for the answer from Alexander and Andreas!
>
> On Sunday 19 September 2010 20:09:23 you wrote:
> > Reviewboard currently doesn't respond...
>
> right. Thank for writting this way...
>
> > On Sunday 19 September 2010, Guy Maurel wrote:
> > > > On 2010-09-17 18:52:17, Alexander Neundorf wrote:
> > > > > /usr/local is part of the default search directories, so it should
> > > > > be found if installed there. I just tested this here locally and it
> > > > > works for me.
> > > > >
> > > > > If it is not found when installed in /usr/local/, then we have to
> > > > > check what is going wrong there.
> > > > >
> > > > > Alex
> > >
> > > mmmh!
> > > I found at http://www.kitware.com/news/home/browse/168:
> > > "FIND_LIBRARY and FIND_PATH now look in CMAKE_LIBRARY_PATH and
> > > CMAKE_INCLUDE_PATH environment variables in addition to and before the
> > > PATH environment variable. "
> >
> > This is really old news, from 2004 as you can see.
>
> right, but is still part of the cmake software...
>
> > > It is what I need, but nothing about a default
> > > value for CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH Is it something the
> > > user *has* to do itself before running?
> >
> > The cmake manpage describes the order in which directories are searched:
> > "
> > find_library()
>
> the third part is also very important:
> == 3. Search the paths specified by the HINTS option. These should be paths
> == computed by system introspection, such as a hint provided by the
> location == of another item already found. Hard-coded guesses should be
> specified with == the PATHS option.
> Does it mean:
> a) ONLY the directories described with HINTS will be search
> b) these directories will be search before "somewhere else"
>
> if b, how is the content of "somewhere else" defined?

Option b) is it.
See Modules/Platform/Linux.cmake, which includes 
Modules/Platform/UnixPath.cmake

> I commented out the line HINT and the next two lines.
> It works pretty well and the /usr/local/include is found.
>
> > It doesn't mention the contents of CMAKE_SYSTEM_LIBRARY_PATH, since these
> > are different depending on the platform. For the UNIX-like operating
> > systems they are set in cmake/Modules/Platforms/UnixPaths.cmake.
> > /usr/local/lib is part of them.
>
> why not with me?
>
> > Which problem exactly do you have ?
>
> I use ArchLinux-64.
> I have compiled Attica and installed it at the default /usr/local
> It isn't found with my actual configuration.
> I try to anderstand why not!
>
> > If something is in /usr/local, it should be found.
>
> right, it should but it doesn't work by me.


Have a look at your cmake/Modules/Platform/UnixPaths.cmake.
It should have the following lines:

# List common installation prefixes.  These will be used for all
# search types.
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
  # Standard
  /usr/local /usr /



To make sure, you can print the values of CMAKE_SYSTEM_PREFIX_PATH and 
CMAKE_SYSTEM_LIBRARY_PATH in the CMakeLists.txt of your application, to see 
what they contain.

Alex




More information about the kde-core-devel mailing list