papyros / papyros-shell

:shell: The desktop shell for Papyros, built using QtQuick and QtCompositor as a compositor for Wayland.
http://papyros.io
GNU General Public License v3.0
945 stars 42 forks source link

/usr/bin/ld: cannot find -lKF5::Wallet #222

Closed jalona closed 8 years ago

jalona commented 8 years ago
root@notebook:~/Papyros/papyros-shell/build# make
[  1%] Automatic moc and rcc for target PapyrosSigWatch
[  1%] Built target PapyrosSigWatch_automoc
[  6%] Built target PapyrosSigWatch
[  8%] Automatic moc and rcc for target material
[  8%] Built target material_automoc
[ 15%] Built target material
[ 17%] Automatic moc and rcc for target papyrosdesktop
[ 17%] Built target papyrosdesktop_automoc
[ 18%] Linking CXX shared library libpapyrosdesktop.so
/usr/bin/ld: cannot find -lKF5::Wallet
collect2: error: ld returned 1 exit status
modules/Papyros/Desktop/CMakeFiles/papyrosdesktop.dir/build.make:517: ошибка выполнения рецепта для цели «modules/Papyros/Desktop/libpapyrosdesktop.so»
make[2]: *** [modules/Papyros/Desktop/libpapyrosdesktop.so] Ошибка 1
CMakeFiles/Makefile2:453: ошибка выполнения рецепта для цели «modules/Papyros/Desktop/CMakeFiles/papyrosdesktop.dir/all»
make[1]: *** [modules/Papyros/Desktop/CMakeFiles/papyrosdesktop.dir/all] Ошибка 2
Makefile:138: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2
attempt to open //usr/local/lib/x86_64-linux-gnu/libKF5::Wallet.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libKF5::Wallet.a failed
attempt to open //lib/x86_64-linux-gnu/libKF5::Wallet.so failed
attempt to open //lib/x86_64-linux-gnu/libKF5::Wallet.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libKF5::Wallet.so failed
attempt to open //usr/lib/x86_64-linux-gnu/libKF5::Wallet.a failed
attempt to open //usr/local/lib64/libKF5::Wallet.so failed
attempt to open //usr/local/lib64/libKF5::Wallet.a failed
attempt to open //lib64/libKF5::Wallet.so failed
attempt to open //lib64/libKF5::Wallet.a failed
attempt to open //usr/lib64/libKF5::Wallet.so failed
attempt to open //usr/lib64/libKF5::Wallet.a failed
attempt to open //usr/local/lib/libKF5::Wallet.so failed
attempt to open //usr/local/lib/libKF5::Wallet.a failed
attempt to open //lib/libKF5::Wallet.so failed
attempt to open //lib/libKF5::Wallet.a failed
attempt to open //usr/lib/libKF5::Wallet.so failed
attempt to open //usr/lib/libKF5::Wallet.a failed
attempt to open //usr/x86_64-linux-gnu/lib64/libKF5::Wallet.so failed
attempt to open //usr/x86_64-linux-gnu/lib64/libKF5::Wallet.a failed
attempt to open //usr/x86_64-linux-gnu/lib/libKF5::Wallet.so failed
attempt to open //usr/x86_64-linux-gnu/lib/libKF5::Wallet.a failed
ld: cannot find -lKF5::Wallet
root@notebook:~/Papyros/papyros-shell/build# locate KF5Wallet | grep \.so
/usr/lib/x86_64-linux-gnu/libKF5Wallet.so
/usr/lib/x86_64-linux-gnu/libKF5Wallet.so.5
/usr/lib/x86_64-linux-gnu/libKF5Wallet.so.5.16.0
/usr/lib/zeitgeist/libKF5Wallet.so.5
/usr/lib/zeitgeist/libKF5Wallet.so.5.16.0
iBelieve commented 8 years ago

Rebuild libpapyros. This is fixed by https://github.com/papyros/libpapyros/commit/da15692bb8b1524bf99747f1c706ea5b53699f67.

jalona commented 8 years ago

I rebuild libpapyros and have error. Fix https://github.com/jalona/papyros-shell/commit/52ba911a95066c6516b98ce9efc13dbfe65c680c

iBelieve commented 8 years ago

@jalona You're still getting the error after building and installing the latest code from the develop branch of libpapyros?

jalona commented 8 years ago

@iBeliever, yes.

