LOL icon indicating copy to clipboard operation
LOL copied to clipboard

About the code compiling under ubuntu18

Open PigletPh opened this issue 4 years ago • 14 comments

The work is excellent.But I compiled the code,there were some problems(catkin build segmapper).My environment : cuda9.0+cudnn7.1+gcc4.8.5.

PigletPh avatar Oct 06 '21 09:10 PigletPh

Hey @jiu876,

could you provide more details regarding the problem?

RozDavid avatar Oct 06 '21 09:10 RozDavid

the error is /usr/include/boost/math/special_functions/zeta.hpp:873:3344: error: unable to find numeric literal operator ‘operator""Q’.

PigletPh avatar Oct 07 '21 06:10 PigletPh

Could you try with more recent compiler version? After a bit of googling I found this error to be fixed by gcc-7

RozDavid avatar Oct 07 '21 06:10 RozDavid

Could you try with more recent compiler version? After a bit of googling I found this error to be fixed by gcc-7

I have tried and I could't compile the tensorflow1.8 if used gcc-7.

PigletPh avatar Oct 07 '21 06:10 PigletPh

Could you post your error message then for tensorflow failing with gcc-7? Your compiler version is pretty obsolete and I don't see any reason not to update.

Update: Just checked and the original TF 1.8 build instuction indeed says gcc 4.8. In case it doesn't work with 7, please try later TF version, e.g 1.15.0. I was testing only with Ubuntu 16, so not sure about the specific cross-package dependencies in your case, but it definitely should work.

RozDavid avatar Oct 07 '21 06:10 RozDavid

Thanks.I re-built tensorflow 1.8.0 with the below command and re-installed. bazel build --config=opt --define framework_shared_object=true tensorflow:libtensorflow_cc.so

However, the only error happens. Can you guess what is the problem?

Thank you, 45130681-95384780-b1c4-11e8-8794-4e8fa3ee0120

PigletPh avatar Oct 07 '21 08:10 PigletPh

This issue might be a solution for your problem

RozDavid avatar Oct 07 '21 08:10 RozDavid

This issue might be a solution for your problem hi,I tried the method you mentioned, and the same undefined error was reported. Do you have a problem with my compilation steps? 1、 bazel build --config=opt --config=cuda --define framework_shared_object=true tensorflow:libtensorflow_cc.so (Modify the library file path) 2、catkin build tensorflow_ros_cpp -DFORCE_TF_PIP_SEARCH="OFF" -DFORCE_TF_BAZEL_SEARCH="ON" 3、catkin build segmapper The first two have been successfully compiled, only the last step still has problems.

PigletPh avatar Oct 08 '21 07:10 PigletPh

I think you need to scroll a bit more in the thread to have the correct solution. The build command you referring to still had linking problems. have you copied the .cc file manually? Or can you check the referenced commit

RozDavid avatar Oct 08 '21 08:10 RozDavid

I think you need to scroll a bit more in the thread to have the correct solution. The build command you referring to still had linking problems. have you copied the .cc file manually? Or can you check the referenced commit

I copy the file libtensorflow_framework.so into devel/lib,I don't understand which .cc file you are talking about

PigletPh avatar Oct 08 '21 08:10 PigletPh

I don't have an Ubuntu 18 to test it myself, but please follow the thread carefully. You have to delete libtensorflow_framework.so* from devel/lib , while being on the correct commit. What I meant with the .cc file was the framework.cc. copying this into the devel folder could be also a solution that worked for them. Also, check this comment for installing possible missing packages.

RozDavid avatar Oct 08 '21 08:10 RozDavid

the file framework.cc is in the ensorflow-r1.8/bazel-bin/tensorflow?But I can't find the file in it and how I can get it?Thanks!

PigletPh avatar Oct 08 '21 08:10 PigletPh

Which commit are you on? You can try replacing the included package in this repo with a submodule pointing at 1df7740 and make a clean build with that without copying anything.

RozDavid avatar Oct 08 '21 08:10 RozDavid

Which commit are you on? You can try replacing the included package in this repo with a submodule pointing at 1df7740 and make a clean build with that without copying anything.

I also have tried but the error is the same as before.The file framework.cc is still not found.The problem is confused me too long.

PigletPh avatar Oct 08 '21 11:10 PigletPh