ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.45k stars 1.24k forks source link

Fix undefined symbols in `libpf_lib.so` #4312

Closed Rayman closed 3 months ago

Rayman commented 3 months ago

Basic Info

Info Please fill out this column
Ticket(s) this addresses
Primary OS tested on Ubuntu
Robotic platform tested on
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

When I build nav2_amcl with -Wl,--no-undefined I noticed libpf_lib.so has undefined symbols. This PR correctly links libpf_lib.so to libm so all symbols can be found.

You can verify this by executing the following command:

ldd -r ./build/nav2_amcl/src/pf/libpf_lib.so
    linux-vdso.so.1 (0x00007ffd1f8c0000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000074e909a00000)
    /lib64/ld-linux-x86-64.so.2 (0x000074e909e60000)
undefined symbol: ceil  (./build/nav2_amcl/src/pf/libpf_lib.so)
undefined symbol: atan2 (./build/nav2_amcl/src/pf/libpf_lib.so)
undefined symbol: sin   (./build/nav2_amcl/src/pf/libpf_lib.so)
undefined symbol: hypot (./build/nav2_amcl/src/pf/libpf_lib.so)
undefined symbol: cos   (./build/nav2_amcl/src/pf/libpf_lib.so)
undefined symbol: log   (./build/nav2_amcl/src/pf/libpf_lib.so)
undefined symbol: sqrt  (./build/nav2_amcl/src/pf/libpf_lib.so)
undefined symbol: floor (./build/nav2_amcl/src/pf/libpf_lib.so)

Description of documentation updates required from your changes


Future work that may be required in bullet points

For Maintainers:

SteveMacenski commented 3 months ago

@Rayman please sign off with DCO bot - see the details of the action for how to resolve. Then happy to merge :-)

Rayman commented 3 months ago

Sorry I forgot