Robotics StackExchange | Archived questions

Cmake could not find OpenMP_C (Autoware)

Hello everyone,

I am trying to install Autoware from Source in a Drive PX2 according to the installation proposed in https://gitlab.com/autowarefoundation/autoware.ai/autoware/wikis/Source-Build.

However, when compiling, Cmake cannot find OpenMPC (missing: OpenMPCFLAGS OpenMPCLIBNAMES) as attached.

How could I solve this issue?

Thank you in advance.

nvidia@nvidia:~/autoware.ai$ AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> autoware_build_flags
Starting >>> autoware_msgs
Starting >>> vector_map_msgs                                                            
Starting >>> autoware_config_msgs
Starting >>> tablet_socket_msgs
Starting >>> autoware_system_msgs
Finished <<< autoware_build_flags [13.7s]                                                                                                                                                                  
Starting >>> autoware_can_msgs                                                                                                                                                              
Finished <<< tablet_socket_msgs [15.4s]                                                                                                                                                              
Starting >>> mrt_cmake_modules
Finished <<< autoware_config_msgs [18.3s]                                                                                                                                                   
Starting >>> gnss
Finished <<< autoware_msgs [22.2s]                                                                                                                                                              
Starting >>> amathutils_lib
Finished <<< autoware_system_msgs [22.1s]
Starting >>> autoware_health_checker
Finished <<< vector_map_msgs [24.7s]                                                                                                                                                                     
Starting >>> vector_map
Finished <<< mrt_cmake_modules [9.23s]
Starting >>> lanelet2_core                                                                                                                                                                     
Finished <<< autoware_can_msgs [11.3s]                                                                                                                                                       
Starting >>> sick_ldmrs_description
[Processing: amathutils_lib, autoware_health_checker, gnss, lanelet2_core, sick_ldmrs_description, vector_map]                                                                               
--- stderr: lanelet2_core                                                                                                                                                                 
CMake Error at /usr/local/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.16/Modules/FindOpenMP.cmake:511 (find_package_handle_standard_args)
  /home/nvidia/autoware.ai/install/mrt_cmake_modules/share/mrt_cmake_modules/cmake/Modules/UseMrtStdCompilerFlags.cmake:54 (find_package)
  CMakeLists.txt:13 (include)


---
Failed   <<< lanelet2_core  [ Exited with code 1 ]
Aborted  <<< autoware_health_checker
Aborted  <<< vector_map
Aborted  <<< amathutils_lib
Aborted  <<< sick_ldmrs_description                                                                                             
Aborted  <<< gnss

Summary: 8 packages finished [1min 12s]
  1 package failed: lanelet2_core
  5 packages aborted: amathutils_lib autoware_health_checker gnss sick_ldmrs_description vector_map
  1 package had stderr output: lanelet2_core
  137 packages not processed
[130.298s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f96051860 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 297, in _invoke_callbacks
    callback(self)
  File "/usr/lib/python3.5/asyncio/futures.py", line 442, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 532, in call_soon_threadsafe
    handle = self._call_soon(callback, args)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 506, in _call_soon
    self._check_closed()
  File "/usr/lib/python3.5/asyncio/base_events.py", line 334, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
[130.300s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f96006ac8 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 297, in _invoke_callbacks
    callback(self)
  File "/usr/lib/python3.5/asyncio/futures.py", line 442, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 532, in call_soon_threadsafe
    handle = self._call_soon(callback, args)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 506, in _call_soon
    self._check_closed()
  File "/usr/lib/python3.5/asyncio/base_events.py", line 334, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
[195.944s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f96021a90 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 297, in _invoke_callbacks
    callback(self)
  File "/usr/lib/python3.5/asyncio/futures.py", line 442, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 532, in call_soon_threadsafe
    handle = self._call_soon(callback, args)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 506, in _call_soon
    self._check_closed()
  File "/usr/lib/python3.5/asyncio/base_events.py", line 334, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
[195.945s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f96021b38 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 297, in _invoke_callbacks
    callback(self)
  File "/usr/lib/python3.5/asyncio/futures.py", line 442, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 532, in call_soon_threadsafe
    handle = self._call_soon(callback, args)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 506, in _call_soon
    self._check_closed()
  File "/usr/lib/python3.5/asyncio/base_events.py", line 334, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
[196.011s] ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending coro=<_fd2callback() done, defined at /usr/lib/python3/dist-packages/colcon_core/subprocess.py:216> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[196.012s] ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending coro=<_fd2callback() done, defined at /usr/lib/python3/dist-packages/colcon_core/subprocess.py:216> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[196.012s] ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending coro=<_fd2callback() done, defined at /usr/lib/python3/dist-packages/colcon_core/subprocess.py:216> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[196.013s] ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending coro=<_fd2callback() done, defined at /usr/lib/python3/dist-packages/colcon_core/subprocess.py:216> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>code here

Asked by Drechsler on 2019-11-26 04:48:40 UTC

Comments

Answers

Hi,

The issue is explained here: https://github.com/KIT-MRT/mrt_cmake_modules/issues/7 Basically Lanelet uses CMake modules from the mrt_cmake_modules project which currently are hardcoded to tune the build to a specific Intel architecture.

As a workaround for now, try an add -DMRT_ARCH=armv8-a to your Colcon build command. Example:

AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args " -DCMAKE_BUILD_TYPE=Release" " -DMRT_ARCH=armv8-a"

Asked by filipe.rinaldi on 2019-11-26 10:51:03 UTC

Comments

Thank you for the answer but the issue persist.

I installed Autoware in another TEGRA and the problem did not happen.

Asked by Drechsler on 2019-11-26 13:00:53 UTC

@Drechsler can you check that in the board that you have the issue you are actually using release 1.12.0, lanelet2 and the mrt_cmake_modules have been introduced in 1.13.0

Asked by sgermanserrano on 2019-11-27 06:13:55 UTC

Also, note that Ubuntu 16.04 is no longer supported - only Ubuntu 18.04 is supported with Autoware.ai 1.13.0.

Asked by Josh Whitley on 2019-12-03 14:24:53 UTC

The same issue occurred with 1.13.0.

How could I solve this issue?

Autoware 1.13.0 NVIDIA Jetson AGX Xavier ROS melodic Ubuntu 18.04 (Jetpack)

Asked by shikishi on 2019-12-06 06:34:35 UTC

@shikishi the issue is in 1.13.0, 1.12.0 does not have it. It is currently being addressed here

Asked by sgermanserrano on 2019-12-06 06:42:33 UTC

Hello everybody

Thank you for the inputs, maybe the first time I downloaded the workspace configuration, I had downloaded the 1.13 version, then the lanelet2 archives remained in the src folder.

Asked by Drechsler on 2019-12-09 09:04:38 UTC

My suggestion should work, but I'm not sure on what is the syntax to pass multiple arguments via the --cmake-args. In any case, here is the patch with the proper fix for v1.13.0: https://gitlab.com/autowarefoundation/autoware.ai/autoware/merge_requests/25

Asked by filipe.rinaldi on 2019-12-10 05:35:31 UTC