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

compile error on running tf_sampling_compile.sh #36

Open
amiltonwong opened this issue May 2, 2018 · 13 comments
Open

compile error on running tf_sampling_compile.sh #36

amiltonwong opened this issue May 2, 2018 · 13 comments

Comments

@amiltonwong
Copy link

Hi, authors,

I got error when I compile the fps code by commands:
sh tf_sampling_compile.sh

Here is the error log:

tf_sampling.cpp:6:42: fatal error: tensorflow/core/framework/op.h: No such file or directory
compilation terminated.

My system is ubuntu 16.04, with tf1.4 (python 2.7.14)

Any suggestion to fix it? THX!

@mf27
Copy link

mf27 commented May 23, 2018

Please check if you updated the compile script according to:
https://github.com/charlesq34/pointnet2#compile-customized-tf-operators

@WenshuangSong
Copy link

My system is ubuntu 16.04, with tf1.6, cuda9.1 (python 2.7.14)
And the same issues,
should I install cuda8.0 or tf 1.2 ?
ths!

@romanskie
Copy link

Hey Guys,
any solution on that?
Got the same issue on Ubuntu 16.04. I already tested with TF 1.4 (Cuda 8) and TF 1.8 (Cuda 8 / Cuda 9) on Python 2.7 plus Python 3.5 as well, but it did not work out. Maybe there is some sort oft work around here to make it work? I already tried the compile script modifications from the readme.

BG, Roman

@romanskie
Copy link

Hey, I was able to solve my problem. Somehow my local TF path was not the same as used in the .sh script, which leads to the "missing" c++ header files. Maybe I messed up the installation of TF with pip.

Changed the -I /usr/local/lib/python2.7/dist-packages/tensorflow/include in the script to /home/$MYUSERNAME/.local/lib/python2.7/site-packages/tensorflow/include and it worked.

@chenjunboBUPT
Copy link

Maybe you should check your path for tensorflow.

@leejiajun
Copy link

you should check your path for tensorflow.
dist-packages or site-packages
I made a mistake in spelling, GOD.

@iris0329
Copy link

as leejiajun said,
in tf sampling compile.sh file, change your tensorflow path. for example, I am using virtual env, so I change /usr/local/lib/python2.7/dist-packages/tensorflow/include to /....../py2/venv_python2.7/lib/python2.7/site-packages/tensorflow/include(my tensorflow path)
such changes will work

@MPashaei
Copy link

MPashaei commented Mar 19, 2020

Hey Guys

I am using Google colab to run the code. I installed tensorflow-gpu==2.0.0-beta1. I just changed the tensorflow path in .sh files and .cpp files.
I am getting the error below.
tf_sampling.cpp:6:10: fatal error: /usr/local/lib/python3.6/dist-packages/tensorflow/core/framework/op.h: No such file or directory
#include "/usr/local/lib/python3.6/dist-packages/tensorflow/core/framework/op.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
I am wondering if I should change the tensorflow path in .cpp files as well.

When I use the same path in .cpp files, I still get the same error

tf_sampling.cpp:6:10: fatal error: tensorflow/core/framework/op.h: No such file or directory
#include "tensorflow/core/framework/op.h"

@mhs1212010
Copy link

hello
python singleton.py conll05_final_wsj
Traceback (most recent call last):
File "singleton.py", line 16, in
from srl_model import SRLModel
File "/home/moh/Desktop/unisrl-master/srl_model.py", line 15, in
from model_utils import *
File "/home/moh/Desktop/unisrl-master/model_utils.py", line 6, in
import srl_ops
File "/home/moh/Desktop/unisrl-master/srl_ops.py", line 4, in
srl_op_library = tf.load_op_library("./srl_kernels.so")
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 58, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.py", line 516, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: ./srl_kernels.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev

My system is ubuntu 16.04, with tf1.8, cuda9.1 (python 2.7.14)
And the same issues,

@prajaktasurvase6
Copy link

Hey Guys

I am using Google colab to run the code. I installed tensorflow-gpu==2.0.0-beta1. I just changed the tensorflow path in .sh files and .cpp files.
I am getting the error below.
tf_sampling.cpp:6:10: fatal error: /usr/local/lib/python3.6/dist-packages/tensorflow/core/framework/op.h: No such file or directory
#include "/usr/local/lib/python3.6/dist-packages/tensorflow/core/framework/op.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
I am wondering if I should change the tensorflow path in .cpp files as well.

When I use the same path in .cpp files, I still get the same error

tf_sampling.cpp:6:10: fatal error: tensorflow/core/framework/op.h: No such file or directory
#include "tensorflow/core/framework/op.h"

Did you get any solution?

@AllenPu
Copy link

AllenPu commented Dec 14, 2020

�I have a quick solution, under your virtual environment and run : python
then import tensorflow as tf; tf.path;
find your tensorflow path and change the first -I path from “/usr/local/lib/python2.7/dist-packages/tensorflow/include” to the path returned before.

@AllenPu
Copy link

AllenPu commented Dec 14, 2020

�I have a quick solution, under your virtual environment and run : python
then import tensorflow as tf; tf.path;
find your tensorflow path and change the first -I path from “/usr/local/lib/python2.7/dist-packages/tensorflow/include” to the path returned before.

also useful for the other code based on pointnet: frsutum pointnet and so on.

@aradhyamathur
Copy link

aradhyamathur commented Apr 4, 2022

@prajaktasurvase6 it seems that when I checked in docker which I was using as setup for this , the include folder was in tensorflow_core, so in the compilation script I had to change the path to tensorflow_core/include , it did resolve the issue you pointed out but led to another issue pointed out by @mhs1212010 here

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