Skip to content

Conversation

@sumir0
Copy link
Contributor

@sumir0 sumir0 commented Dec 11, 2025

  • Set PIC property for pcl_cc_tool_interface target in CMake

* Add `PIC` property for `pcl_cc_tool_interface` target in CMake

Signed-off-by: Ramir Sultanov <sumir0@proton.me>
* Change setter of `PIC` property for `pcl_cc_tool_interface` target in CMake

Signed-off-by: Ramir Sultanov <sumir0@proton.me>
@sumir0
Copy link
Contributor Author

sumir0 commented Dec 11, 2025

Current build configuration produces the following error on my linux platform:

[ 49%] Automatic MOC and UIC for target pcl_cc_tool_fpfh_estimation
[ 49%] Built target pcl_cc_tool_fpfh_estimation_autogen
[ 49%] Building CXX object apps/cloud_composer/CMakeFiles/pcl_cc_tool_fpfh_estimation.dir/pcl_cc_tool_fpfh_estimation_autogen/mocs_compilation.cpp.o
[ 49%] Building CXX object apps/cloud_composer/CMakeFiles/pcl_cc_tool_fpfh_estimation.dir/tools/fpfh_estimation.cpp.o
[ 49%] Linking CXX shared library ../../lib/cloud_composer_plugins/libpcl_cc_tool_fpfh_estimation.so
/usr/bin/ld: ../../lib/libpcl_cc_tool_interface.a(cloud_item.cpp.o): warning: relocation against `_ZN3pcl6traits4nameINS_12_PointXYZRGBENS_6fields1yELi0EE5valueE' in read-only section `.text._ZN3pcl13createMappingINS_11PointXYZRGBEEEvRKSt6vectorINS_13PCLPointFieldESaIS3_EERS2_INS_6detail12FieldMappingESaIS9_EE[_ZN3pcl13createMappingINS_11PointXYZRGBEEEvRKSt6vectorINS_13PCLPointFieldESaIS3_EERS2_INS_6detail12FieldMappingESaIS9_EE]'
/usr/bin/ld: ../../lib/libpcl_cc_tool_interface.a(mocs_compilation.cpp.o): relocation R_X86_64_PC32 against symbol `_ZN3pcl14cloud_composer15PropertiesModel16staticMetaObjectE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [apps/cloud_composer/CMakeFiles/pcl_cc_tool_fpfh_estimation.dir/build.make:209: lib/cloud_composer_plugins/libpcl_cc_tool_fpfh_estimation.so.1.15.1.99] Error 1
make[1]: *** [CMakeFiles/Makefile2:9741: apps/cloud_composer/CMakeFiles/pcl_cc_tool_fpfh_estimation.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

At the moment I can not confirm neither necessity, neither the lack of necessity of pcl_cc_tool_interface to be a static library in recent versions of PCL. But these changes will fix the error.

…target

* Add condition for setting `PIC` property for `pcl_cc_tool_interface` target

Signed-off-by: Ramir Sultanov <sumir0@proton.me>
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.

1 participant