jiaxiangshang / MGCNet

Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency[ECCV 2020]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in build tf_mesh_renderer

yanhn opened this issue · comments

I followed the instructrions to build tf_mesh_renderer.
I used bazel==4.1.0 downloaded from official github
I used gcc==5.4.0
I used git submodule to fetch the tf_mesh_renderer code and run bazel build ...
got the result as followed:
Starting local Bazel server and connecting to it...
INFO: Analyzed 10 targets (28 packages loaded, 336 targets configured).
INFO: Found 10 targets...
INFO: Elapsed time: 9.038s, Critical Path: 4.72s
INFO: 19 processes: 12 internal, 7 linux-sandbox.
INFO: Build completed successfully, 19 total actions

However, I build rasterize_triangles_kernel.so under path of tf_mesh_renderer/bazel-bin/mesh_renderer/kernels/rasterize_triangles_kernel.so instead of tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so as shown in the code.

The error is like:
tensorflow.python.framework.errors_impl.NotFoundError: tf_mesh_renderer/bazel-bin/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs

Could you please help me out here?

Oh, copy the lib file to the right path.

Thanks for you reply.

Yes, after I put the lib file to the right path.
I got the errror like: tensorflow.python.framework.errors_impl.NotFoundError: tf_mesh_renderer/bazel-bin/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
Seems like to failed to build the right lib. But I followed as you described in the instruction.

I also meet this problem, TensorFlow build lib and run lib is conflict.
It is a version problem.

What is your tensorflow version?
Could you explain more specificly?

see the requirement.txt
check the compile tensorflow lib version and run time tensorflow lib version, for more detail google please
you can also google the error report

@yanhn Do you resolve this problem?-- "undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs"

@yanhn Do you resolve this problem?-- "undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs"

Not yet, but I think it is probably because the version mismatch. So reinstall the requiements should work.

I meet this problem too. You need change the opt in build according to the gcc version then recomplie the tf_mesh_render and copy the so file.

Pay attention to:(The gcc/g++ version higher than 5.* will bring problems, a good solution is virtual environment with a gcc maybe 5.5. If the The gcc/g++ version is 4.* that you can try to change the compile cmd in BUILD file, about the flag -D_GLIBCXX_USE_CXX11_ABI=0 or -D_GLIBCXX_USE_CXX11_ABI=1 for 4.* or 5.*)