2016-03-17 8 views
0

Как мне кажется, у меня проблемы с установкой спектра2 на сервере без корневого сервера. Основная проблема заключается в том, что я должен построить много зависимостей от источника и связать их правильно. Я установил log4cxx со своими зависимостями в /home/$USER/log4cxx_build/apache-log4cxx-0.10.0. При попытке cd libtransport и make я получаю следующий результат:Строение спектра2 на сервере без корневого сервера

[email protected] libtransport]$ make 
[ 1%] Built target pb 
[ 1%] Building CXX object plugin/cpp/CMakeFiles/transport-plugin.dir/networkplugin.cpp.o 
In Datei, eingefügt von /home/$USER/libtransport/plugin/cpp/networkplugin.cpp:23: 
/home/$USER/libtransport/include/transport/Logging.h:30:28: Fehler: log4cxx/logger.h: Datei oder Verzeichnis nicht gefunden 
/home/$USER/libtransport/include/transport/Logging.h:31:37: Fehler: log4cxx/consoleappender.h: Datei oder Verzeichnis nicht gefunden 
/home/$USER/libtransport/include/transport/Logging.h:32:35: Fehler: log4cxx/patternlayout.h: Datei oder Verzeichnis nicht gefunden 
/home/$USER/libtransport/include/transport/Logging.h:33:42: Fehler: log4cxx/propertyconfigurator.h: Datei oder Verzeichnis nicht gefunden 
/home/$USER/libtransport/include/transport/Logging.h:34:40: Fehler: log4cxx/helpers/properties.h: Datei oder Verzeichnis nicht gefunden 
/home/$USER/libtransport/include/transport/Logging.h:35:45: Fehler: log4cxx/helpers/fileinputstream.h: Datei oder Verzeichnis nicht gefunden 
/home/$USER/libtransport/include/transport/Logging.h:36:40: Fehler: log4cxx/helpers/transcoder.h: Datei oder Verzeichnis nicht gefunden 
/home/$USER/libtransport/include/transport/Logging.h:38:32: Fehler: log4cxx/logmanager.h: Datei oder Verzeichnis nicht gefunden 
In file included from /home/$USER/libtransport/plugin/cpp/networkplugin.cpp:23: 
/home/$USER/libtransport/include/transport/Logging.h:42: Fehler: »log4cxx« is not a namespace-name 
/home/$USER/libtransport/include/transport/Logging.h:42: Fehler: expected namespace-name before »;« token 
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp:38: Fehler: »log4cxx« has not been declared 
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp:38: Fehler: expected initializer before »logger« 
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp: In member function »void Transport::NetworkPlugin::checkPing()«: 
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp:679: Fehler: »logger« wurde in diesem Gültigkeitsbereich nicht definiert 
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp:679: Fehler: »LOG4CXX_ERROR« wurde in diesem Gültigkeitsbereich nicht definiert 
make[2]: *** [plugin/cpp/CMakeFiles/transport-plugin.dir/networkplugin.cpp.o] Fehler 1 
make[1]: *** [plugin/cpp/CMakeFiles/transport-plugin.dir/all] Fehler 2 
make: *** [all] Fehler 2 

Похоже log4cxx не найден во время установки.

Любая помощь приветствуется. Заранее спасибо! :-)

ответ

0

После установки log4cxx в каталоге пользователя необходимо повторно запустить cmake и добавить подсказки, где искать заголовки и библиотеки, это может быть сделано, например, как:

cmake . -DCMAKE_INCLUDE_PATH=/home/$USER/log4cxx_build/apache-log4cxx-0.10.0/include -DCMAKE_LIBRARY_PATH=/home/$USER/log4cxx_build/apache-log4cxx-0.10.0/lib

Также лучше установить все зависимости в один каталог

+0

Спасибо, четыре вашего ответа. Если я так делаю, я получаю много ошибок, таких как «ПРЕДУПРЕЖДЕНИЕ: Целевой» транспортный запрос, ссылающийся на каталог «/home/$USER/log4cxx_build/apache-log4cxx-0.10.0/». Цели могут связываться только с библиотеками. CMake бросает элемент. «Вы знаете, в чем причина? Я заметил, что у меня нет папки '/ home/$ USER/log4cxx_build/apache-log4cxx-0.10.0/lib'. Единственная библиотека, которую я могу найти, это '/ home/$ USER/log4cxx_build/apache-log4cxx-0.10.0/src/main/cpp/.libs' – temzao

 Смежные вопросы

  • Нет связанных вопросов^_^