Cmake无法解析VILLAS框架的依赖项

q7solyqu  于 2024-01-09  发布在  其他
关注(0)|答案(1)|浏览(251)

我正在尝试在Ubuntu 20.04 LTS上安装以下应用程序:https://villas.fein-aachen.org/doc/node-installation.html
所有必需的软件包似乎都已安装并更新到最新版本。不幸的是,当我运行cmake ..时,它返回以下错误:

  1. ```-- The C compiler identification is GNU 9.3.0
  2. -- The CXX compiler identification is GNU 9.3.0
  3. -- Detecting C compiler ABI info
  4. -- Detecting C compiler ABI info - done
  5. -- Check for working C compiler: /usr/bin/cc - skipped
  6. -- Detecting C compile features
  7. -- Detecting C compile features - done
  8. -- Detecting CXX compiler ABI info
  9. -- Detecting CXX compiler ABI info - done
  10. -- Check for working CXX compiler: /usr/bin/c++ - skipped
  11. -- Detecting CXX compile features
  12. -- Detecting CXX compile features - done
  13. -- Looking for pthread.h
  14. -- Looking for pthread.h - found
  15. -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  16. -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  17. -- Looking for pthread_create in pthreads
  18. -- Looking for pthread_create in pthreads - not found
  19. -- Looking for pthread_create in thread
  20. -- Looking for pthread_create in pthread - found
  21. -- Found Threads: TRUE
  22. -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
  23. -- Looking for sys/eventfd.h
  24. -- Looking for sys/eventfd.h - found
  25. -- Looking for semaphore.h
  26. -- Looking for semaphore.h - found
  27. -- Looking for sys/mman.h
  28. -- Looking for sys/mman.h - found
  29. -- Found OpenMP_C: -fopenmp (found version "4.5")
  30. -- Found OpenMP_CXX: -fopenmp (found version "4.5")
  31. -- Found OpenMP: TRUE (found version "4.5")
  32. -- Could NOT find Opal (missing: OPAL_LIBRARY OPAL_LIBRARY_UTILS OPAL_LIBRARY_CORE OPAL_LIBRARY_IRC OPAL_INCLUDE_DIR)
  33. -- Found IBVerbs: /usr/lib/x86_64-linux-gnu/libibverbs.so
  34. -- Found RDMACM: /usr/lib/x86_64-linux-gnu/librdmacm.so
  35. -- Found Etherlab: /usr/local/lib/libethercat.so
  36. -- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.3.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.3.3")
  37. -- Checking for module 'jansson>=2.9'
  38. -- Found jansson, version 2.12
  39. -- Checking for module 'libwebsockets>=2.3.0'
  40. -- Found libwebsockets, version 4.0.22
  41. -- Checking for module 'protobuf>=2.6.0'
  42. -- Found protobuf, version 3.6.1
  43. -- Checking for module 'libprotobuf-c>=1.1.0'
  44. -- Found libprotobuf-c, version 1.3.3
  45. -- Checking for module 'criterion>=2.3.1'
  46. -- Found criterion, version 2.3.3
  47. -- Checking for module 'libnl-route-3.0>=3.2.27'
  48. -- Found libnl-route-3.0, version 3.4.0
  49. -- Checking for module 'libiec61850>=1.3.1'
  50. -- Found libiec61850, version 1.4.3
  51. -- Checking for module 'libconfig>=1.4.9'
  52. -- Found libconfig, version 1.5
  53. -- Checking for module 'libmosquitto>=1.6.9'
  54. -- Found libmosquitto, version 1.6.9
  55. -- Checking for module 'rdkafka>=1.5.0'
  56. -- Found rdkafka, version 1.6.0
  57. -- Checking for module 'hiredis>=1.0.0'
  58. -- Found hiredis, version 1.0.0
  59. -- Checking for module 'redis++>=1.2.0'
  60. -- Found redis++, version 1.2.3
  61. -- Checking for module 'librabbitmq>=0.8.0'
  62. -- Found librabbitmq, version 0.10.0
  63. -- Checking for module 'comedilib>=0.11.0'
  64. -- Found comedilib, version 0.11.0
  65. -- Checking for module 'libzmq>=2.2.0'
  66. -- Found libzmq, version 4.3.2
  67. -- Checking for module 'libuldaq>=1.0.0'
  68. -- Found libuldaq, version 1.2.0
  69. -- Checking for module 'uuid>=2.23'
  70. -- Found uuid, version 2.34.0
  71. -- Checking for module 'libcgraph>=2.30'
  72. -- Found libcgraph, version 2.49.0
  73. -- Checking for module 'libgvc>=2.30'
  74. -- Found libgvc, version 2.49.0
  75. -- Checking for module 'libusb-1.0>=1.0.23'
  76. -- Found libusb-1.0, version 1.0.23
  77. -- Checking for module 'libxil'
  78. -- Found libxil, version 1.0.0
  79. -- Checking for module 'nanomsg'
  80. -- Found nanomsg, version 1.1.5
  81. -- Checking for module 're>=0.5.6'
  82. -- No package 're' found
  83. -- Checking for module 'libre>=0.5.6'
  84. -- Found libre, version 0.6.0
  85. -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found suitable version "1.1.1f", minimum required is "1.0.0")
  86. -- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found suitable version "7.68.0", minimum required is "7.29")
  87. -- Could NOT find Criterion (missing: CRITERION_LIBRARY)
  88. -- Checking for module 'jansson>=2.7'
  89. -- Found jansson, version 2.12
  90. CMake Error at CMakeLists.txt:225 (add_subdirectory):
  91. The source directory
  92. /home/lab/VILLASnode/fpga
  93. does not contain a CMakeLists.txt file.
  1. 字符串
  2. 不幸的是,在此之后,我无法完成安装。日志文件返回给我:

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/lab/VILLASnode/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_e442c/fast && /usr/bin/make -f CMakeFiles/cmTC_e442c.dir/build.make CMakeFiles/cmTC_e442c.dir/build
make[1]: Entering directory '/home/lab/VILLASnode/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e442c.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_e442c.dir/src.c.o -c /home/lab/VILLASnode/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_e442c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e442c.dir/link.txt --verbose=1
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_e442c.dir/src.c.o -o cmTC_e442c
/usr/bin/ld: CMakeFiles/cmTC_e442c.dir/src.c.o: in function main': src.c:(.text+0x46): undefined reference topthread_create'
/usr/bin/ld: src.c:(.text+0x52): undefined reference to pthread_detach' /usr/bin/ld: src.c:(.text+0x63): undefined reference topthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_e442c.dir/build.make:87: cmTC_e442c] Error 1
make[1]: Leaving directory '/home/lab/VILLASnode/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_e442c/fast] Error 2

Source file was:
#include <pthread.h>

void* test_func(void* data)
{
return data;
}

int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);

return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/lab/VILLASnode/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_4179b/fast && /usr/bin/make -f CMakeFiles/cmTC_4179b.dir/build.make CMakeFiles/cmTC_4179b.dir/build
make[1]: Entering directory '/home/lab/VILLASnode/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4179b.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_4179b.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
Linking C executable cmTC_4179b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4179b.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_4179b.dir/CheckFunctionExists.c.o -o cmTC_4179b -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_4179b.dir/build.make:87: cmTC_4179b] Error 1
make[1]: Leaving directory '/home/lab/VILLASnode/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_4179b/fast] Error 2

  1. 如何解决这个问题?(pthreadlibc 6已正确安装)
  2. 提前感谢您的任何建议!
f5emj3cl

f5emj3cl1#

/home/lab/VILLASnode/fpga
不包含CMakeLists.txt文件

  1. sudo apt install gcc g++ pkg-config make cmake ninja-build protobuf-compiler protobuf-c-compiler autoconf libtool texinfo git mercurial curl flex bison xmlto doxygen dia graphviz libssl-dev libprotobuf-dev libprotobuf-c-dev uuid-dev libconfig-dev libnl-3-dev libnl-route-3-dev libcurl4-openssl-dev libjansson-dev libzmq3-dev libnanomsg-dev librabbitmq-dev libmosquitto-dev libcomedi-dev libibverbs-dev librdmacm-dev libre-dev libspdlog-dev libfmt-dev libusb-1.0-0-dev liblua5.3-dev librdkafka-dev

字符串
https://villas.fein-aachen.org/doc/node-installation.html并不完美。

  1. git clone https://git.rwth-aachen.de/acs/public/villas/node.git VILLASnode
  2. cd VILLASnode/
  3. git submodule update --init --recursive
  4. # will provide {fpga/, common/ files} with some Ubuntu 20.04 OS
  5. ## When missing, then clone fpga and common
  6. git submodule update --init common
  7. git submodule update --init fpga # OK
  8. sudo bash packaging/deps.sh
  9. cd build/ && cmake ..
  10. make
  11. [100%] Linking CXX executable unit-tests
  12. [100%] Built target unit-tests

展开查看全部

相关问题