SteveMacenski / spatio_temporal_voxel_layer

A new voxel layer leveraging modern 3D graphics tools to modernize navigation environmental representations
http://wiki.ros.org/spatio_temporal_voxel_layer
GNU Lesser General Public License v2.1
616 stars 183 forks source link

Linker options causing build failure #294

Closed james-ward closed 2 months ago

james-ward commented 2 months ago

This line https://github.com/SteveMacenski/spatio_temporal_voxel_layer/blob/ff95acf46d6b9d15cb3c349dddeaafda5b0425e6/spatio_temporal_voxel_layer/CMakeLists.txt#L13 causes the build to fail when building from scratch.

e.g. Building in Docker on 24.04 ROS Rolling:

1137.4 /usr/bin/ld: CMakeFiles/spatio_temporal_voxel_layer_s__rosidl_typesupport_introspection_c.dir/rosidl_generator_py/spatio_temporal_voxel_layer/_spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c.o: in function `_register_msg_type__srv__save_grid__request':
1137.4 _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0x77): undefined reference to `PyCapsule_New'
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0x95): undefined reference to `PyModule_AddObject'                                        
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0xb0): undefined reference to `PyCapsule_New'                                             
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0xce): undefined reference to `PyModule_AddObject'                                        
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0xe9): undefined reference to `PyCapsule_New'                                             
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0x107): undefined reference to `PyModule_AddObject'                                       
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0x11e): undefined reference to `PyCapsule_New'                                            
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0x138): undefined reference to `PyModule_AddObject'                                       
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0x150): undefined reference to `PyCapsule_New'                                            
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0x16a): undefined reference to `PyModule_AddObject'
1137.4 /usr/bin/ld: _spatio_temporal_voxel_layer_s.ep.rosidl_typesupport_introspection_c.c:(.text+0x196): undefined reference to `_Py_Dealloc'

I suspect this line was added when splitting out VDB to help with development.

If I build without these linker flags, then re-add the flags and rebuild it works. So I suspect that the order in which things are being built is the problem, which goes away once the previous versions of the libraries exist in the workspace.

SteveMacenski commented 2 months ago

@Timple can you comment - it looks like this is something you added in the vendorization so want to verify its OK to remove now.