tencent-ailab / hifi3dface

Code and data for our paper "High-Fidelity 3D Digital Human Creation from RGB-D Selfies".
Other
756 stars 153 forks source link

undefined symbol error in the generated .so library #6

Closed Barry-Liang closed 3 years ago

Barry-Liang commented 3 years ago

When run the run_opt_rgbd.sh, this error occured: step 4: prefit Albedo_Global uv Traceback (most recent call last): File "step4A_prefit_Albedo_Global.py", line 44, in <module> from utils.project import Projector File "../../utils/project.py", line 39, in <module> from third_party.rasterize_triangles import rasterize_clip_space File "../../third_party/rasterize_triangles.py", line 29, in <module> os.path.join(dirname, "kernels/rasterize_triangles_kernel.so") File "/home/liangxiao/anaconda3/envs/3dface/lib/python3.6/site-packages/tensorflow_core/python/framework/load_library.py", line 61, in load_op_library lib_handle = py_tf.TF_LoadLibrary(library_filename) tensorflow.python.framework.errors_impl.NotFoundError: ../../third_party/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs (step 4) prefit uv failed However, the rasterize_triangles_kernel.so has been successfully generated by running the install.sh.

Barry-Liang commented 3 years ago

I was using tensorflow-gpu=1.15 installed by conda. This error is solved by reinstalling the tensorflow-gpu=1.15 by pip(overwrite) instead of conda.

Barry-Liang commented 3 years ago

In my cae, the tensorflow_framework library file's name was not libtensorflow_framework.so but libtensorflow_framework.so.1. The tensorflow version is 1.15.0.

I just made symbolic link for it and the problem has gone.

$ cd ~/anaconda3/envs/3dface/lib/python3.6/site-packages/tensorflow_core $ ln -s libtensorflow_framework.so.1 libtensorflow_framework.so

Also some errors: ./optimization/rgbd/step2_sparse_fusion.py from utils.ply import write_ply, write_obj ----> from third_party.ply import write_ply, write_obj

./optimization/rgbd/step3_prefit_shape.py from utils.ply import write_ply ----> from third_party.ply import write_ply

./optimization/rgbd/step4B_prefit_bfm_rgb.py from utils.ply import write_ply, write_obj ----> from third_party.ply import write_ply, write_obj

sh run_opt_rgbd.sh ---> bash run_opt_rgbd.sh

sh command causes problems when encounter [ symbol or == in the .sh file.

Barry-Liang commented 3 years ago

One more problem, the readme file said that "If your g++ version is greater than 4, please delete "-D_GLIBCXX_USE_CXX11_ABI=0" ( Line 9 ) in install.sh". However, on my other computer with g++=7.5, the undefined symbol error occurred again. Then I add the line back, the error is gone.