artyom-beilis / cppcms

CppCMS Framework
Other
444 stars 107 forks source link

Build fails on Ubuntu 16.04 LTS (undefined reference to session_file_storage_factory) #34

Closed luav closed 6 years ago

luav commented 6 years ago

Build fails on Linux Ubuntu 16.04 LTS x64 for the latest master (9fff4f7):

cppcms/build$ cmake -DDISABLE_SCGI=ON -DDISABLE_GZIP=ON ..
$ make

yields the following error:

...
[ 29%] Built target loadable_storage
Scanning dependencies of target cache_frontend_test
[ 29%] Building CXX object CMakeFiles/cache_frontend_test.dir/tests/cache_frontend_test.cpp.o
[ 30%] Linking CXX executable cache_frontend_test
libcppcms.so.1.2.0: undefined reference to `cppcms::sessions::session_file_storage_factory::session_file_storage_factory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, bool)'
collect2: error: ld returned 1 exit status
CMakeFiles/cache_frontend_test.dir/build.make:103: recipe for target 'cache_frontend_test' failed
make[2]: *** [cache_frontend_test] Error 1
CMakeFiles/Makefile2:106: recipe for target 'CMakeFiles/cache_frontend_test.dir/all' failed
make[1]: *** [CMakeFiles/cache_frontend_test.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

The same issue occurs for the release v1.2.0 built with

cppcms-1.2.0/build$ cmake -DDISABLE_GZIP=ON ..

Build Environment:

$ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
$ cmake --version
cmake version 3.5.1