Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build tf_mesh_renderer error #3

Open
ZhengMengbin opened this issue Mar 18, 2020 · 33 comments
Open

build tf_mesh_renderer error #3

ZhengMengbin opened this issue Mar 18, 2020 · 33 comments

Comments

@ZhengMengbin
Copy link

When I bulit tf_mesh_renderer using runtests.sh, it failed:
46724C3F-CAF7-4B4C-B1A7-C2D1BFBC5384_4_5005_c
Can you give me some help?
I use two codes to build bazel-2.2.0 as follows:
chmod +x bazel-<version>-installer-linux-x86_64.sh
./bazel-<version>-installer-linux-x86_64.sh --user

@ZhengMengbin
Copy link
Author

I had solved it.

@hflserdaniel
Copy link

I had solved it.

I've got the same issue. How did you solve it?

@ZhengMengbin
Copy link
Author

@hflserdaniel 我直接说中文吧,英文说着不好准确表达怎么解决这问题。
这个问题主要是没有找到ltensorflow_framework导致的,估计作者是自行编译安装的tensorflow,而不是pip安装的(虽然作者给的环境配置是pip安装的,我猜的);你可以在tensorflow安装文件夹中查找一下(百度find指令)libtensorflow_framework.so.1该文件的路径,然后把该文件cp一份到usr/lib/目录下,然后进行软链接生成libtensorflow_framework.so,就不会报错了(可参见https://blog.csdn.net/songyu0120/article/details/46931329)

@kryzhikov
Copy link

kryzhikov commented Apr 3, 2020

@hflserdaniel 我直接说中文吧,英文说着不好准确表达怎么解决这问题。
这个问题主要是没有找到ltensorflow_framework导致的,估计作者是自行编译安装的tensorflow,而不是pip安装的(虽然作者给的环境配置是pip安装的,我猜的);你可以在tensorflow安装文件夹中查找一下(百度find指令)libtensorflow_framework.so.1该文件的路径,然后把该文件cp一份到usr/lib/目录下,然后进行软链接生成libtensorflow_framework.so,就不会报错了(可参见https://blog.csdn.net/songyu0120/article/details/46931329)

Hi, Can you describe your way to solve this problem in english (or you can contact with me in telegram @kirizhik)? @ZhengMengbin

@kryzhikov
Copy link

sh_renderer usin

And is it possible for u, to share your colab notebook(if you are running it there) @ZhengMengbin

@ZhengMengbin
Copy link
Author

@KirillR911 This problem is mainly caused by not finding ltensorflow_framework. I guess that author installed tensorflow by compiling from source , not pip install tensorflow (although the environment configuration given by the author is pip install tensorflow ). If you use pip to install tensorflow, you should copy libtensorflow_framework.so.1 to /usr/lib/ directory (ie, using command cp xx/libtensorflow_framework.so.1 /usr/lib/, xx is the path of libtensorflow_framework.so.1, you can find it in the installation path, such as 'xx/anaconda3/envs/xx/lib/pythonx.x/site-packages/tensorflow/'). And then perform a soft link to generate libtensorflow_framework.so (ie, using command cd /usr/lib/ and ln -s libtensorflow_framework.so.1 libtensorflow_framework.so)

@ZhengMengbin ZhengMengbin reopened this Apr 4, 2020
@kryzhikov
Copy link

@KirillR911 This problem is mainly caused by not finding ltensorflow_framework. I guess that author installed tensorflow by compiling from source , not pip install tensorflow (although the environment configuration given by the author is pip install tensorflow ). If you use pip to install tensorflow, you should copy libtensorflow_framework.so.1 to /usr/lib/ directory (ie, using command cp xx/libtensorflow_framework.so.1 /usr/lib/, xx is the path of libtensorflow_framework.so.1, you can find it in the installation path, such as 'xx/anaconda3/envs/xx/lib/pythonx.x/site-packages/tensorflow/'). And then perform a soft link to generate libtensorflow_framework.so (ie, using command cd /usr/lib/ and ln -s libtensorflow_framework.so.1 libtensorflow_framework.so)

Thank's, but now i'm facing this error
ImportError: cannot import name 'export_saved_model'

FULL:

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //mesh_renderer:mesh_renderer_test
-----------------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/8d5835d98c81d3bd4a7205f651f7a144/sandbox/processwrapper-sandbox/31/execroot/tf_mesh_renderer/bazel-out/k8-fastbuild/bin/mesh_renderer/mesh_renderer_test.runfiles/tf_mesh_renderer/mesh_renderer/mesh_renderer_test.py", line 23, in <module>
    import tensorflow as tf
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/__init__.py", line 83, in <module>
    from tensorflow.python import keras
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/__init__.py", line 26, in <module>
    from tensorflow.python.keras import activations
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/activations.py", line 24, in <module>
    from tensorflow.python.keras.utils.generic_utils import deserialize_keras_object
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/__init__.py", line 39, in <module>
    from tensorflow.python.keras.utils.multi_gpu_utils import multi_gpu_model
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/multi_gpu_utils.py", line 22, in <module>
    from tensorflow.python.keras.engine.training import Model
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py", line 40, in <module>
    from tensorflow.python.keras.engine import network
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/network.py", line 39, in <module>
    from tensorflow.python.keras import saving
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/saving/__init__.py", line 33, in <module>
    from tensorflow.python.keras.saving.saved_model import export_saved_model
ImportError: cannot import name 'export_saved_model'

but when i am trying to
import tensorflow as tf everything is OK
Haven't you faced this problem

@kryzhikov
Copy link

Well from now i can't even get access to this file, getting error:
cp: cannot stat '/usr/local/lib/python3.6/dist-packages/tensorflow/libtensorflow_framework.so.1': No such file or directory

that is after installing through project reqs, when i am instlalling myself,
the directory of tf now is /tensorflow-1.15.2/python3.6/tensorflow/, but facing the same problem.

@ZhengMengbin
Copy link
Author

@KirillR911 Can you find 'libtensorflow_framework.so.x' or 'libtensorflow_framework.so'?

@kryzhikov
Copy link

@ZhengMengbin
Thanks!
Finally managed to pass runtests.
I needed to uninstall factory colab tf and installed tansorflow-gpu=14.0.0 after int needed file appeared and i managed to run it!
That's what i did to run it.
image

@hflserdaniel
Copy link

@hflserdaniel 我直接说中文吧,英文说着不好准确表达怎么解决这问题。
这个问题主要是没有找到ltensorflow_framework导致的,估计作者是自行编译安装的tensorflow,而不是pip安装的(虽然作者给的环境配置是pip安装的,我猜的);你可以在tensorflow安装文件夹中查找一下(百度find指令)libtensorflow_framework.so.1该文件的路径,然后把该文件cp一份到usr/lib/目录下,然后进行软链接生成libtensorflow_framework.so,就不会报错了(可参见https://blog.csdn.net/songyu0120/article/details/46931329)

你好,通过这个方案解决了找不到.so文件的问题,但是编译仍然失败,提示undefined symbol,可能和bazel版本有?我是直接通过conda install安装了0.29.1版本的bazel,可以请教下你安装的过程和版本吗?

@ZhengMengbin
Copy link
Author

ZhengMengbin commented Apr 12, 2020

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

@hflserdaniel
Copy link

hflserdaniel commented Apr 13, 2020

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

@ZhengMengbin
Copy link
Author

ZhengMengbin commented Apr 13, 2020

@hflserdaniel 编译c/c++的工具gcc版本的问题,你看看你的gcc版本是否大于4(命令gcc --version查看),如果大于4,则去掉这行编译代码中的-D_GLIBCXX_USE_CXX11_ABI = 0选项或者设置为-D_GLIBCXX_USE_CXX11_ABI = 1,然后重新编译

@wangzheliu
Copy link

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

你好,你的问题解决了吗,我也出现一样的错误

@iloveOREO
Copy link

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

你好,你的问题解决了吗,我也出现一样的错误

我也遇到了一样的问题。我自己的环境是tensorflow 1.12,升级到1.14重新链接一下前面的.so,再编译就都通过了。

@Msj5
Copy link

Msj5 commented Jan 6, 2021

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

你好,你的问题解决了吗,我也出现一样的错误

我也遇到了一样的问题。我自己的环境是tensorflow 1.12,升级到1.14重新链接一下前面的.so,再编译就都通过了。

您好,我按照上述的方法怎么编译都有问腿,麻烦您能提供一下编译后的rasterize_triangles_kernel.so文件嘛?万分感谢。邮箱:[email protected]

@iloveOREO
Copy link

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

你好,你的问题解决了吗,我也出现一样的错误

我也遇到了一样的问题。我自己的环境是tensorflow 1.12,升级到1.14重新链接一下前面的.so,再编译就都通过了。

您好,我按照上述的方法怎么编译都有问腿,麻烦您能提供一下编译后的rasterize_triangles_kernel.so文件嘛?万分感谢。邮箱:[email protected]

不好意思。这个我测试的效果比较一般,生成人脸抖动的很厉害,所以已经删掉了。你可以再尝试一下

@Msj5
Copy link

Msj5 commented Jan 6, 2021

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

你好,你的问题解决了吗,我也出现一样的错误

我也遇到了一样的问题。我自己的环境是tensorflow 1.12,升级到1.14重新链接一下前面的.so,再编译就都通过了。

您好,我按照上述的方法怎么编译都有问腿,麻烦您能提供一下编译后的rasterize_triangles_kernel.so文件嘛?万分感谢。邮箱:[email protected]

不好意思。这个我测试的效果比较一般,生成人脸抖动的很厉害,所以已经删掉了。你可以再尝试一下

万分感谢回复,请问您有遇到下面这个问题嘛?ERROR:tf_mesh_renderer/mesh_renderer/kernels/BUILD:20:1: Executing genrule //mesh_renderer/kernels:rasterize_triangles_kernel failed (Exit 127) bash failed: error executing command /bin/bash -c … (remaining 1 argument(s) skipped),多有叨扰,万分感谢!

@iloveOREO
Copy link

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

你好,你的问题解决了吗,我也出现一样的错误

我也遇到了一样的问题。我自己的环境是tensorflow 1.12,升级到1.14重新链接一下前面的.so,再编译就都通过了。

您好,我按照上述的方法怎么编译都有问腿,麻烦您能提供一下编译后的rasterize_triangles_kernel.so文件嘛?万分感谢。邮箱:[email protected]

不好意思。这个我测试的效果比较一般,生成人脸抖动的很厉害,所以已经删掉了。你可以再尝试一下

万分感谢回复,请问您有遇到下面这个问题嘛?ERROR:tf_mesh_renderer/mesh_renderer/kernels/BUILD:20:1: Executing genrule //mesh_renderer/kernels:rasterize_triangles_kernel failed (Exit 127) bash failed: error executing command /bin/bash -c … (remaining 1 argument(s) skipped),多有叨扰,万分感谢!

我好像没有遇到这个问题,我把自己遇到的问题和解决方法邮件回复您了,您可以参考一下。

@Chilydream
Copy link

我也遇到了这个问题
image
但我的运行环境没有root权限,不能直接将库加入到/usr/lib下解决。
我最后是新建了一个文件夹,将libtensorflow_framework.so.1拷入新文件夹中,并建立软链接。然后使用export命令将这个文件夹加入到LD_LIBRARY_PATH和LIBRARY_PATH中,最后再在runtest.sh的bazel语句中加入这一项,--action_env=LIBRARY_PATH。

@15458wew
Copy link

@ilove

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

你好,你的问题解决了吗,我也出现一样的错误

我也遇到了一样的问题。我自己的环境是tensorflow 1.12,升级到1.14重新链接一下前面的.so,再编译就都通过了。

您好,我按照上述的方法怎么编译都有问腿,麻烦您能提供一下编译后的rasterize_triangles_kernel.so文件嘛?万分感谢。邮箱:[email protected]

不好意思。这个我测试的效果比较一般,生成人脸抖动的很厉害,所以已经删掉了。你可以再尝试一下

万分感谢回复,请问您有遇到下面这个问题嘛?ERROR:tf_mesh_renderer/mesh_renderer/kernels/BUILD:20:1: Executing genrule //mesh_renderer/kernels:rasterize_triangles_kernel failed (Exit 127) bash failed: error executing command /bin/bash -c … (remaining 1 argument(s) skipped),多有叨扰,万分感谢!

我好像没有遇到这个问题,我把自己遇到的问题和解决方法邮件回复您了,您可以参考一下。

万分感谢,我遇到了以下问题,您能给我一些参考回答吗
ERROR: /home/research/.cache/bazel/_bazel_research/5b8c8045b34c2ba9a89ac5750f4648b0/external/com_google_googletest/BUILD.bazel:67:11: Compiling googletest/src/gtest-matchers.cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 33 argument(s) skipped)

我的邮箱是[email protected]

@LunaMK
Copy link

LunaMK commented Apr 17, 2021

I've the same issue in colab

  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/load_library.py", line 58, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /content/gdrive/My Drive/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs

  • try to change -D_GLIBCXX_USE_CXX11_ABI = 1 i mesh_renderer/kernelsbut not work
  • try to install !pip install tensorflow==2.2.0 ,tensorflow-text==2.2.0 and didn't work
    Can you give me some help?

@iloveOREO
Copy link

I've the same issue in colab

  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/load_library.py", line 58, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /content/gdrive/My Drive/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
  • try to change -D_GLIBCXX_USE_CXX11_ABI = 1 but not work
  • try to install !pip install tensorflow==2.2.0 ,tensorflow-text==2.2.0 and didn't work
    Can you give me some help?

Maybe you should try tensorflow-gpu=1.14.0. It works in my case.

@LunaMK
Copy link

LunaMK commented Apr 17, 2021

I've the same issue in colab

  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/load_library.py", line 58, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /content/gdrive/My Drive/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
  • try to change -D_GLIBCXX_USE_CXX11_ABI = 1 but not work
  • try to install !pip install tensorflow==2.2.0 ,tensorflow-text==2.2.0 and didn't work
    Can you give me some help?

Maybe you should try tensorflow-gpu=1.14.0. It works in my case.
I tried it and not work

@Msj5
Copy link

Msj5 commented Apr 27, 2021 via email

@LunaMK
Copy link

LunaMK commented Apr 27, 2021

@Msj5 thx for reply but I did not understand what you mean
if you mean that should to install tensorflow-gpu==1.12.0 but ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.12.0

@unanan
Copy link

unanan commented Jun 28, 2021

@hflserdaniel 我直接说中文吧,英文说着不好准确表达怎么解决这问题。
这个问题主要是没有找到ltensorflow_framework导致的,估计作者是自行编译安装的tensorflow,而不是pip安装的(虽然作者给的环境配置是pip安装的,我猜的);你可以在tensorflow安装文件夹中查找一下(百度find指令)libtensorflow_framework.so.1该文件的路径,然后把该文件cp一份到usr/lib/目录下,然后进行软链接生成libtensorflow_framework.so,就不会报错了(可参见https://blog.csdn.net/songyu0120/article/details/46931329)

I solve this problem by assign :

ln -s /root/env/lib/python3.7/site-packages/tensorflow/libtensorflow_framework.so.1 /root/env/lib/python3.7/site-packages/tensorflow/libtensorflow_framework.so

export  LD_LIBRARY_PATH=/root/env/lib/python3.7/site-packages/tensorflow/:$LD_LIBRARY_PATH

Under /root/env/lib/python3.7/site-packages/tensorflow/ there is the tensorflow_framework.so.1

@muxiddin19
Copy link

muxiddin19 commented Dec 27, 2021

ln: failed to create symbolic link 'libtensorflow_framework.so': File exists
rasterize_triangles_grad.cc:18:10: fatal error: tensorflow/core/framework/op.h: No such file or directory
#include "tensorflow/core/framework/op.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
rasterize_triangles_op.cc:19:10: fatal error: tensorflow/core/framework/op.h: No such file or directory
#include "tensorflow/core/framework/op.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

After following above-mentioned suggestions, I face this problem. Please, can you give any solutions?

@muxiddin19
Copy link

When I bulit tf_mesh_renderer using runtests.sh, it failed: 46724C3F-CAF7-4B4C-B1A7-C2D1BFBC5384_4_5005_c Can you give me some help? I use two codes to build bazel-2.2.0 as follows: chmod +x bazel-<version>-installer-linux-x86_64.sh ./bazel-<version>-installer-linux-x86_64.sh --user

Hi, how could you run these codes? I am trying to run them on a Google Colab demo notebook, but I face these problem?

!chmod +x bazel-0.0.0.20200723-installer-linux-x86_64.sh --> chmod: cannot access 'bazel-0.0.0.20200723-installer-linux-x86_64.sh': No such file or directory

!./bazel-0.0.0.20200723-installer-linux-x86_64.sh --user --> /bin/bash: ./bazel-0.0.0.20200723-installer-linux-x86_64.sh: No such file or directory

@e3u3
Copy link

e3u3 commented Mar 8, 2022

@erikaemma
Copy link

ln: failed to create symbolic link 'libtensorflow_framework.so': File exists rasterize_triangles_grad.cc:18:10: fatal error: tensorflow/core/framework/op.h: No such file or directory #include "tensorflow/core/framework/op.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. rasterize_triangles_op.cc:19:10: fatal error: tensorflow/core/framework/op.h: No such file or directory #include "tensorflow/core/framework/op.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.

After following above-mentioned suggestions, I face this problem. Please, can you give any solutions?

请问解决了吗?我在windows上安装mesh_renderer也遇到了不支持windows的情况。我下载源码使用mingw编译,然后报了相同的错误,问题是我在上面的提示命令行中发现路径是正确的、op.h也确实存在

@piwawa
Copy link

piwawa commented Dec 3, 2023

@hflserdaniel 版本没有太大问题,是因为bazel生成的.so文件不会存放在作者指定的路径下(见作者指定的路径,你可以修改这个路径到生成的.so路径下,或者移动/复制生成的librasterize_triangles_impl.so和rasterize_triangles_kernel.so到这个路径下,生成到.so文件应该在xx/tf_mesh_renderer/bazel-tf_mesh_renderer/mesh_renderer/kernels或者xx/tf_mesh_renderer/bazel-bin/mesh_renderer/kernels下,你仔细找一找,不一定完全是我说的路径)

感谢回复!将所述位置的so文件放入指定路径中,老问题仍然存在。具体描述:rasterize_triangles_impl_test通过,其余报错,日志提示tensorflow.python.framework.errors_impl.NotFoundError: /data3/wcy/Audio-driven-TalkingFace-HeadPose/Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_kernel.so: undefined symbol: _ZN10tensorflow12OpDefBuilder4AttrESs
个人编译方面的经验较少,还请大佬见谅!

你好,你的问题解决了吗,我也出现一样的错误

我也遇到了一样的问题。我自己的环境是tensorflow 1.12,升级到1.14重新链接一下前面的.so,再编译就都通过了。

您好,我按照上述的方法怎么编译都有问腿,麻烦您能提供一下编译后的rasterize_triangles_kernel.so文件嘛?万分感谢。邮箱:[email protected]

不好意思。这个我测试的效果比较一般,生成人脸抖动的很厉害,所以已经删掉了。你可以再尝试一下

万分感谢回复,请问您有遇到下面这个问题嘛?ERROR:tf_mesh_renderer/mesh_renderer/kernels/BUILD:20:1: Executing genrule //mesh_renderer/kernels:rasterize_triangles_kernel failed (Exit 127) bash failed: error executing command /bin/bash -c … (remaining 1 argument(s) skipped),多有叨扰,万分感谢!

这个你咋解决的?我也被这个报错折磨中。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests