pointnet2 icon indicating copy to clipboard operation
pointnet2 copied to clipboard

compile error on running tf_sampling_compile.sh

Open amiltonwong opened this issue 6 years ago • 13 comments

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!

amiltonwong avatar May 02 '18 15:05 amiltonwong

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

mf27 avatar May 23 '18 14:05 mf27

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!

WenshuangSong avatar Jun 19 '18 05:06 WenshuangSong

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 avatar Jun 24 '18 08:06 romanskie

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.

romanskie avatar Jun 25 '18 10:06 romanskie

Maybe you should check your path for tensorflow.

chenjunboBUPT avatar Sep 25 '18 06:09 chenjunboBUPT

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

leejiajun avatar Nov 12 '18 12:11 leejiajun

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

iris0329 avatar Feb 25 '19 09:02 iris0329

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"

MPashaei avatar Mar 19 '20 14:03 MPashaei

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,

mhs1212010 avatar Sep 29 '20 10:09 mhs1212010

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?

prajaktasurvase6 avatar Oct 06 '20 17:10 prajaktasurvase6

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 avatar Dec 14 '20 07:12 AllenPu

�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.

AllenPu avatar Dec 14 '20 07:12 AllenPu

@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

aradhyamathur avatar Apr 04 '22 16:04 aradhyamathur