-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[libtorch] Catkin_make compilation error #14352
Comments
Turns out that I have to add But Cmake will complain that caffe2 is added twice.
|
@cindycia Hi. I am trying to compile my ROS workspace along with libtorch and I face linking errors with ros when I add find_package(Torch REQUIRED) in my CMakeLists.txt . Did you face similar problems? |
I got the same error in a different situation. I solved it by moving "find_package(Torch REQUIRED)" into my top-level CMakeLists.txt. More details: I have src/ and test/ directories, and previously compiled all my src code into a static library, and then linked this library into my test executable. I got the above error when I had find_package(Torch REQUIRED) in src/CMakeLists.txt but not in test/CMakeLists.txt. |
@siddheshmhatre Hi, I face the same problem as you, did you find how to solve it? Thanks! |
Hey, |
I got totally opposite errors. I can find libtorch, but once link it, it will wipe out catkin libs and got some my cmakelists:
|
HI !!Have you solved this problem? run_model.cpp:(.text+0xf2):undefined reference to ‘ros::init(int&, char**, std::string const&, unsigned int)’ I had exactly the same problem, and I was very anxious.And I sent you an email, I hope you can see it. |
Hi @
Hi ,Have you solved the problem? ,I met the same problem, looking forward to you help, thank you!
Hi ,Have you solved the problem? ,I met the same problem, looking forward to you help, thank you! |
I am trying to use libtorch to my catkin project.
One of my package A links with libtorch.so and can be successfually compiled as a static library A.a.
Then I try to linked A.a to another package B.
When I run catkin_make, the following error comes out:
My CMakeLists.txt in package A contains something like
And CMakeLists.txt in package B calls:
The error comes during the cmake generation stage where the configuration is done but the compilation hasn't started yet.
Only package A in my catkin workspace is using libtorch.
System configuration:
Originally posted by @cindycia in https://github.com/pytorch/pytorch/issue_comments#issuecomment-441210189
The text was updated successfully, but these errors were encountered: