0

As the subject says I've trouble installing spectrum2 on a non root server. The main problem is that I've to build a lot of dependencies from source and link them correct. I've installed log4cxx with its dependencies in /home/$USER/log4cxx_build/apache-log4cxx-0.10.0. When trying to cd libtransport and make I get the following result:

$USER@puppis 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

It seems like log4cxx isn't found during the installation.

Any help is appreciated. Thanks in advance! :-)

vitalyster
  • 4,980
  • 3
  • 19
  • 27
temzao
  • 1

1 Answers1

0

After you installed log4cxx in the user directory you need to re-run cmake and add hints where to search headers and libraries, it can be done for example as:

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

Also it will be better to install all dependencies to the single directory

vitalyster
  • 4,980
  • 3
  • 19
  • 27
  • Thanks four your answer. If I'm doing it like that I get a lot of error like `WARNING: Target "transport" requests linking to directory "/home/$USER/log4cxx_build/apache-log4cxx-0.10.0/". Targets may link only to libraries. CMake is dropping the item.` Do you know whats the reason of that? I noticed that I have no `/home/$USER/log4cxx_build/apache-log4cxx-0.10.0/lib` folder. The only library I can find is `/home/$USER/log4cxx_build/apache-log4cxx-0.10.0/src/main/cpp/.libs` – temzao Mar 18 '16 at 10:38