netcan / asyncio

asyncio is a c++20 library to write concurrent code using the async/await syntax.
MIT License
812 stars 80 forks source link

cmake error: Could not find a package configuration file provided by "fmt" #23

Open Fjallraven-hc opened 9 months ago

Fjallraven-hc commented 9 months ago

Below is the error msg:


-- 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
-- Module support is disabled.
-- Version: 8.0.1
-- Build type: 
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
-- Performing Test has_std_20_flag - Success
-- Performing Test has_std_2a_flag
-- Performing Test has_std_2a_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Looking for strtod_l
-- Looking for strtod_l - found
CMake Error at CMakeLists.txt:59 (find_package):
  By not providing "Findfmt.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "fmt", but
  CMake did not find one.

  Could not find a package configuration file provided by "fmt" with any of
  the following names:

    fmtConfig.cmake
    fmt-config.cmake

  Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
  to a directory containing one of the above files.  If "fmt" provides a
  separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!
See also "/home/yhc/asyncio/build/CMakeFiles/CMakeOutput.log".```
ayamir commented 9 months ago

seems need to build and install fmt in third_party dir manually first.

Fjallraven-hc commented 9 months ago

seems need to build and install fmt in third_party dir manually first.

sure it is, so maybe the origin CMakeLists.txt file need to be modified for automating this process

netcan commented 8 months ago

do you clone recursive submodules?

$ git clone --recursive https://github.com/netcan/asyncio.git
$ cd asyncio
$ mkdir build
$ cd build
$ cmake ..
$ make -j
ayamir commented 8 months ago

yes

Fjallraven-hc commented 8 months ago

do you clone recursive submodules?

$ git clone --recursive https://github.com/netcan/asyncio.git
$ cd asyncio
$ mkdir build
$ cd build
$ cmake ..
$ make -j

yes, git clone with --recursive

kardusenor commented 7 months ago

Seems like #18 makes it

bigben0123 commented 4 days ago

The same issue occured:

 $cmake ..
-- The CXX compiler identification is GNU 11.4.0
-- 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
CMake Error at CMakeLists.txt:62 (find_package):
  By not providing "Findfmt.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "fmt", but
  CMake did not find one.

  Could not find a package configuration file provided by "fmt" with any of
  the following names:

    fmtConfig.cmake
    fmt-config.cmake

  Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
  to a directory containing one of the above files.  If "fmt" provides a
  separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

I have to run this first:

cd third_party/fmt
mkdir build
cd build
cmake ..
make
sudo make install

after this, cmake is ok.

bigben0123 commented 3 days ago

The same issue occured:

 $cmake ..
-- The CXX compiler identification is GNU 11.4.0
-- 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
CMake Error at CMakeLists.txt:62 (find_package):
  By not providing "Findfmt.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "fmt", but
  CMake did not find one.

  Could not find a package configuration file provided by "fmt" with any of
  the following names:

    fmtConfig.cmake
    fmt-config.cmake

  Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
  to a directory containing one of the above files.  If "fmt" provides a
  separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

I have to run this first:

cd third_party/fmt
mkdir build
cd build
cmake ..
make
sudo make install

after this, cmake is ok.

I use ubuntu 22.04 and install cmake by snap. cmake is on /snap/bin/cmake. This make me touble. On vscode, it cannot find cmake even it just be there! After reinstall it with apt, everything is ok.

Fjallraven-hc commented 3 days ago

Woooooo, Thanks for sharing the solution! : )

-----原始邮件----- 发件人:Bigben @.> 发送时间:2024-10-25 11:35:00 (星期五) 收件人: netcan/asyncio @.> 抄送: "H.Yuan" @.>, Author @.> 主题: Re: [netcan/asyncio] cmake error: Could not find a package configuration file provided by "fmt" (Issue #23)

The same issue occured:

$cmake .. -- The CXX compiler identification is GNU 11.4.0 -- 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 CMake Error at CMakeLists.txt:62 (find_package): By not providing "Findfmt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "fmt", but CMake did not find one.

Could not find a package configuration file provided by "fmt" with any of the following names:

fmtConfig.cmake
fmt-config.cmake

Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR" to a directory containing one of the above files. If "fmt" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

I have to run this first:

cd third_party/fmt mkdir build cd build cmake .. make sudo make install

after this, cmake is ok.

I use ubuntu 22.04 and install cmake by snap. cmake is on /snap/bin/cmake. This make me touble. On vscode, it cannot find cmake even it just be there! After reinstall it with apt, everything is ok.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>