ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.02k stars 9.67k forks source link

Unable to compile Apollo's Perception Module with TensorRT 8.4.1.5 on NVIDIA Orin Platform #15074

Closed Azure-blog closed 1 year ago

Azure-blog commented 1 year ago

Hello,

I am encountering an issue while attempting to compile the Perception module on the NVIDIA Orin platform, where I've set up my own development environment. My host is running JetPack version R35.1.0 and I am using TensorRT version 8.4.1.5.

In order to setup the docker container environment, I followed the installation list located in docker/build/installer. The TensorRT version inside the container matches the host version, being 8.4.1.5.

I've made adaptions to the Perception module to ensure compatibility with TensorRT 8, but during the compilation process, I'm facing an error. The error message is as follows:

 ERROR: /apollo/modules/perception/inference/tensorrt/BUILD:119:11: C++ compilation of rule '//modules/perception/inference/tensorrt:batch_stream' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF bazel-out/aarch64-fastbuild/bin/modules/perception/inference/tensorrt/_objs/batch_stream/batch_stream.pic.d ... (remaining 165 argument(s) skipped)
In file included from /usr/include/aarch64-linux-gnu/NvInferLegacyDims.h:16,
                 from /usr/include/aarch64-linux-gnu/NvInfer.h:16,
                 from ./modules/perception/inference/tensorrt/batch_stream.h:22,
                 from modules/perception/inference/tensorrt/batch_stream.cc:17:
/usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h:19:10: fatal error: cuda_runtime_api.h: No such file or directory
   19 | #include <cuda_runtime_api.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

I have verified that CUDA is properly installed on my host system and the CUDA headers have been correctly included in the project. I'm wondering if this issue has something to do with my build settings, or if there's something else I may have missed in the configuration.

something I tried but not working

export PATH=/usr/local/cuda-11.4/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH
export CPATH=/usr/local/cuda-11.4/targets/aarch64-linux/include:$CPATH
export LD_LIBARARY_PATH=/usr/local/cuda-11.4/targets/aarch64-linux/lib:$LD_LIBARARY_PATH
export CUDA_ROOT=/usr/local/cuda-11.4
./apollo.sh config -n
[INFO] Apollo Environment Settings:
[INFO]     APOLLO_ROOT_DIR: /apollo
[INFO]     APOLLO_CACHE_DIR: /apollo/.cache
[INFO]     APOLLO_IN_DOCKER: true
[INFO]     APOLLO_VERSION: test1-2023-08-04-2c14074
[INFO]     DOCKER_IMG: test_local
[INFO]     APOLLO_ENV:  STAGE=dev USE_ESD_CAN=false
[INFO]     USE_GPU: USE_GPU_HOST=1 USE_GPU_TARGET=1
[INFO] Configure .apollo.bazelrc in non-interactive mode
You have bazel 3.7.1- (@non-git) installed.
Found possible Python library paths:
  /usr/lib/python3.8/dist-packages
  /usr/lib/python3/dist-packages
  /usr/local/lib/python3.8/dist-packages
Found CUDA 11.4 in:
    /usr/local/cuda-11.4/targets/aarch64-linux/lib
    /usr/local/cuda-11.4/targets/aarch64-linux/include
Found cuDNN 8 in:
    /usr/lib/aarch64-linux-gnu
    /usr/include
Found TensorRT 8 in:
    /usr/lib/aarch64-linux-gnu
    /usr/include/aarch64-linux-gnu
[ OK ] Successfully configured .apollo.bazelrc in non-interactive mode.

Any help would be greatly appreciated. If more information is needed to resolve this issue, please let me know and I'll provide it as soon as possible.

Thank you in advance.

System information

daohu527 commented 1 year ago

Try https://github.com/ApolloAuto/apollo/tree/9.x_alpha

The new branch has been verified on orin

Azure-blog commented 1 year ago

which brand of the domain control box based on orin have you tested? thankyou .

hearto1314 commented 1 year ago

