[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request: Attica will not be found if installed under
From:       "Guy Maurel" <guy-kde () maurel ! de>
Date:       2010-09-22 12:00:51
Message-ID: 20100922120051.13128.18657 () vidsolbach ! de
[Download RAW message or body]

> On 2010-09-17 18:52:17, Alexander Neundorf wrote:
> > /usr/local is part of the default search directories, so it should be f=
ound 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
> =

> Guy Maurel wrote:
>     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 envir=
onment variable. "
>     It is what I need, but nothing about a default value for CMAKE_LIBRAR=
Y_PATH and CMAKE_INCLUDE_PATH
>     Is it something the user *has* to do itself before running?
> =

> Guy Maurel wrote:
>     Thanks to Alex for the discussion and your questions/helps.
>     =

>     The CMAKE_INCLUDE_PATH give the order to search for:
>     *First* at /usr/local
>     *then*  at /usr
>     This is done (I think) to give a priority to the packages one have se=
lf installed. =

>     =

>     At the FindLibAttica.cmake (and other more) there is some lines of co=
de such:
>     IF (NOT WIN32)
>        # use pkg-config to get the directories and then use these values
>        # in the FIND_PATH() and FIND_LIBRARY() calls
>        FIND_PACKAGE(PkgConfig)
>        PKG_CHECK_MODULES(PC_LIBATTICA QUIET libattica)
>        SET(LIBATTICA_DEFINITIONS ${PC_ATTICA_CFLAGS_OTHER})
>     ENDIF (NOT WIN32)
>     =

>     I am using ArchLinux and the pacman-command installs (implicitly) som=
e packages I havn't take care.
>     One of them was "attica", installed at /usr . The search order is cha=
nged.
>     The cmake works correctly with FindLibAttica.cmake and told me: /usr/=
include .
>     =

>     *NOW* I would like to ask: What is the reason/strategy of changing th=
e search order in this way?
>     =

>     *MY* problem is now solved.
>     Thanks

I got the "problem" because I don't anderstand the message, generate bei cc=
make:
"* libattica (0.1.90 or higher)..."

I propose to do the same way as FindPolkitQt-1.cmake to improve the message=
 with a warning such as:
"WARNING: LibAttica version 0.1.4 found at /usr/include is too old. Please =
install 0.1.90 or newer."
this way:
--- FindLibAttica.cmake (revision 1175580)
+++ FindLibAttica.cmake (working copy)
@@ -37,6 +37,7 @@
     STRING(REGEX REPLACE "LIBATTICA_VERSION_STRING \"(.*)\"\n" "\\1" LIBAT=
TICA_VERSION ${LIBATTICA_VERSION_MATCH})
     IF(LIBATTICA_VERSION STRLESS "${LIBATTICA_MIN_VERSION}")
       SET(LIBATTICA_VERSION_OK FALSE)
+      MESSAGE("WARNING: LibAttica version ${LIBATTICA_VERSION} found at ${=
LIBATTICA_INCLUDE_DIR} is too old. Please install ${LIBATTICA_MIN_VERSION} =
or newer.")
       IF(LibAttica_FIND_REQUIRED)
         MESSAGE(FATAL_ERROR "LibAttica version ${LIBATTICA_VERSION} is too=
 old. Please install ${LIBATTICA_MIN_VERSION} or newer.")
       ELSE(LibAttica_FIND_REQUIRED)

So I could have quickly seen where the problem is coming from.


- Guy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5375/#review7673
-----------------------------------------------------------


On 2010-09-17 18:08:15, Guy Maurel wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5375/
> -----------------------------------------------------------
> =

> (Updated 2010-09-17 18:08:15)
> =

> =

> Review request for kdelibs.
> =

> =

> Summary
> -------
> =

> Some of the cmake/modules/Findxxx.cmake files have extended the search to=
 the directory INCLUDE_INSTALL_DIR
> It is usefull to find the version on had installed just before. Many defa=
ult installations are /usr/local/
> =

> My proposal is to do the same with Attica.
> =

> =

> Diffs
> -----
> =

>   /trunk/KDE/kdelibs/cmake/modules/FindLibAttica.cmake 1175716 =

> =

> Diff: http://svn.reviewboard.kde.org/r/5375/diff
> =

> =

> Testing
> -------
> =

> =

> Thanks,
> =

> Guy
> =

>


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://svn.reviewboard.kde.org/r/5375/">http://svn.reviewboard.kde.org/r/5375/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On September 17th, 2010, 6:52 p.m., <b>Alexander \
Neundorf</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">/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</pre>
 </blockquote>




 <p>On September 19th, 2010, 5:08 p.m., <b>Guy Maurel</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">mmmh! I found at \
http://www.kitware.com/news/home/browse/168: &quot;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. &quot; 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?</pre>  </blockquote>





 <p>On September 21st, 2010, 5:38 p.m., <b>Guy Maurel</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Thanks to Alex for the \
discussion and your questions/helps.

The CMAKE_INCLUDE_PATH give the order to search for:
*First* at /usr/local
*then*  at /usr
This is done (I think) to give a priority to the packages one have self installed. 

At the FindLibAttica.cmake (and other more) there is some lines of code such:
IF (NOT WIN32)
   # use pkg-config to get the directories and then use these values
   # in the FIND_PATH() and FIND_LIBRARY() calls
   FIND_PACKAGE(PkgConfig)
   PKG_CHECK_MODULES(PC_LIBATTICA QUIET libattica)
   SET(LIBATTICA_DEFINITIONS ${PC_ATTICA_CFLAGS_OTHER})
ENDIF (NOT WIN32)

I am using ArchLinux and the pacman-command installs (implicitly) some packages I \
havn&#39;t take care. One of them was &quot;attica&quot;, installed at /usr . The \
search order is changed. The cmake works correctly with FindLibAttica.cmake and told \
me: /usr/include .

*NOW* I would like to ask: What is the reason/strategy of changing the search order \
in this way?

*MY* problem is now solved.
Thanks</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I got the \
&quot;problem&quot; because I don&#39;t anderstand the message, generate bei ccmake: \
&quot;* libattica (0.1.90 or higher)...&quot;

I propose to do the same way as FindPolkitQt-1.cmake to improve the message with a \
warning such as: &quot;WARNING: LibAttica version 0.1.4 found at /usr/include is too \
old. Please install 0.1.90 or newer.&quot; this way:
--- FindLibAttica.cmake (revision 1175580)
+++ FindLibAttica.cmake (working copy)
@@ -37,6 +37,7 @@
     STRING(REGEX REPLACE &quot;LIBATTICA_VERSION_STRING \&quot;(.*)\&quot;\n&quot; \
&quot;\\1&quot; LIBATTICA_VERSION ${LIBATTICA_VERSION_MATCH})  IF(LIBATTICA_VERSION \
STRLESS &quot;${LIBATTICA_MIN_VERSION}&quot;)  SET(LIBATTICA_VERSION_OK FALSE)
+      MESSAGE(&quot;WARNING: LibAttica version ${LIBATTICA_VERSION} found at \
${LIBATTICA_INCLUDE_DIR} is too old. Please install ${LIBATTICA_MIN_VERSION} or \
newer.&quot;)  IF(LibAttica_FIND_REQUIRED)
         MESSAGE(FATAL_ERROR &quot;LibAttica version ${LIBATTICA_VERSION} is too old. \
Please install ${LIBATTICA_MIN_VERSION} or newer.&quot;)  \
ELSE(LibAttica_FIND_REQUIRED)

So I could have quickly seen where the problem is coming from.</pre>
<br />








<p>- Guy</p>


<br />
<p>On September 17th, 2010, 6:08 p.m., Guy Maurel wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kdelibs.</div>
<div>By Guy Maurel.</div>


<p style="color: grey;"><i>Updated 2010-09-17 18:08:15</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Some of the cmake/modules/Findxxx.cmake files have extended the search \
to the directory INCLUDE_INSTALL_DIR It is usefull to find the version on had \
installed just before. Many default installations are /usr/local/

My proposal is to do the same with Attica.</pre>
  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/KDE/kdelibs/cmake/modules/FindLibAttica.cmake <span style="color: \
grey">(1175716)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/5375/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic