paullouisageneau / libdatachannel

C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets
https://libdatachannel.org/
Mozilla Public License 2.0
1.79k stars 361 forks source link

run the client-benchmark #1105

Closed Zdxfgre closed 9 months ago

Zdxfgre commented 9 months ago

Hello, I have followed the steps in the Building Instructions once, but I am unable to run it according to the steps in "libdatachannel - client-benchmark". The error I get is: bash: ./client-benchmark: Is a directory. Therefore, I tried to cmake "client-benchmark", and then I encountered the following error. I'm not sure how to solve this problem and could you please advise on how to resolve this? Thank you very much!


CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Configuring done
CMake Error at CMakeLists.txt:21 (add_executable):
  Target "datachannel-client-benchmark" links to target
  "LibDataChannel::LibDataChannel" but the target was not found.  Perhaps a
  find_package() call is missing for an IMPORTED target, or an ALIAS target
  is missing?

CMake Error at CMakeLists.txt:21 (add_executable):
  Target "datachannel-client-benchmark" links to target
  "nlohmann_json::nlohmann_json" but the target was not found.  Perhaps a
  find_package() call is missing for an IMPORTED target, or an ALIAS target
  is missing?

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.``

paullouisageneau commented 9 months ago

Hello, I have followed the steps in the Building Instructions once, but I am unable to run it according to the steps in "libdatachannel - client-benchmark". The error I get is: bash: ./client-benchmark: Is a directory.

It simply means that you specified the path to the directory instead of the executable. After following the building instructions, you have to run ./examples/client-benchmark/client-benchmark inside the build directory. If the executable doesn't exist, it means the build wasn't performed correctly.

Therefore, I tried to cmake "client-benchmark", and then I encountered the following error. I'm not sure how to solve this problem and could you please advise on how to resolve this? Thank you very much!

You can't build examples as standalone out of the box as they won't find dependencies. You must trigger the build from the libdatachannel root directory.

Zdxfgre commented 9 months ago

The issue has been resolved, thank you very much.

Hello, I have followed the steps in the Building Instructions once, but I am unable to run it according to the steps in "libdatachannel - client-benchmark". The error I get is: bash: ./client-benchmark: Is a directory.

It simply means that you specified the path to the directory instead of the executable. After following the building instructions, you have to run ./examples/client-benchmark/client-benchmark inside the build directory. If the executable doesn't exist, it means the build wasn't performed correctly.

Therefore, I tried to cmake "client-benchmark", and then I encountered the following error. I'm not sure how to solve this problem and could you please advise on how to resolve this? Thank you very much!

You can't build examples as standalone out of the box as they won't find dependencies. You must trigger the build from the libdatachannel root directory.

The issue has been resolved, thank you very much!