AuroAi/carla_apollo_bridge

Error building apollo in docker container

joelmap opened this issue · 2 comments

Hi, I'm trying to follow the Setup / Getting Started instructions but I'm getting an error building apollo in the docker container (running the ./apollo.sh build_gpu command). Here's the full log:

System check passed. Build continue ...
[WARNING] ESD CAN library supplied by ESD Electronics does not exist. If you need ESD CAN, please refer to third_party/can_card_library/esd_can/README.md.
Running build under GPU mode. GPU is required to run the build.
[INFO] Start building, please wait ...
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC
WARNING: ignoring LD_PRELOAD in environment.
.
____Loading package: modules/map
____Loading package: modules/perception/camera/common
____Loading package: modules/common/vehicle_model
____Loading package: modules/canbus/vehicle/wey/protocol
____Loading package: modules/perception/radar/lib/detector/conti_ars_detector
____Loading package: modules/common/adapters
____Loading package: modules/planning/common/trajectory
____Loading package: modules/drivers/canbus/can_client/esd
____Loading package: modules/prediction/scenario/feature_extractor
____Loading package: modules/drivers/velodyne/compensator
____Loading package: modules/data/tools/smart_recorder
____Loading package: modules/planning/scenarios/traffic_light/unprotected_left_turn
____Loading package: modules/map/tools/map_datachecker/proto
____Loading package: modules/perception/inference/caffe
____Loading package: modules/perception/camera/lib/lane/postprocessor/darkSCNN
____Loading package: cyber/base
____Loading package: cyber/task
[INFO] Building on x86_64...
[INFO] Building with --jobs=12 --ram_utilization_factor 80 for x86_64
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling --host_jvm_args=-XX:-UseParallelGC
WARNING: ignoring LD_PRELOAD in environment.
INFO: (10-28 16:23:07.966) Found 3743 targets...
INFO: (10-28 16:25:02.202) From Compiling modules/perception/lidar/tools/exporter/msg_exporter_main.cc:
In file included from ./modules/perception/lidar/tools/exporter/msg_exporter.h:25:0,
                 from modules/perception/lidar/tools/exporter/msg_exporter_main.cc:22:
./modules/perception/lidar/common/pcl_util.h:49:13: warning: 'bool apollo::perception::lidar::LoadPCLPCD(const string&, apollo::perception::base::PointFCloud*)' defined but not used [-Wunused-function]
 static bool LoadPCLPCD(const std::string& file_path,
             ^
INFO: (10-28 16:25:16.707) From Compiling modules/perception/lidar/tools/exporter/msg_exporter.cc:
In file included from ./modules/perception/lidar/tools/exporter/msg_exporter.h:25:0,
                 from modules/perception/lidar/tools/exporter/msg_exporter.cc:16:
./modules/perception/lidar/common/pcl_util.h:49:13: warning: 'bool apollo::perception::lidar::LoadPCLPCD(const string&, apollo::perception::base::PointFCloud*)' defined but not used [-Wunused-function]
 static bool LoadPCLPCD(const std::string& file_path,
             ^
INFO: (10-28 16:25:56.601) From Linking modules/data/tools/rosbag_to_record/rosbag_to_record:
/usr/bin/ld: warning: libfastrtps.so, needed by bazel-out/local-dbg/bin/_solib_k8/_U@ros_S_S_Cros_Ucommon___Uexternal_Sros_Slib/libroscpp.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libfastcdr.so, needed by bazel-out/local-dbg/bin/_solib_k8/_U@ros_S_S_Cros_Ucommon___Uexternal_Sros_Slib/libroscpp.so, not found (try using -rpath or -rpath-link)
ERROR: (10-28 16:27:43.435) /apollo/modules/dreamview/backend/sim_control/BUILD:5:1: C++ compilation of rule '//modules/dreamview/backend/sim_control:sim_control' failed (Exit 4).
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
INFO: (10-28 16:27:43.708) Elapsed time: 283.372s, Critical Path: 93.82s
============================
[ERROR] Build failed!
[INFO] Took 296 seconds
============================

Apparently it is failing to find libfastrtps.so and libfastcdr.so. Any idea what might be causing this issue? Thanks.

Hi. The parts you mentioned seem to be INFO level outputs only. It looks like the failure is occurring here:
ERROR: (10-28 16:27:43.435) /apollo/modules/dreamview/backend/sim_control/BUILD:5:1: C++ compilation of rule '//modules/dreamview/backend/sim_control:sim_control' failed (Exit 4). gcc: internal compiler error: Killed (program cc1plus)

From a quick search it seems this could be due to some incompatibility of your machine (running out of memory, not running on Ubuntu, etc.)

Thanks for replying so quickly. You are right, the issue was memory. I just tested on another machine with 32gb and it built successfully. I was so fixated on the lib errors that I didn't notice the error about gcc getting killed.