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

Do not link libgcc and stdc++ statically #17

Open
wants to merge 1 commit into
base: ros2
Choose a base branch
from

Conversation

timonegk
Copy link

Currently, libgcc and libstdc++ are linked statically. This was added in 7cc7c10 six years ago and I don't understand why it is necessary or even helpful. For me, it now breaks stuff when bio_ik is called in a python module. You can see the code here. The errors that occur with the static linking are

python: Relink `/home/timon/colcon_ws/install/bio_ik/lib/libbio_ik.so' with `/home/timon/colcon_ws/install/bio_ik/lib/libbio_ik_plugin.so' for IFUNC symbol `_Z98_ZNK6bio_ik15RobotFK_Mutator27computeApproximateMutation1EmdRKNS_14aligned_vectorINS_5FrameEEERS3_PKN6bio_ik15RobotFK_MutatorEmdRKNS_14aligned_vectorINS_5FrameEEERS5_'
python: Relink `/home/timon/colcon_ws/install/bio_ik/lib/libbio_ik.so' with `/home/timon/colcon_ws/install/bio_ik/lib/libbio_ik_plugin.so' for IFUNC symbol `_Z115_ZNK6bio_ik15RobotFK_Mutator27computeApproximateMutationsEmPKPKdRSt6vectorINS_14aligned_vectorINS_5FrameEEESaIS8_EEPKN6bio_ik15RobotFK_MutatorEmPKPKdRSt6vectorINS_14aligned_vectorINS_5FrameEEESaISA_EE'
free(): invalid pointer
[1]    758239 IOT instruction  python script.py

With this patch applied, everything works as expected without any warnings or errors.

timonegk added a commit to bit-bots/bitbots_main that referenced this pull request Feb 18, 2023
timonegk added a commit to bit-bots/bitbots_main that referenced this pull request Feb 18, 2023
Copy link

@eholum eholum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a rebase over the latest ros2 branch to grab the latest API changes, but it resolves the compatibility issues with fastrtps as reported in #7.

Tried and verified in https://github.com/eholum/bio_ik_test.

@sjahr Any chance of a rebase and merge?

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

Successfully merging this pull request may close these issues.

2 participants