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

Catkin Build failed #1

Closed
yoshida-e opened this issue Oct 31, 2022 · 7 comments
Closed

Catkin Build failed #1

yoshida-e opened this issue Oct 31, 2022 · 7 comments

Comments

@yoshida-e
Copy link

We trie to install on a Ubuntu 18.04 Machine, but we have got the following error.
It looks like the errros occur with QP collection.
We are afraid that the cause may not be the library itself, but would apprecaite if you make suggestions on how to solve this.

221028-catkin-error.txt

@mmurooka
Copy link
Owner

Could you try the following commands?

cd <smplpp directory>
git fetch -a
git checkout fix-issue-1
git branch # Make sure the current branch is fix-issue-1
source /opt/ros/${ROS_DISTRO}/setup.bash
catkin build smplpp -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBTORCH_PATH=<absolute path to libtorch> -DENABLE_QLD=ON --catkin-make-args all tests

If it still fails, please try

source /home/yoshidalab/catkin_ws/src
catkin build smplpp -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBTORCH_PATH=<absolute path to libtorch> -DENABLE_QLD=ON --catkin-make-args all tests

I would like to know a little more about your environment, so could you please tell me the output of the following commands?

lsb_release -a

cmake --version

g++ --version

echo $ROS_DISTRO

@mmurooka
Copy link
Owner

If there are still errors, please share the output of catkin build with the following command. (Added -vi option)

catkin build smplpp -vi -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBTORCH_PATH=<absolute path to libtorch> -DENABLE_QLD=ON --catkin-make-args all tests

@yoshida-e
Copy link
Author

Thank you very much for your reply.
Sorry, we still have errors, as attached.

The architecture information is the following:

yoshidalab@yoshidalab-Precision-T5610:/catkin_ws/build/smplpp$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
yoshidalab@yoshidalab-Precision-T5610:
/catkin_ws/build/smplpp$ cmake --version
cmake version 3.17.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
yoshidalab@yoshidalab-Precision-T5610:/catkin_ws/build/smplpp$ g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1
18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
yoshidalab@yoshidalab-Precision-T5610:~/catkin_ws/build/smplpp$ echo $ROS_DISTRO
melodic
221101-catkin-error.txt

@mmurooka
Copy link
Owner

mmurooka commented Nov 1, 2022

Thanks, as far as I could see from the log file, there seemed to be no problem...

I don't know why many linking errors happen.
For example, the following linking error happens

[smplpp:make] /home/yoshidalab/catkin_ws/src/SMPLpp/node/node.cpp:660: `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' に対する定義されていない参照です (Undefined reference)

although /opt/ros/melodic/lib/librosconsole.so is linked to the target.

Could you print the output of the following commands?

nm -D /opt/ros/melodic/lib/librosconsole.so | grep initializeLogLocation

@mmurooka
Copy link
Owner

mmurooka commented Nov 1, 2022

Also, could you try putting libtorch outside of catkin_ws?

@yoshida-e
Copy link
Author

Thank you for your kind instructions. Unfortunately the same result after moving libtorch.
The results are attached. Thank you again for your support.
221101-catkin-error-2.txt

@mmurooka
Copy link
Owner

mmurooka commented Nov 2, 2022

I investigated this issue directly with @yoshida-e and found that some versions of libtorch cause link errors in ROS.
We have confirmed that installing a slightly older libtorch (e.g. this one) instead of the latest version of libtorch solves this issue.

Similar issues have been reported below and seem to be resolved by changing the libtorch version:
pytorch/pytorch#22197
pytorch/pytorch#49450
pytorch/pytorch#60178

@mmurooka mmurooka closed this as completed Nov 2, 2022
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

2 participants