You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The errors you are encountering indicate that there are unresolved references to functions from the Boost libraries during the linking phase of your Bazel build. This typically happens when the Boost libraries are either not linked correctly or not available in the expected locations. Here’s a step-by-step guide to help you resolve these issues:
Steps to Resolve Linking Errors with Boost Libraries
Ensure Boost Libraries are Installed:
Make sure that the Boost libraries are installed on your system. Depending on your package manager, you can install them as follows:
Ubuntu/Debian:
sudo apt-get install libboost-all-dev
Fedora/RHEL:
sudo dnf install boost-devel
macOS (using Homebrew):
brew install boost
Check Your BUILD File:
Ensure that your Bazel BUILD file correctly includes the necessary Boost libraries. You need to specify the libraries you are using. Here’s an example snippet:
Add Boost Repository to WORKSPACE:
If you haven’t already, you may need to include Boost as an external dependency in your WORKSPACE file. Here’s an example to do this:
Linking with the Correct Boost Libraries:
Make sure that the linking process includes the necessary Boost libraries. Adjust your linkopts in the cc_library or cc_binary rule if required:
APOLLO 8.0.0, 系统环境 DOCKER UBUNTU18.04
modules/dreamview/backend/sim_control_manager/core/dynamic_model_factory.cc: In destructor 'apollo::dreamview::DynamicModelFactory::~DynamicModelFactory()':
modules/dreamview/backend/sim_control_manager/core/dynamic_model_factory.cc:56:25: warning: deleting object of abstract class type 'apollo::dreamview::SimControlBase' which has non-virtual destructor will cause undefined behavior [-Wdelete-non-virtual-dtor]
delete iter->second.dynamic_model_ptr;
^~~~~~~~~~~~~~~~~
(02:22:31) WARNING: /apollo/modules/guardian/BUILD:62:18: runfiles symlink modules/guardian/install_src -> bazel-out/k8-fastbuild/bin/modules/guardian/install_src obscured by modules/guardian -> modules/guardian
(02:22:35) ERROR: /apollo/modules/dreamview/backend/hmi/BUILD:34:10: Linking of rule '//modules/dreamview/backend/hmi:vehicle_manager_main' failed (Exit 1): gcc failed: error executing command
(cd /apollo/.cache/bazel/540135163923dd7d5820f3ee4b306b32/execroot/apollo &&
exec env -
CUDA_TOOLKIT_PATH=/usr/local/cuda-11.1
GCC_HOST_COMPILER_PATH=/usr/bin/x86_64-linux-gnu-gcc-7
LD_LIBRARY_PATH=/usr/local/libtorch_cpu/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
PATH=/apollo/modules/teleop/common/scripts:/bin/:/apollo/bazel-bin/modules/tools/visualizer:/apollo/bazel-bin/cyber/tools/cyber_launch:/apollo/bazel-bin/cyber/tools/cyber_service:/apollo/bazel-bin/cyber/tools/cyber_node:/apollo/bazel-bin/cyber/tools/cyber_channel:/apollo/bazel-bin/cyber/tools/cyber_monitor:/apollo/bazel-bin/cyber/tools/cyber_recorder:/apollo/bazel-bin/cyber/mainboard:/usr/local/cuda/bin:/opt/apollo/neo/bin:/opt/apollo/sysroot/bin:/usr/local/nvidia/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/proc/self/cwd
PYTHON_BIN_PATH=/usr/bin/python3
PYTHON_LIB_PATH=/usr/lib/python3/dist-packages
TF_CUDA_COMPUTE_CAPABILITIES=3.7,5.2,6.0,6.1,7.0,7.2,7.5
/usr/bin/gcc @bazel-out/k8-fastbuild/bin/modules/dreamview/backend/hmi/vehicle_manager_main-2.params)
Execution platform: @local_config_platform//:host
bazel-out/k8-fastbuild/bin/_solib_k8/_U_S_Smodules_Scommon_Sutil_Cutil_Utool___Umodules_Scommon_Sutil/libutil_tool.so: error: undefined reference to 'boost::system::generic_category()'
bazel-out/k8-fastbuild/bin/_solib_k8/_U_S_Smodules_Scommon_Sutil_Cutil_Utool___Umodules_Scommon_Sutil/libutil_tool.so: error: undefined reference to 'boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code)'
bazel-out/k8-fastbuild/bin/_solib_k8/_U_S_Smodules_Scommon_Sutil_Cutil_Utool___Umodules_Scommon_Sutil/libutil_tool.so: error: undefined reference to 'boost::system::system_category()'*
collect2: error: ld returned 1 exit status
(02:22:36) INFO: Elapsed time: 331.541s, Critical Path: 63.25s
(02:22:36) INFO: 2636 processes: 1648 internal, 988 local.
(02:22:36) FAILED: Build did NOT complete successfully
The text was updated successfully, but these errors were encountered: