Closed vitaliy-senchyshyn closed 8 years ago
I found some bug in this CMakeList.txt Try to modify
foreach(reflect ${arg_REFLECT})
set(outputs ${outputs}
${CMAKE_BINARY_DIR}/gen/${dirname}/gen-${gen}/${reflect}_reflect.h
${CMAKE_BINARY_DIR}/gen/${dirname}/gen-${gen}/${reflect}_reflect.cpp)
endforeach(reflect)
to
foreach(reflect ${arg_REFLECT})
set(outputs ${outputs}
${CMAKE_BINARY_DIR}/gen/${dirname}/gen-${gen}/${reflect}_reflection.h
${CMAKE_BINARY_DIR}/gen/${dirname}/gen-${gen}/${reflect}_reflection.cpp)
endforeach(reflect)
and also needs to modify the cmake_parse_arguments. Try to modify
function(fboss_add_thrift)
cmake_parse_arguments("arg" "" "OPTIONS";"THRIFTSRC" "SERVICES" ${ARGN})
to
function(fboss_add_thrift)
set(options)
set(oneValueArgs OPTIONS REFLECT)
set(multiValueArgs THRIFTSRC SERVICES)
cmake_parse_argument("arg" "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
This helped a bit but now I see error as follows: fboss/external/fbthrift/thrift/compiler/thrift1: error while loading shared libraries: libfolly.so.48: cannot open shared object file: No such file or directory
At the same time I see that this library is here: fboss$ find . -name libfolly.so.48 ./external/folly/folly/.libs/libfolly.so.48
So this looks quite strange. But perhaps this happens because ./getdeps.sh throws errors on gen-cpp2/ stage and fails to finish. Although ./getdeps.sh now has exact versions of folly, fbthrift and iproute2 which have to be downloaded but looks like there is still some mistake in versions mentioned there. First of all I've added the command "git reset --hard $2" after "cd $1" function build() but still see many errors as follows:
In file included from gen-cpp2/SaslAuthService.cpp:7:0:
gen-cpp2/SaslAuthService.h:79:37: error: expected type-specifier before ‘ProcessFunc’
using BinaryProtocolProcessFunc = ProcessFunc<SaslAuthServiceAsyncProcessor, apache::thrift::BinaryProtocolReader>;
^
gen-cpp2/SaslAuthService.h:80:36: error: expected type-specifier before ‘ProcessMap’
using BinaryProtocolProcessMap = ProcessMap
What version of Thrift are you building against?
v0.28.0 as mentioned in ./getdeps.sh
Odd. What compiler version?
/fboss$ g++ --version g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Any updates?
After my hard disc clean up things are much better(I guess the problems above occurred because of thrift, folly and iproute2 libraries of versions other than required here were installed in system directories. Apparently they affected compilation).
I still see one compilation error which should be fixed but as a temporary solution I've just commented it out and this helped - fboss was built successfully. The error is as follows and I guess has to be fixed anyway:
/home/vsenchyshyn/projects/xpliant/tmp/fboss/fboss/agent/NeighborUpdater.cpp: In destructor ‘virtual facebook::fboss::NeighborUpdater::~NeighborUpdater()’:
/home/vsenchyshyn/projects/xpliant/tmp/fboss/fboss/agent/NeighborUpdater.cpp:156:37: error: no matching function for call to ‘std::vectorfolly::Future
This should be fixed.
I've just pulled the latest fboss code, pulled and installed latest folly and fbthrift from github, executed getdeps.sh. Till that moment everything is OK. But when I execute cmake .. from the created build dir(as this is mentioned in BUILD document) I got the error as follows:
CMake Error at CMakeLists.txt:63 (add_library): Cannot find source file:
Since the latest commit is fixing build I'm wondering what's wrong in my case? Do I need to install folly and fbthrift of specific version in order to make build working correctly? If yes then how can I do that? If not then what else could be wrong?