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

Apollo r8.0.0在构建过退款给顾客出现了错误 #15625

Open
liuxw7 opened this issue Dec 27, 2024 · 1 comment
Open

Apollo r8.0.0在构建过退款给顾客出现了错误 #15625

liuxw7 opened this issue Dec 27, 2024 · 1 comment

Comments

@liuxw7
Copy link

liuxw7 commented Dec 27, 2024

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

@daohu527
Copy link
Contributor

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

  1. 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
  2. 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:

    cc_library(
        name = "util_tool",
        srcs = ["your_source_file.cpp"],
        deps = [
            "@boost//:filesystem",
            "@boost//:system",
        ],
    )
  3. 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:

    load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
    
    http_archive(
        name = "boost",
        urls = ["https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz"],
        strip_prefix = "boost_1_75_0",
    )
  4. 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:

    linkopts = [
        "-lboost_system",
        "-lboost_filesystem",
    ]

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

No branches or pull requests

2 participants