facebook / openr

Distributed platform for building autonomic network functions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make error when use docker

silveric10 opened this issue · comments

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

Issue Description

Scanning dependencies of target OpenrCtrl-cpp2-target
[ 32%] Generating OpenrCtrl files. Output: /home/openr/build/thrift-out/openr/if
[ 32%] Built target OpenrCtrl-cpp2-target
Scanning dependencies of target OpenrCtrl-cpp2-obj
[ 32%] Building CXX object CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o
In file included from /home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.h:11:0,
from /home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp:8:
/home/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_types.h:16:46: fatal error: openr/if/gen-cpp2/Decision_types.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o] Error 1

Environment

ubuntu 18.04 gcc 7.4

Minimal test code / Steps to reproduce the issue

What's the actual result?

What's the expected result?

build success

This error also happens when I make without docker.
[ 23%] Building CXX object CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o
In file included from /home/yy/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.h:11:0,
from /home/yy/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp:8:
/home/yy/openr/build/thrift-out/openr/if/gen-cpp2/OpenrCtrl_types.h:17:10: fatal error: openr/if/gen-cpp2/Dual_types.h: No such file or directory
#include "openr/if/gen-cpp2/Dual_types.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/OpenrCtrl-cpp2-obj.dir/build.make:102: recipe for target 'CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o' failed

Hello @silveric10 - can you try build again with latest code, we had some changes and fixes in cmake dependencies that will resolve your issue.

Hello @silveric10 - can you try build again with latest code, we had some changes and fixes in cmake dependencies that will resolve your issue.

Hi @saifhhasan , your update still doesn't work, and I want to tell you that the build script "build_openr.sh" also has a bug.

install_openr() {
pushd .
cd "$BUILD_DIR"
cmake
-DBUILD_SHARED_LIBS=OFF
-DBUILD_TESTS=ON
-DADD_ROOT_TESTS=ON
-DCMAKE_CXX_FLAGS="-Wno-unused-parameter -fPIC"
../openr/ //There is no "CMakeLists.txt" in this directory, I think it should be “..” not "../openr"

By the way, the compile error is the same.
[ 13%] Built target OpenrCtrl-cpp2-target
Scanning dependencies of target OpenrCtrl-cpp2-obj
[ 13%] Building CXX object CMakeFiles/OpenrCtrl-cpp2-obj.dir/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp.o
In file included from /home/yy/openr/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.h:11:0,
from /home/yy/openr/thrift-out/openr/if/gen-cpp2/OpenrCtrl_constants.cpp:8:
/home/yy/openr/thrift-out/openr/if/gen-cpp2/OpenrCtrl_types.h:17:10: fatal error: openr/if/gen-cpp2/Decision_types.h: No such file or directory
#include "openr/if/gen-cpp2/Decision_types.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Hi, once I close #56 I'll try make the docker builds all work again and will update when I feel they are working.

Please try the new Dockerfile