GithubHelp home page GithubHelp logo

linking errors about gcnv2_slam HOT 10 CLOSED

jiexiong2016 avatar jiexiong2016 commented on July 18, 2024
linking errors

from gcnv2_slam.

Comments (10)

1171257311 avatar 1171257311 commented on July 18, 2024

i have solved it,first you must install pytorch from source,dont install from Binaries,you should
follow this: git clone --recursive -b v1.0.1 https://github.com/pytorch/pytorch
pay attention,v1.0.1.
(In china,the speed is very slow,be patient! And 9:00~10:00 everyday,the speed seem to be faster. )
and run :python ../tools/build_libtorch.py
you will see libtorch.so in pytorch/torch/lib/tmp_install/lib.
then ,you should modify build.sh : -DTORCH_PATH=/home//pytorch/torch/lib/tmp_install/share/cmake/Torch.(a little different from origin directory)
you should see many .cmake files under this directory(/home/
/pytorch/torch/lib/tmp_install/share/cmake) ,including Caffe2 ,Torch.
Then ,run build.sh.No error!
if you have any question,tell me

from gcnv2_slam.

cumtchenchang avatar cumtchenchang commented on July 18, 2024

@1171257311 I followed your steps, but still have error in the final.
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^
[100%] Linking CXX executable ../GCN2/rgbd_gcn
/usr/bin/ld: warning: libopencv_core.so.2.4, needed by //usr/lib/x86_64-linux-gnu/libavfilter-ffmpeg.so.5, may conflict with libopencv_core.so.3.3
../lib/libORB_SLAM2.so: undefined reference to torch::jit::GraphExecutor::run(std::vector<c10::IValue, std::allocator<c10::IValue> >&)' ../lib/libORB_SLAM2.so: undefined reference to torch::autograd::Variable::Impl::Impl(at::Tensor, bool, torch::autograd::Edge)'
../lib/libORB_SLAM2.so: undefined reference to torch::jit::GraphExecutor::GraphExecutor(std::shared_ptr<torch::jit::Graph>, bool)' ../lib/libORB_SLAM2.so: undefined reference to torch::jit::load(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, c10::optionalc10::Device)'
../lib/libORB_SLAM2.so: undefined reference to `torch::jit::Value::uniqueNameBaseabi:cxx11 const'
collect2: error: ld returned 1 exit status
CMakeFiles/rgbd_gcn.dir/build.make:166: recipe for target '../GCN2/rgbd_gcn' failed
make[2]: *** [../GCN2/rgbd_gcn] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/rgbd_gcn.dir/all' failed
make[1]: *** [CMakeFiles/rgbd_gcn.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

from gcnv2_slam.

1171257311 avatar 1171257311 commented on July 18, 2024

是使用这个指令安装的吗? git clone --recursive -b v1.0.1 https://github.com/pytorch/pytorch
还有麻烦发一下你的配置,我的配置:
my setup:
ubuntu 16.04
gcc 5.4.0
g++ 5.4.0
cmake 3.11.3
pytorch 1.1.0
cuda 9.2

from gcnv2_slam.

cumtchenchang avatar cumtchenchang commented on July 18, 2024

是的 是按照git clone --recursive -b v1.0.1 https://github.com/pytorch/pytorch进行下载的,
然后python ../tools/build_libtorch.py,之后将-DTORCH_PATH=改成了我自己的路径。
ubuntu 16.04
gcc 5.4.0
g++ 5.4.0
cmake 3.10.1
pytorch 1.0.1
cuda 9.0.176

from gcnv2_slam.

cumtchenchang avatar cumtchenchang commented on July 18, 2024

@jiexiong2016 请问作者之前遇到这种问题吗?不知道能不能解决一下,谢谢

from gcnv2_slam.

1171257311 avatar 1171257311 commented on July 18, 2024

这个问题倒是没见过,另外安装的是1.0.1,为什么你的变成了1.1.0,你的pytorch/torch/lib/tmp_install/lib目录下有libtorch.so 文件吗?

from gcnv2_slam.

cumtchenchang avatar cumtchenchang commented on July 18, 2024

@1171257311 pytorch是1.0.1 我的系统还有pip安装的pytorch,刚刚误把版本写成了那个。pytorch/torch/lib/tmp_install/lib目录下有libtorch.so 文件。
Selection_063

from gcnv2_slam.

1171257311 avatar 1171257311 commented on July 18, 2024

你的opencv版本是多少?

from gcnv2_slam.

1171257311 avatar 1171257311 commented on July 18, 2024

还有你的系统安装了使用pip安装的pytorch,有可能会冲突,建议删除,只保留一个通过源码安装的。

from gcnv2_slam.

cumtchenchang avatar cumtchenchang commented on July 18, 2024

我已经卸载了,opencv版本是3.3.1

from gcnv2_slam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.