Как построить либонион? - PullRequest
1 голос
/ 01 апреля 2019

Я пытался собрать onionlib из источников.Я не могу использовать git на своей рабочей станции Debian 8, поэтому я скачал zip с github.Сбой CMake в главном CMakeLists.txt: 28, 29, 30 и т. Д. С ошибкой строковая подкоманда REGEX, режим REPLACE требует не менее 6 аргументов для команды .

Похоже, что ONION_VERSION переменная пуста.Попытался выполнить git clone на другом ПК, а затем скопировал всю папку, включая .git, на целевую рабочую станцию ​​с тем же результатом.Попытался выполнить .git-version-gen и получил вывод '0.8.123.f6b9d'. Я также получаю пустую - Луковая версия во время компиляции, поэтому версия не определена.

npa@NPA:~/workspace/TMOIP/onion$ sudo sh ./git-version-gen
0.8.123.f6b9d
npa@NPA:~/workspace/TMOIP/onion$ mkdir build
npa@NPA:~/workspace/TMOIP/onion$ cd build
npa@NPA:~/workspace/TMOIP/onion/build$ cmake ..
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- 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
-- 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
CMake Error at CMakeLists.txt:28 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.

CMake Error at CMakeLists.txt:29 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.

CMake Error at CMakeLists.txt:30 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.

-- Onion version is
-- Using epoll as poller
-- Could NOT find GnuTLS (missing:  GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) 
-- Could NOT find GCrypt, try to set the path to GCrypt root folder in the system variable GCRYPT_ROOT_DIR (missing:  GCRYPT_INCLUDE_DIR GCRYPT_LIBRARIES) 
Gnutls or gcrypt not found. SSL support is not compiled in.
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
SQLite session support is not compiled in.
-- hiredis client library not found.
Hiredis not found. Redis session support is not compiled in.
-- pthreads found. Threading support is compiled in.
-- Found LibXml2: /usr/lib/i386-linux-gnu/libxml2.so (found version "2.9.1")
-- WebDAV support is compiled in.
No PAM support.
-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
-- Could NOT find PNG (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR) 
libpng not found. No png support.
-- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR) 
libjpeg not found. No jpeg support.
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Found GC library: BOEHM_GC_LIBRARIES-NOTFOUND
-- Could NOT find Boehm_GC (missing:  BOEHM_GC_LIBRARIES BOEHM_GC_INCLUDE_DIR) 
-- NOT compiling Boehm GC examples
-- Could NOT find CURL (missing:  CURL_LIBRARY CURL_INCLUDE_DIR) 
curl not found. Some examples wil not be built.
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could NOT find SYSTEMD (missing:  SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES) 
Systemd support is not compiled in. Install libsystemd-dev | systemd-devel
md2man-roff NOT found, NOT compiling manpages. Install it via 'gem install md2man'
-- Prepared for packaging
-- Compiling WebDAV support
-- Found include files 
CMake Error at src/onion/CMakeLists.txt:107 (SET_TARGET_PROPERTIES):
  set_target_properties called with incorrect number of arguments.

-- Found include files onion.hpp;dict.hpp;request.hpp;response.hpp;url.hpp;handler.hpp;extrahandlers.hpp;shortcuts.hpp;exceptions.hpp;listen_point.hpp;http.hpp;https.hpp;mime.hpp
CMake Error at src/bindings/cpp/CMakeLists.txt:10 (SET_TARGET_PROPERTIES):
  set_target_properties called with incorrect number of arguments.

CMake Warning at examples/CMakeLists.txt:9 (message):
  Oterm without authentication support! May be very unsecure.

CMake Warning at examples/CMakeLists.txt:14 (message):
  Some examples are disabled as you dont have PAM: otop, basic, fileserver.

-- jQuery at /usr/share/javascript/jquery/jquery.min.js
-- Using system provided jquery for oterm
-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
CMake Warning at examples/CMakeLists.txt:37 (message):
  Some examples are disabled as you dont have libpng: mandelbrot

-- Configuring incomplete, errors occurred!
See also "/home/npa/workspace/TMOIP/onion/build/CMakeFiles/CMakeOutput.log".

1 Ответ

0 голосов
/ 01 апреля 2019

Я понял, что проблема была в вызове CMake скрипта git-version-gen. Я смог запустить его вручную, но он не работал правильно из CMake из-за некоторых настроек разрешений моей рабочей станции. Проблема исчезла после исправления.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...