Hi Azure-blog,you can have a try on https://github.com/ApolloAuto/apollo/tree/9.x_alpha branch, the cuda complling error has no related with which orin domain control box used in theory.

Azure-blog commented 1 year ago

Thank you for your suggestion to try the 9.x branch. I have since attempted to compile Apollo 9.x on my Orin platform. However, I encountered several issues during the compilation process:

build apollo image(Note: While this issue did not cause any noticeable impact, there was an error message displayed in the terminal.)

Status: Downloaded newer image for apolloauto/apollo:dev-aarch64-20.04-20230719_2137
docker.io/apolloauto/apollo:dev-aarch64-20.04-20230719_2137
[INFO] Remove existing Apollo Development container ...
[INFO] Determine whether host GPU is available ...
[INFO] USE_GPU_HOST: 1
[WARNING] No CAN device named /dev/can0. 
[WARNING] No SocketCAN device named can0.
[INFO] Starting mounting map volumes ...
[INFO] Load map sunnyvale_big_loop from image: apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
[INFO] Create volume apollo_map_volume-sunnyvale_big_loop_nvidia from image: apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-sunnyvale_big_loop-latest ...
map_volume-sunnyvale_big_loop-latest: Pulling from apolloauto/apollo
188c0c94c7c5: Pull complete 
6fc266a3b374: Pull complete 
Digest: sha256:0a27ea953198d397fd7bf3b0e670951f6a9d645d362a8bdc707589a26cde8861
Status: Downloaded newer image for apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_big_loop-latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /bin/true: exec format error
[INFO] Load map sunnyvale_loop from image: apolloauto/apollo:map_volume-sunnyvale_loop-latest
[INFO] Create volume apollo_map_volume-sunnyvale_loop_nvidia from image: apolloauto/apollo:map_volume-sunnyvale_loop-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-sunnyvale_loop-latest ...
map_volume-sunnyvale_loop-latest: Pulling from apolloauto/apollo
7ee37f181318: Pull complete 
df5ffabe5e97: Pull complete 
ae2040ed51a1: Pull complete 
3ce7010d244b: Pull complete 
2538b201d2a6: Pull complete 
de601066203a: Pull complete 
Digest: sha256:1337ca5d357f33318e38368b6218d343f6138c63a9bb491175ca7cdd39c1a789
Status: Downloaded newer image for apolloauto/apollo:map_volume-sunnyvale_loop-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_loop-latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /bin/true: exec format error
[INFO] Load map sunnyvale_with_two_offices from image: apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
[INFO] Create volume apollo_map_volume-sunnyvale_with_two_offices_nvidia from image: apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest ...
map_volume-sunnyvale_with_two_offices-latest: Pulling from apolloauto/apollo
c9b1b535fdd9: Pull complete 
68d6bb3021fd: Pull complete 
Digest: sha256:5893abb847f7cffb5dd310f9bac307d5c2537797c247eb1c609f36de1943bdf5
Status: Downloaded newer image for apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
docker.io/apolloauto/apollo:map_volume-sunnyvale_with_two_offices-latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /bin/true: exec format error
[INFO] Load map san_mateo from image: apolloauto/apollo:map_volume-san_mateo-latest
[INFO] Create volume apollo_map_volume-san_mateo_nvidia from image: apolloauto/apollo:map_volume-san_mateo-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-san_mateo-latest ...
map_volume-san_mateo-latest: Pulling from apolloauto/apollo
9d48c3bd43c5: Pull complete 
90d5f4b49a3e: Pull complete 
Digest: sha256:12b04dbfa947f7f06dc5c3b7604be08988c560e850c037a2571998478f0ccf80
Status: Downloaded newer image for apolloauto/apollo:map_volume-san_mateo-latest
docker.io/apolloauto/apollo:map_volume-san_mateo-latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /bin/true: exec format error
[INFO] Load map apollo_virutal_map from image: apolloauto/apollo:map_volume-apollo_virutal_map-latest
[INFO] Create volume apollo_map_volume-apollo_virutal_map_nvidia from image: apolloauto/apollo:map_volume-apollo_virutal_map-latest
[INFO] Start pulling docker image apolloauto/apollo:map_volume-apollo_virutal_map-latest ...
map_volume-apollo_virutal_map-latest: Pulling from apolloauto/apollo
10bc6e88f5b7: Pull complete 
Digest: sha256:f478d6f7791defd3e4cba20a6163a16646c7174e7fa1161404783c5866dd73ab
Status: Downloaded newer image for apolloauto/apollo:map_volume-apollo_virutal_map-latest
docker.io/apolloauto/apollo:map_volume-apollo_virutal_map-latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "true": executable file not found in $PATH: unknown.
[INFO] Mount other volumes ...
[INFO] Create volume apollo_audio_volume_nvidia from image: apolloauto/apollo:data_volume-audio_model-x86_64-latest
[INFO] Start pulling docker image apolloauto/apollo:data_volume-audio_model-x86_64-latest ...
data_volume-audio_model-x86_64-latest: Pulling from apolloauto/apollo
df20fa9351a1: Pull complete 
6f959e2ae75a: Pull complete 
Digest: sha256:1491b6de2b71bd6bc6326bf70a945da69360e490724df78849f6d70ff4d00f61
Status: Downloaded newer image for apolloauto/apollo:data_volume-audio_model-x86_64-latest
docker.io/apolloauto/apollo:data_volume-audio_model-x86_64-latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /bin/true: exec format error
[INFO] Installing python tools ...
[INFO] Install python tool amodel ...
Collecting amodel
  Downloading amodel-0.1.2.tar.gz (7.6 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: amodel
  Building wheel for amodel (setup.py) ... done
  Created wheel for amodel: filename=amodel-0.1.2-py3-none-any.whl size=8173 sha256=313d0f44f158124fe63327237b3fbf2be3156c55e8ba7e6400783ddf40400f08
  Stored in directory: /home/nvidia/.cache/pip/wheels/e3/90/25/b8a683acb9ed497571050903a4f2d78c8f0170a3c6f936b668
Successfully built amodel
Installing collected packages: amodel
Successfully installed amodel
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 177, in emit
    self.console.print(renderable, overflow="ignore", crop=False, style=style)
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1673, in print
    extend(render(renderable, render_options))
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1305, in render
    for render_output in iter_render:
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 134, in __rich_console__
    for line in lines:
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/segment.py", line 249, in split_lines
    for segment in segments:
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1283, in render
    renderable = rich_cast(renderable)
  File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast
    renderable = cast_method()
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/self_outdated_check.py", line 130, in __rich__
    pip_cmd = get_best_invocation_for_this_pip()
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/entrypoints.py", line 58, in get_best_invocation_for_this_pip
    if found_executable and os.path.samefile(
  File "/usr/lib/python3.8/genericpath.py", line 101, in samefile
    s2 = os.stat(f2)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip3.8'
Call stack:
  File "/usr/local/bin/pip3", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/main.py", line 70, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
    self.handle_pip_version_check(options)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/req_command.py", line 190, in handle_pip_version_check
    pip_self_version_check(session, options)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/self_outdated_check.py", line 236, in pip_self_version_check
    logger.warning("[present-rich] %s", upgrade_prompt)
  File "/usr/lib/python3.8/logging/__init__.py", line 1458, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 954, in handle
    self.emit(record)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 179, in emit
    self.handleError(record)
Message: '[present-rich] %s'
Arguments: (UpgradePrompt(old='22.2.2', new='23.2.1'),)
[INFO] Installing perception models ...
[INFO] Install model https://apollo-pkg-beta.cdn.bcebos.com/perception_model/tl_detection_caffe.zip ...
Downloading:[##################################################] 1989/1989
Installed model in /home/nvidia/apollo/modules/perception/production/data/perception/camera/models/traffic_light_detection/tl_detection_caffe.
[INFO] Install model https://apollo-pkg-beta.cdn.bcebos.com/perception_model/horizontal_caffe.zip ...
Downloading:[##################################################] 189/189
Installed model in /home/nvidia/apollo/modules/perception/production/data/perception/camera/models/traffic_light_recognition/horizontal_caffe.
[INFO] Install model https://apollo-pkg-beta.cdn.bcebos.com/perception_model/quadrate_caffe.zip ...
Downloading:[##################################################] 186/186
Installed model in /home/nvidia/apollo/modules/perception/production/data/perception/camera/models/traffic_light_recognition/quadrate_caffe.
[INFO] Install model https://apollo-pkg-beta.cdn.bcebos.com/perception_model/vertical_caffe.zip ...
Downloading:[##################################################] 187/187
Installed model in /home/nvidia/apollo/modules/perception/production/data/perception/camera/models/traffic_light_recognition/vertical_caffe.
[INFO] Install model https://apollo-pkg-beta.cdn.bcebos.com/perception_model/darkSCNN_caffe.zip ...
Downloading:[##################################################] 32527/32527
Installed model in /home/nvidia/apollo/modules/perception/production/data/perception/camera/models/lane_detector/darkSCNN_caffe.
[INFO] Install model https://apollo-pkg-beta.cdn.bcebos.com/perception_model/cnnseg128_caffe.zip ...
Downloading:[##################################################] 1350/1350
Installed model in /home/nvidia/apollo/modules/perception/production/data/perception/lidar/models/cnnseg/cnnseg128_caffe.
[INFO] Install model https://apollo-pkg-beta.cdn.bcebos.com/perception_model/3d-r4-half_caffe.zip ...
Downloading:[##################################################] 5847/5847
Installed model in /home/nvidia/apollo/modules/perception/production/data/perception/camera/models/yolo_obstacle_detector/3d-r4-half_caffe.
[INFO] Install model https://apollo-pkg-beta.cdn.bcebos.com/perception_model/smoke_torch.zip ...
Downloading:[##################################################] 8560/8560
Installed model in /home/nvidia/apollo/modules/perception/production/data/perception/camera/models/yolo_obstacle_detector/smoke_torch.
[INFO] Starting Docker container "apollo_dev_nvidia" ...

compile modules/drivers/camera(Note: I managed to bypass this issue by disabling the camera compilation.)

[INFO] Apollo Environment Settings:
[INFO]     APOLLO_ROOT_DIR: /apollo
[INFO]     APOLLO_CACHE_DIR: /apollo/.cache
[INFO]     APOLLO_IN_DOCKER: true
[INFO]     APOLLO_VERSION: 9.x_alpha-2023-08-01-34eaf82c6b
[INFO]     DOCKER_IMG: dev-aarch64-20.04-20230719_2137
[INFO]     APOLLO_ENV:  STAGE=dev USE_ESD_CAN=false
[INFO]     USE_GPU: USE_GPU_HOST=1 USE_GPU_TARGET=1
[ OK ] Running GPU build on aarch64 platform.
[WARNING] ESD CAN library supplied by ESD Electronics doesn't exist.
[WARNING] If you need ESD CAN, please refer to:
[WARNING]   third_party/can_card_library/esd_can/README.md
[INFO] Build Overview: 
[INFO]     USE_GPU: 1  [ 0 for CPU, 1 for GPU ]
[INFO]     Bazel Options: --config=gpu --define ENABLE_PROFILER=true
[INFO]     Build Targets: //modules/... union //cyber/...
[INFO]     Disabled:      except //modules/drivers/canbus/can_client/esd/...
(02:24:35) INFO: Invocation ID: cd429c79-69c7-4e57-8d93-e83310c204d1
(02:24:36) INFO: Current date is 2023-08-08
(02:24:37) ERROR: /apollo/modules/drivers/camera/BUILD:153:11: no such package 'modules/drivers/camera/format': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
 - /apollo/modules/drivers/camera/format and referenced by '//modules/drivers/camera:camera'
(02:24:37) ERROR: Analysis of target '//modules/drivers/camera:camera' failed; build aborted: Analysis failed
(02:24:37) INFO: Elapsed time: 1.741s
(02:24:37) INFO: 0 processes.
(02:24:37) FAILED: Build did NOT complete successfully (2 packages loaded, 0 targets configured)
    currently loading: @cpplint// ... (3 packages)
    Fetching @local_config_cc; fetching
    Fetching @civetweb; fetching

compile modules/planning(Note: I was able to address this by removing the build --copt="Werror=sign-compare" line from the bazel.rc file.)

[INFO] Apollo Environment Settings:
[INFO]     APOLLO_ROOT_DIR: /apollo
[INFO]     APOLLO_CACHE_DIR: /apollo/.cache
[INFO]     APOLLO_IN_DOCKER: true
[INFO]     APOLLO_VERSION: 9.x_alpha-2023-08-01-34eaf82c6b
[INFO]     DOCKER_IMG: dev-aarch64-20.04-20230719_2137
[INFO]     APOLLO_ENV:  STAGE=dev USE_ESD_CAN=false
[INFO]     USE_GPU: USE_GPU_HOST=1 USE_GPU_TARGET=1
[ OK ] Running GPU build on aarch64 platform.
[INFO] Build Overview: 
[INFO]     USE_GPU: 1  [ 0 for CPU, 1 for GPU ]
[INFO]     Bazel Options: --config=gpu --define ENABLE_PROFILER=true
[INFO]     Build Targets: //cyber/... union //modules/common/... union //modules/common_msgs/... union //modules/planning/... union //modules/prediction/... union //modules/perception/... union //modules/localization/...
[INFO]     Disabled:      
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
(02:26:16) INFO: Invocation ID: cd2fb4ff-c039-4390-9425-68ce361b5537
(02:26:16) INFO: Current date is 2023-08-08
(02:27:14) INFO: Analyzed 9770 targets (641 packages loaded, 20298 targets configured).
(02:27:14) INFO: Found 9770 targets...
(02:27:14) WARNING: /apollo/cyber/task/BUILD:43:15: runfiles symlink cyber/task/install_header_src -> bazel-out/aarch64-fastbuild/bin/cyber/task/install_header_src obscured by cyber/task -> cyber/task
(02:27:14) WARNING: /apollo/cyber/task/BUILD:43:15: runfiles symlink cyber/task/install_module_src -> bazel-out/aarch64-fastbuild/bin/cyber/task/install_module_src obscured by cyber/task -> cyber/task
(02:27:14) WARNING: /apollo/cyber/task/BUILD:43:15: runfiles symlink cyber/task/install_src -> bazel-out/aarch64-fastbuild/bin/cyber/task/install_src obscured by cyber/task -> cyber/task
(02:31:27) WARNING: /apollo/modules/planning/tasks/open_space_pre_stop_decider/proto/BUILD:14:15: runfiles symlink modules/planning/tasks/open_space_pre_stop_decider/proto/install_header_src -> bazel-out/aarch64-fastbuild/bin/modules/planning/tasks/open_space_pre_stop_decider/proto/install_header_src obscured by modules/planning/tasks/open_space_pre_stop_decider/proto -> modules/planning/tasks/open_space_pre_stop_decider/proto
(02:32:47) INFO: From Compiling modules/localization/msf/common/util/file_utility.cc:
modules/localization/msf/common/util/file_utility.cc: In static member function ‘static void apollo::localization::msf::FileUtility::ComputeBinaryMd5(const unsigned char*, size_t, char*)’:
modules/localization/msf/common/util/file_utility.cc:117:23: warning: argument to ‘sizeof’ in ‘char* strncat(char*, const char*, size_t)’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
  117 |     strncat(buf, tmp, sizeof(tmp));
      |                       ^~~~~~~~~~~
(02:33:02) WARNING: /apollo/cyber/class_loader/BUILD:62:15: runfiles symlink cyber/class_loader/install_module_src -> bazel-out/aarch64-fastbuild/bin/cyber/class_loader/install_module_src obscured by cyber/class_loader -> cyber/class_loader
(02:33:02) WARNING: /apollo/modules/localization/msf/local_tool/map_creation/BUILD:55:15: runfiles symlink modules/localization/msf/local_tool/map_creation/install_header_src -> bazel-out/aarch64-fastbuild/bin/modules/localization/msf/local_tool/map_creation/install_header_src obscured by modules/localization/msf/local_tool/map_creation -> modules/localization/msf/local_tool/map_creation
(02:34:17) ERROR: /apollo/modules/planning/planning_base/math/discretized_points_smoothing/BUILD:67:11: Compiling modules/planning/planning_base/math/discretized_points_smoothing/fem_pos_deviation_osqp_interface.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF ... (remaining 102 arguments skipped)
modules/planning/planning_base/math/discretized_points_smoothing/fem_pos_deviation_osqp_interface.cc: In member function ‘bool apollo::planning::FemPosDeviationOsqpInterface::Solve()’:
modules/planning/planning_base/math/discretized_points_smoothing/fem_pos_deviation_osqp_interface.cc:47:26: error: comparison of integer expressions of different signedness: ‘std::vector<std::pair<double, double> >::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
   47 |   if (ref_points_.size() > std::numeric_limits<int>::max()) {
      |       ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
(02:34:17) INFO: Elapsed time: 487.208s, Critical Path: 96.23s
(02:34:17) INFO: 1887 processes: 545 internal, 1342 local.
(02:34:17) FAILED: Build did NOT complete successfully
CesarLiu commented 1 year ago

same issue there: ERROR: /apollo/modules/planning/planning_base/open_space/trajectory_smoother/BUILD:203:11: Compiling modules/planning/planning_base/open_space/trajectory_smoother/distance_approach_ipopt_interface.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF ... (remaining 143 arguments skipped) In file included from ./cyber/common/log.h:27, from ./modules/planning/planning_base/open_space/trajectory_smoother/distance_approach_ipopt_interface.h:41, from modules/planning/planning_base/open_space/trajectory_smoother/distance_approach_ipopt_interface.cc:20: modules/planning/planning_base/open_space/trajectory_smoother/distance_approach_ipopt_interface.cc: In constructor ‘apollo::planning::DistanceApproachIPOPTInterface::DistanceApproachIPOPTInterface(size_t, double, const MatrixXd&, const MatrixXd&, const MatrixXd&, const MatrixXd&, const MatrixXd&, const MatrixXd&, const MatrixXd&, const MatrixXd&, const std::vector&, const MatrixXi&, size_t, const MatrixXd&, const MatrixXd&, const apollo::planning::PlannerOpenSpaceConfig&)’: modules/planning/planning_base/open_space/trajectory_smoother/distance_approach_ipopt_interface.cc:47:18: error: comparison of integer expressions of different signedness: ‘const size_t’ {aka ‘const long unsigned int’} and ‘int’ [-Werror=sign-compare] 47 | ACHECK(horizon < std::numeric_limits::max()) | ~~^~~~~~~ modules/planning/planning_base/open_space/trajectory_smoother/distance_approach_ipopt_interface.cc:47:3: note: in expansion of macro ‘ACHECK’ 47 | ACHECK(horizon < std::numeric_limits::max()) | ^~ modules/planning/planning_base/open_space/trajectory_smoother/distance_approach_ipopt_interface.cc:50:24: error: comparison of integer expressions of different signedness: ‘const size_t’ {aka ‘const long unsigned int’} and ‘int’ [-Werror=sign-compare] 50 | ACHECK(obstacles_num < std::numeric_limits::max()) | ~~~~^~~~~~~ modules/planning/planning_base/open_space/trajectory_smoother/distance_approach_ipopt_interface.cc:50:3: note: in expansion of macro ‘ACHECK’ 50 | ACHECK(obstacles_num < std::numeric_limits::max()) | ^~ cc1plus: some warnings being treated as errors