Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could NOT find liblcf (missing: LIBLCF_LIBRARY) (found version "0.7.0") #446

Closed
papoteur-mga opened this issue Dec 9, 2022 · 5 comments · Fixed by #448
Closed

Could NOT find liblcf (missing: LIBLCF_LIBRARY) (found version "0.7.0") #446

papoteur-mga opened this issue Dec 9, 2022 · 5 comments · Fixed by #448
Labels
Milestone

Comments

@papoteur-mga
Copy link

Trying to build easyrpg for Mageia and update it, I found an error which was already reported, but solved with the way of static library, what we avoid in distribution.

 /usr/bin/cmake -Wno-dev -S . -B build -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-DNDEBUG -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DCMAKE_INSTALL_LIBEXECDIR:PATH=/usr/libexec -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_RUNSTATEDIR:PATH=/run -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIB_SUFFIX=64 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON '-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed  -Wl,-z,relro -Wl,-O1 -Wl,--build-id=sha1 -Wl,--enable-new-dtags' -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF
-- The CXX compiler identification is GNU 12.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SDL2: /usr/lib64/libSDL2.so (Required is at least version "2.0.5") 
-- Configuring incomplete, errors occurred!
See also "/builddir/build/BUILD/easyrpg-player-0.7.0/build/CMakeFiles/CMakeOutput.log".
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find liblcf (missing: LIBLCF_LIBRARY) (found version "0.7.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/lib64/cmake/liblcf/liblcf-config.cmake:78 (find_package_handle_standard_args)
  CMakeLists.txt:615 (find_package)

What surprise me is that something is found, because version number is reported. The shared library is at 0.7.0 version.

The problem was already present before I try to update to 0.7.0: http://pkgsubmit.mageia.org/autobuild/cauldron/x86_64/core/2022-11-15/easyrpg-player-0.6.2.3-2.mga9.src.rpm/build.x86_64.0.20221115174342.log

@carstene1ns
Copy link
Member

Can you surround the liblcf finding in cmake with this: and post the output of cmake?

set(CMAKE_FIND_DEBUG_MODE TRUE)

set(CMAKE_FIND_DEBUG_MODE FALSE) 

@papoteur-mga
Copy link
Author

papoteur-mga commented Dec 9, 2022

Thanks for your quick reply.
I'm not sure of the place. What I obtain:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find liblcf (missing: LIBLCF_LIBRARY) (found version "0.7.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/lib64/cmake/liblcf/liblcf-config.cmake:78 (find_package_handle_standard_args)
  CMakeLists.txt:616 (find_package)


CMake Debug Log at CMakeLists.txt:616 (find_package):
  find_package considered the following paths for Findliblcf.cmake:

    /builddir/build/BUILD/easyrpg-player-0.7.0/builds/cmake/Modules/Findliblcf.cmake
    /usr/share/cmake/Modules/Findliblcf.cmake

  The file was not found.

  The internally managed CMAKE_FIND_PACKAGE_REDIRECTS_DIR.

    /builddir/build/BUILD/easyrpg-player-0.7.0/build/CMakeFiles/pkgRedirects

  <PackageName>_ROOT CMake variable [CMAKE_FIND_USE_PACKAGE_ROOT_PATH].

    none

  CMAKE_PREFIX_PATH variable [CMAKE_FIND_USE_CMAKE_PATH].

    none

  CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH variables
  [CMAKE_FIND_USE_CMAKE_PATH].

    none

  Env variable liblcf_DIR [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH].

    none

  CMAKE_PREFIX_PATH env variable [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH].

    none

  CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH env variables
  [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH].

    none

  Paths specified by the find_package HINTS option.

    none

  Standard system environment variables
  [CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH].

    /usr
    /
    /usr/local/games
    /usr/games
    /usr/local

  CMake User Package Registry [CMAKE_FIND_USE_PACKAGE_REGISTRY].

    none

  CMake variables defined in the Platform file
  [CMAKE_FIND_USE_CMAKE_SYSTEM_PATH].

    /usr/X11R6
    /usr/pkg
    /opt

  CMake System Package Registry
  [CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY].

    none

  Paths specified by the find_package PATHS option.

    none

  find_package considered the following locations for liblcf's Config module:

    /builddir/build/BUILD/easyrpg-player-0.7.0/build/CMakeFiles/pkgRedirects/liblcfConfig.cmake
    /builddir/build/BUILD/easyrpg-player-0.7.0/build/CMakeFiles/pkgRedirects/liblcf-config.cmake
    /usr/liblcfConfig.cmake
    /usr/liblcf-config.cmake
    /usr/lib64/cmake/liblcf/liblcfConfig.cmake
    /usr/lib64/cmake/liblcf/liblcf-config.cmake

  The file was found at

    /usr/lib64/cmake/liblcf/liblcf-config.cmake

I have the debug commands between thesse 2 lines : https://github.com/EasyRPG/Player/blob/d9fa057dba51f040749edb340f30cbd5d2cb053d/CMakeLists.txt#L787-L788

@carstene1ns
Copy link
Member

Can you verify where liblcf.so is located?

@papoteur-mga
Copy link
Author

I found a fix (at least for me).
The issue is that PATHS in liblcf-config.make is set to /usr//usr/lib64 in our build of liblcf.
This comes from here:

PATHS ${_IMPORT_PREFIX}/@CMAKE_INSTALL_LIBDIR@

and
PATHS ${_IMPORT_PREFIX}/@CMAKE_INSTALL_LIBDIR@

It seems that CMAKE_INSTALL_LIBDIR already includes the PREFIX, thus ${_IMPORT_PREFIX}/ isn't needed.

@Ghabry Ghabry transferred this issue from EasyRPG/Editor Dec 16, 2022
@Ghabry
Copy link
Member

Ghabry commented Dec 16, 2022

moved to liblcf as obviously a problem with the cmake-config file

@Ghabry Ghabry added this to the 0.7.1 milestone Jan 4, 2023
Ghabry added a commit to Ghabry/easyrpg-liblcf that referenced this issue Jan 4, 2023
…cked mess

Should resolve all problems of consumers of our library.

In case of autotools a very simple config file that only uses PkgConfig is used.
Everything else is not maintainable as the config files generated by CMake look horrible.

Fix EasyRPG#446
Ghabry added a commit to Ghabry/easyrpg-liblcf that referenced this issue Jan 4, 2023
…cked mess

Should resolve all problems of consumers of our library.

In case of autotools a very simple config file that only uses PkgConfig is used.
Everything else is not maintainable as the config files generated by CMake look horrible.

Fix EasyRPG#446
Ghabry added a commit to Ghabry/easyrpg-liblcf that referenced this issue Jan 4, 2023
…ur hacked mess

Should resolve all problems of consumers of our library.

In case of autotools a very simple config file that only uses PkgConfig is used.
Everything else is not maintainable as the config files generated by CMake look horrible.

Fix EasyRPG#446
Ghabry added a commit to Ghabry/easyrpg-liblcf that referenced this issue Jan 4, 2023
…ur hacked mess

Should resolve all problems of consumers of our library.

In case of autotools a very simple config file that only uses PkgConfig is used.
Everything else is not maintainable as the config files generated by CMake look horrible.

Fix EasyRPG#446
Ghabry added a commit to Ghabry/easyrpg-liblcf that referenced this issue Jan 10, 2023
…ur hacked mess

Should resolve all problems of consumers of our library.

In case of autotools a very simple config file that only uses PkgConfig is used.
Everything else is not maintainable as the config files generated by CMake look horrible.

Fix EasyRPG#446
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants