[CMake] Issues with finding raptor in the soprano build
Hi, I am now having issues with finding the raptor software for the build of the soprano project on Harmattan (N9 OS and distribution). It works on desktop and in scratchbox. It does not work in qemu though. It looks weird because redland was found properly, and the those find_package lines are residing after each other: http://quickgit.kde.org/?p=soprano.git&a=blob&h=61aa37db11b2091f4d9dbb822bbe8eecf56e543e&hb=1f6789719c53d964e2c8e705330e043dc04f2806&f=CMakeLists.txt#143 You can find the FindRaptor.cmake module here: http://quickgit.kde.org/?p=soprano.git&a=blob&h=c5043c8bef5306d847dae3bc511d18b2230ee453&hb=1f6789719c53d964e2c8e705330e043dc04f2806&f=cmake/modules/FindRaptor.cmake I think this is a bit closer to the issue: -- [TEST-BEGIN] - FIND_PACKAGE RAPTOR2.0.4 -- VERSION_VAR (missing: REQUIRED_VARS) -- [TEST-END] - FIND_PACKAGE RAPTOR2.0.4 for this debugging lines in the CMakeLists.txt file: message(STATUS "[TEST-BEGIN] - FIND_PACKAGE RAPTOR2.0.4") find_package(Raptor 2.0.4) message(STATUS "[TEST-END] - FIND_PACKAGE RAPTOR2.0.4") Also: I debugged it further on, and it enters this if condition, too: http://quickgit.kde.org/?p=soprano.git&a=blob&h=c5043c8bef5306d847dae3bc511d18b2230ee453&hb=1f6789719c53d964e2c8e705330e043dc04f2806&f=cmake/modules/FindRaptor.cmake#154 Also: I have this file on my system: /usr/include/raptor2/raptor.h (That is the one the FindRaptor.cmake module is looking for iirc). Thank you in advance! I am now really stuck here. Best Regards, Laszlo Papp -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
I have tried to grab more debug outputs, and here are my relevant printouts: statusPC_RAPTOR2_LIBDIR: /usr/lib statusPC_RAPTOR2_LIBRARY_DIRS: statusPC_RAPTOR2_INCLUDEDIR: /usr/include/raptor2 statusPC_RAPTOR2_INCLUDE_DIRS: /usr/include/raptor2 It seems okay to me, thus I am now even more lost.. :) Best Regards, Laszlo Papp -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
On 15.11.11 21:30:45, Laszlo Papp wrote: > I have tried to grab more debug outputs, and here are my relevant printouts: > > statusPC_RAPTOR2_LIBDIR: /usr/lib > statusPC_RAPTOR2_LIBRARY_DIRS: > statusPC_RAPTOR2_INCLUDEDIR: /usr/include/raptor2 > statusPC_RAPTOR2_INCLUDE_DIRS: /usr/include/raptor2 > > It seems okay to me, thus I am now even more lost.. :) The interesting part is wether RAPTOR_LIBRARIES and RAPTOR_INCLUDE_DIR are set properly. If not then the find_library and find_path commands are not finding your lib and header. You could try with cmake --trace and cmake --debug-output to get more detailed information from the search fo the lib and header. Another question is: What version does your installed raptor have and what does soprano require in its CMake files? Andreas -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
-- RAPTOR_LIBRARIES: /usr/lib/libraptor2.so -- RAPTOR_INCLUDE_DIR: /usr/include/raptor2 and root@Kaname:/usr/src/packages/BUILD/Build# dpkg -S /usr/lib/libraptor2.so libraptor2-dev: /usr/lib/libraptor2.so root@Kaname:/usr/src/packages/BUILD/Build# dpkg -S /usr/include/raptor2/raptor.h libraptor2-dev: /usr/include/raptor2/raptor.h root@Kaname:/usr/src/packages/BUILD/Build# dpkg -s libraptor2-dev | grep Version Version: 2.0.4-1 root@Kaname:/usr/src/packages/BUILD/Build# grep find_package ../CMakeLists.txt | grep Raptor find_package(Raptor 2.0.4) root@Kaname:/usr/src/packages/BUILD/Build# Best Regards, Laszlo Papp -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
On 16.11.11 09:46:08, Laszlo Papp wrote: > -- RAPTOR_LIBRARIES: /usr/lib/libraptor2.so > -- RAPTOR_INCLUDE_DIR: /usr/include/raptor2 Ok, and since you didn't post that yet, what the exact error message from cmake that you get and where is it generated? Andreas -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
I mentioned this in my first email: I think this is a bit closer to the issue: -- [TEST-BEGIN] - FIND_PACKAGE RAPTOR2.0.4 -- VERSION_VAR (missing: REQUIRED_VARS) -- [TEST-END] - FIND_PACKAGE RAPTOR2.0.4 for this debugging lines in the CMakeLists.txt file: message(STATUS "[TEST-BEGIN] - FIND_PACKAGE RAPTOR2.0.4") find_package(Raptor 2.0.4) message(STATUS "[TEST-END] - FIND_PACKAGE RAPTOR2.0.4") "find_package(Raptor 2.0.4)" should not generate "-- VERSION_VAR (missing: REQUIRED_VARS)" output. It should be like this: -- Found Raptor: /usr/lib/libraptor2.so (found suitable version "2.0.4", required is "2.0.4") Best Regards, Laszlo Papp -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
On 11/16/2011 09:13 AM, Laszlo Papp wrote: > I mentioned this in my first email: > > I think this is a bit closer to the issue: > -- [TEST-BEGIN] - FIND_PACKAGE RAPTOR2.0.4 > -- VERSION_VAR (missing: REQUIRED_VARS) > -- [TEST-END] - FIND_PACKAGE RAPTOR2.0.4 > > for this debugging lines in the CMakeLists.txt file: > message(STATUS "[TEST-BEGIN] - FIND_PACKAGE RAPTOR2.0.4") > find_package(Raptor 2.0.4) > message(STATUS "[TEST-END] - FIND_PACKAGE RAPTOR2.0.4") > > "find_package(Raptor 2.0.4)" should not generate "-- VERSION_VAR > (missing: REQUIRED_VARS)" output. > > It should be like this: > -- Found Raptor: /usr/lib/libraptor2.so (found suitable version > "2.0.4", required is "2.0.4") > > Best Regards, > Laszlo Papp What version of CMake are you using? The extended signature of find_package_handle_standard_args() you use in FindRaptor.cmake became only available in CMake 2.8.4. HTH Michael -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
> What version of CMake are you using? The extended signature of > find_package_handle_standard_args() you use in FindRaptor.cmake became > only available in CMake 2.8.4. Sadly 2.8.2 is the available version: http://harmattan-dev.nokia.com/pool/harmattan-beta3/free/c/cmake/ I was claiming a lot internally we should update it on Harmattan, but I have not found anybody really supporting this idea. :/ What would be the workaround for our environment ? Patch the FindRaptor.cmake file ? If yes, can someone give a hint, how ? Best Regards, Laszlo Papp -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
On 11/16/2011 09:35 AM, Laszlo Papp wrote: >> What version of CMake are you using? The extended signature of >> find_package_handle_standard_args() you use in FindRaptor.cmake became >> only available in CMake 2.8.4. > > Sadly 2.8.2 is the available version: > http://harmattan-dev.nokia.com/pool/harmattan-beta3/free/c/cmake/ > > I was claiming a lot internally we should update it on Harmattan, but > I have not found anybody really supporting this idea. :/ > > What would be the workaround for our environment ? Patch the > FindRaptor.cmake file ? If yes, can someone give a hint, how ? > > Best Regards, > Laszlo Papp You could handle version detection manually. Something like this should do: set(RAPTOR_VERSION_IS_OK TRUE) if(Raptor_FIND_VERSION) if(Raptor_FIND_VERSION_EXACT AND NOT ${RAPTOR_VERSION} VERSION_EQUAL ${Raptor_FIND_VERSION}) set(RAPTOR_VERSION_IS_OK FALSE) elseif(${RAPTOR_VERSION} VERSION_LESS ${Raptor_FIND_VERSION}) set(RAPTOR_VERSION_IS_OK FALSE) endif() endif() And then use RAPTOR_VERSION_IS_OK in the find_package_handle_standard_args() call. Michael -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
The soprano author seems to keep a local copy of that macro: https://projects.kde.org/projects/kdesupport/soprano/repository/revisions/master/entry/cmake/modules/FindPackageHandleStandardArgs.cmake It is probably outdated since "vimdiff /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake ../cmake/modules/FindPackageHandleStandardArgs.cmake" gives a lot of differences. Would it be possible to just update that file from upstream cmake, and be done ? What is the general approach suggested for developers to invoke cmake in such situations where it needs to run with old and new cmake versions, too ? 1. Using the compatible old version everywhere, if possible ? 2. Keep local copies of such modules 3. Something else ? Best Regards, Laszlo Papp On Wed, Nov 16, 2011 at 11:39 AM, Michael Wild wrote: > On 11/16/2011 09:35 AM, Laszlo Papp wrote: >>> What version of CMake are you using? The extended signature of >>> find_package_handle_standard_args() you use in FindRaptor.cmake became >>> only available in CMake 2.8.4. >> >> Sadly 2.8.2 is the available version: >> http://harmattan-dev.nokia.com/pool/harmattan-beta3/free/c/cmake/ >> >> I was claiming a lot internally we should update it on Harmattan, but >> I have not found anybody really supporting this idea. :/ >> >> What would be the workaround for our environment ? Patch the >> FindRaptor.cmake file ? If yes, can someone give a hint, how ? >> >> Best Regards, >> Laszlo Papp > > You could handle version detection manually. Something like this should do: > > set(RAPTOR_VERSION_IS_OK TRUE) > if(Raptor_FIND_VERSION) > if(Raptor_FIND_VERSION_EXACT AND > NOT ${RAPTOR_VERSION} VERSION_EQUAL ${Raptor_FIND_VERSION}) > set(RAPTOR_VERSION_IS_OK FALSE) > elseif(${RAPTOR_VERSION} VERSION_LESS ${Raptor_FIND_VERSION}) > set(RAPTOR_VERSION_IS_OK FALSE) > endif() > endif() > > And then use RAPTOR_VERSION_IS_OK in the > find_package_handle_standard_args() call. > > Michael > -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
Alex recently also asked something to this effect on the list... IMHO it would be best to copy the module verbatim and then in the copy do something like this at the very top: if(EXISTS ${CMAKE_ROOT}/Modules/Foo.cmake) include(${CMAKE_ROOT}/Modules/Foo.cmake) else() ... endif() Either put the whole contents of the copy into the else() part of the conditional (compatible with very old versions of CMake), or alternatively remove the whole else() branch and call return() after the include() call. But then again, return() requires CMake 2.6.2 in this context, so, depending on your needs, either choose the ugly else() approach, or use return(). Using this scheme you only use your local copy if CMake doesn't provide it. Of course, you can be more elaborate if you know certain versions of the CMake-provided file to be buggy, and discriminate based on the CMAKE_VERSION variable. HTH Michael On 11/16/2011 12:42 PM, Laszlo Papp wrote: > The soprano author seems to keep a local copy of that macro: > https://projects.kde.org/projects/kdesupport/soprano/repository/revisions/master/entry/cmake/modules/FindPackageHandleStandardArgs.cmake > > It is probably outdated since "vimdiff > /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake > ../cmake/modules/FindPackageHandleStandardArgs.cmake" gives a lot of > differences. > > Would it be possible to just update that file from upstream cmake, and > be done ? What is the general approach suggested for developers to > invoke cmake in such situations where it needs to run with old and new > cmake versions, too ? > > 1. Using the compatible old version everywhere, if possible ? > 2. Keep local copies of such modules > 3. Something else ? > > Best Regards, > Laszlo Papp > > On Wed, Nov 16, 2011 at 11:39 AM, Michael Wild wrote: >> On 11/16/2011 09:35 AM, Laszlo Papp wrote: What version of CMake are you using? The extended signature of find_package_handle_standard_args() you use in FindRaptor.cmake became only available in CMake 2.8.4. >>> >>> Sadly 2.8.2 is the available version: >>> http://harmattan-dev.nokia.com/pool/harmattan-beta3/free/c/cmake/ >>> >>> I was claiming a lot internally we should update it on Harmattan, but >>> I have not found anybody really supporting this idea. :/ >>> >>> What would be the workaround for our environment ? Patch the >>> FindRaptor.cmake file ? If yes, can someone give a hint, how ? >>> >>> Best Regards, >>> Laszlo Papp >> >> You could handle version detection manually. Something like this should do: >> >> set(RAPTOR_VERSION_IS_OK TRUE) >> if(Raptor_FIND_VERSION) >> if(Raptor_FIND_VERSION_EXACT AND >> NOT ${RAPTOR_VERSION} VERSION_EQUAL ${Raptor_FIND_VERSION}) >>set(RAPTOR_VERSION_IS_OK FALSE) >> elseif(${RAPTOR_VERSION} VERSION_LESS ${Raptor_FIND_VERSION}) >>set(RAPTOR_VERSION_IS_OK FALSE) >> endif() >> endif() >> >> And then use RAPTOR_VERSION_IS_OK in the >> find_package_handle_standard_args() call. >> >> Michael >> -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Issues with finding raptor in the soprano build
> if(EXISTS ${CMAKE_ROOT}/Modules/Foo.cmake) > include(${CMAKE_ROOT}/Modules/Foo.cmake) > else() > ... > endif() If I have 2.8.2 installed on the host, but my software has 2.8.6 module imported, the version 2.8.2 will be selected. Therefore, it will "break". I think it needs more restricted check. Best Regards, Laszlo Papp -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake