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

cannot find -lddsc&ddscxx #19

Open
Sher1ockFan opened this issue Aug 15, 2024 · 8 comments
Open

cannot find -lddsc&ddscxx #19

Sher1ockFan opened this issue Aug 15, 2024 · 8 comments

Comments

@Sher1ockFan
Copy link

my system is ubuntu20.04
I have installed the unitreeSDK2 on my computer
the path is /usr/local/
but there is an error about cannot find -lddsc&ddscxx occurred

@juanjqo
Copy link

juanjqo commented Aug 21, 2024

@Sher1ockFan I'm experiencing the same issue. Did you find a solution?

@webDrag0n
Copy link

webDrag0n commented Aug 23, 2024

Same issue here, the -lddsc error could be solved by apt install cyclonedds-dev. However the -lddscxx still remains unfound. So I'm suspecting the problem is somehow related to building procedure of cyclonedds or the environment variable.

The README instruction says something about setting CYCLONEDDS_HOME and CMAKE_PREFIX_PATH. Not sure what should be set to CMAKE_PREFIX_PATH though, and doesn't seems to find ddscxx in cyclonedds install folder.

@KanonWY
Copy link

KanonWY commented Aug 23, 2024

I don't know if the maintainer of the repository made a deliberate mistake or is not familiar with modern cmake.The solutions to these errors are:

find_package(unitree_sdk2 REQUIRED)
include_directories(/usr/local/include/ddscxx /usr/local/include/iceoryx/v2.0.2)
# link_libraries(unitree_sdk2 ddsc ddscxx rt pthread)
link_libraries(unitree_sdk2 ddsc rt pthread)

The link_target method is no longer recommended.

@webDrag0n
Copy link

Thanks so much for the solution! It worked flawlessly.

@Sher1ockFan
Copy link
Author

@Sher1ockFan I'm experiencing the same issue. Did you find a solution?

I found the installation path was wrong
It was /usr/local/lib/x86_64/ but it should be /usr/local/lib
So you can move libddsc.so and libddscxx.so to the correct path
sudo mv /usr/local/lib/x86_64/* /usr/local/lib/

@KanonWY
Copy link

KanonWY commented Aug 27, 2024

It looks like a bug in the unitree_sdk2 cmake install script, there is a missing /, which causes the prefix. You can add this / and it will install to /usr/local/lib
St1fQPRF67
My solution above may be wrong, but link_libraries is definitely not recommended. You can directly find_package and then use the transitivity of target_link_library to find the two missing libraries.

@liujieluv
Copy link

编译unitree_mujoco时出现,cannot find -lddsc&ddscxx #19

#查找libddscxx.so

locate libddscxx.so

#将libddscxx.so的位置链接到/usr/local/lib/libddscxx.so

sudo ln -s /home/liu/unitree_sdk2-main/thirdparty/lib/x86_64/libddscxx.so /usr/local/lib/libddscxx.so

locate libddsc.so

sudo ln -s /home/liu/unitree_sdk2-main/thirdparty/lib/x86_64/libddsc.so /usr/local/lib/libddsc.so

@wuyangning
Copy link
Collaborator

wuyangning commented Sep 3, 2024

my system is ubuntu20.04 I have installed the unitreeSDK2 on my computer the path is /usr/local/ but there is an error about cannot find -lddsc&ddscxx occurred

The previous version of unitree_sdk2 was installed using install.sh. This method is no longer used in the new version. See https://github.com/unitreerobotics/unitree_sdk2. The installation paths of these two versions are inconsistent, resulting in compilation errors.
We have fixed this issue in the latest commit.

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

6 participants