root@notebook:~/Papyros/libpapyros# git log -p -2
commit da15692bb8b1524bf99747f1c706ea5b53699f67
Author: Michael Spencer <sonrisesoftware@gmail.com>
Date:   Fri Jan 29 13:56:28 2016 -0600
fix: Fix missing dependency on KWallet in the cmake config file
iBelieve commented 8 years ago

@jalona Do you see KF5Wallet listed with the other dependencies at the end of /usr/lib/cmake/Papyros/PapyrosConfig.cmake (or wherever you installed libpapyros, /usr/local, /opt, etc)?

jalona commented 8 years ago
root@notebook:/usr/lib/x86_64-linux-gnu/cmake/Papyros# cat PapyrosConfig.cmake

####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() (ECM variant) #######
####### Any changes to this file will be overwritten by the next CMake run            #######
####### The input file was PapyrosConfig.cmake.in                                           #######

get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../" ABSOLUTE)

# Use original install prefix when loaded through a "/usr move"
# cross-prefix symbolic link such as /lib -> /usr/lib.
get_filename_component(_realCurr "${CMAKE_CURRENT_LIST_DIR}" REALPATH)
get_filename_component(_realOrig "/usr/lib/x86_64-linux-gnu/cmake/Papyros" REALPATH)
if(_realCurr STREQUAL _realOrig)
  set(PACKAGE_PREFIX_DIR "/usr")
endif()
unset(_realOrig)
unset(_realCurr)

macro(set_and_check _var _file)
  set(${_var} "${_file}")
  if(NOT EXISTS "${_file}")
    message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
  endif()
endmacro()

include(CMakeFindDependencyMacro OPTIONAL RESULT_VARIABLE _CMakeFindDependencyMacro_FOUND)

if (NOT _CMakeFindDependencyMacro_FOUND)
  macro(find_dependency dep)
    if (NOT ${dep}_FOUND)

      set(ecm_fd_version)
      if (${ARGC} GREATER 1)
        set(ecm_fd_version ${ARGV1})
      endif()
      set(ecm_fd_exact_arg)
      if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT)
        set(ecm_fd_exact_arg EXACT)
      endif()
      set(ecm_fd_quiet_arg)
      if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
        set(ecm_fd_quiet_arg QUIET)
      endif()
      set(ecm_fd_required_arg)
      if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
        set(ecm_fd_required_arg REQUIRED)
      endif()

      find_package(${dep} ${ecm_fd_version}
          ${ecm_fd_exact_arg}
          ${ecm_fd_quiet_arg}
          ${ecm_fd_required_arg}
      )

      if (NOT ${dep}_FOUND)
        set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${dep} could not be found.")
        set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
        return()
      endif()

      set(ecm_fd_version)
      set(ecm_fd_required_arg)
      set(ecm_fd_quiet_arg)
      set(ecm_fd_exact_arg)
    endif()
  endmacro()
endif()

macro(check_required_components _NAME)
  foreach(comp ${${_NAME}_FIND_COMPONENTS})
    if(NOT ${_NAME}_${comp}_FOUND)
      if(${_NAME}_FIND_REQUIRED_${comp})
        set(${_NAME}_FOUND FALSE)
      endif()
    endif()
  endforeach()
endmacro()

####################################################################################

find_dependency(Qt5Core 5.4.0)
find_dependency(Qt5Qml 5.4.0)
find_dependency(KF5Config 5.8.0)
find_dependency(KF5Wallet 5.8.0)

include("${CMAKE_CURRENT_LIST_DIR}/PapyrosTargets.cmake")
root@notebook:/usr/lib/x86_64-linux-gnu/cmake/Papyros#
iBelieve commented 8 years ago

Strange. You can see that wallet is being referenced there, so you shouldn't be getting the linker errors anymore. I wonder if you have another install somewhere else, maybe in /usr/local. Does sudo find / -name PapyrosConfig.cmake -print should any other places its installed to?

jalona commented 8 years ago

True,

root@notebook:/usr/lib/x86_64-linux-gnu/cmake/Papyros# sudo find / -name PapyrosConfig.cmake -print
/usr/local/lib/x86_64-linux-gnu/cmake/Papyros/PapyrosConfig.cmake
/usr/lib/x86_64-linux-gnu/cmake/Papyros/PapyrosConfig.cmake
/root/Papyros/libpapyros/src/PapyrosConfig.cmake
root@notebook:/usr/lib/x86_64-linux-gnu/cmake/Papyros#

Not have dependencies KF5Wallet in /usr/local/lib/x86_64-linux-gnu/cmake/Papyros/PapyrosConfig.cmake

Thank you.

iBelieve commented 8 years ago

Great, glad you got that figured out.