facebook / openr

Distributed platform for building autonomic network functions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation fails - Cmake not scanning dependencies for LinkMonitor

joeswaminathan opened this issue · comments

Please use this template for reporting suspected bugs or requests for help.

Issue Description

I cloned openr in a ubuntu 16.04 container. When I compiled (cd build & ./build_openr.sh), it fails when producing thrift-out for LinkMonitor-cpp2-obj.

Environment

  • branch master
  • OS version: ubuntu-16.04 (container)

Minimal test code / Steps to reproduce the issue

Create a ubuntu:16.04 container.
Clone openr.
cd openr/build
./build_openr.sh

What's the actual result?

[ 32%] Built target LinuxPlatform-cpp2-target
Scanning dependencies of target LinuxPlatform-cpp2-obj
[ 33%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_constants.cpp.o
[ 34%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_data.cpp.o
[ 34%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxPlatform_types.cpp.o
[ 35%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService.cpp.o
[ 35%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService_client.cpp.o
[ 36%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService_processmap_binary.cpp.o
[ 37%] Building CXX object CMakeFiles/LinuxPlatform-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinuxFibService_processmap_compact.cpp.o
[ 37%] Built target LinuxPlatform-cpp2-obj
[ 38%] Built target LinkMonitor-cpp2-target
[ 39%] Building CXX object CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp.o
In file included from /openr/build/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.h:11:0,
from /openr/build/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp:8:
/openr/build/thrift-out/openr/if/gen-cpp2/LinkMonitor_types.h:15:43: fatal error: openr/if/gen-cpp2/Spark_types.h: No such file or directory
compilation terminated.
CMakeFiles/LinkMonitor-cpp2-obj.dir/build.make:84: recipe for target 'CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp.o' failed
make[2]: *** [CMakeFiles/LinkMonitor-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/LinkMonitor_constants.cpp.o] Error 1
CMakeFiles/Makefile2:291: recipe for target 'CMakeFiles/LinkMonitor-cpp2-obj.dir/all' failed
make[1]: *** [CMakeFiles/LinkMonitor-cpp2-obj.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

What's the expected result?

Build should succeed.
What I notice is for LinkMonitor, the Cmake doesnt scan for dependencies.

Manually executed the following and it solved the issue.

make -f CMakeFiles/Spark-cpp2-target.dir/build.make CMakeFiles/Spark-cpp2-target.dir/build