Autoware compilation failed. building from source
Trying to build Autoware from source according to this. The version I want to install is 1.12.0.
My system is ubuntu 16 with ros kinetic.
g++ and gcc version is 5.4.0.
Python version is 2.7 and 3.5.
After I run
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
error occurs:
$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> autoware_build_flags
Starting >>> autoware_msgs
Starting >>> vector_map_msgs
Starting >>> autoware_config_msgs
[Processing: autoware_build_flags, autoware_config_msgs, autoware_msgs, vector_map_msgs]
Finished <<< autoware_build_flags [32.7s]
Starting >>> tablet_socket_msgs
Finished <<< autoware_config_msgs [42.5s]
Starting >>> autoware_system_msgs
Finished <<< tablet_socket_msgs [12.4s]
Starting >>> autoware_can_msgs
Finished <<< autoware_msgs [49.7s]
Starting >>> amathutils_lib
Finished <<< vector_map_msgs [55.5s]
Starting >>> vector_map
Finished <<< autoware_can_msgs [11.6s]
Starting >>> gnss
Finished <<< autoware_system_msgs [14.3s]
Starting >>> autoware_health_checker
--- stderr: amathutils_lib
/home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/src/kalman_filter.cpp: In member function ‘bool KalmanFilter::update(const MatrixXd&, const MatrixXd&, const MatrixXd&, const MatrixXd&)’:
/home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/src/kalman_filter.cpp:113:22: error: ‘isnan’ was not declared in this scope
if (isnan(K.array()).any() || isinf(K.array()).any())
^
/home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/src/kalman_filter.cpp:113:22: note: suggested alternative:
In file included from /usr/include/c++/5/complex:44:0,
from /usr/local/include/eigen3/Eigen/Core:28,
from /home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/include/amathutils_lib/kalman_filter.hpp:19,
from /home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/src/kalman_filter.cpp:17:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’
isnan(_Tp __x)
^
/home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/src/kalman_filter.cpp:113:48: error: ‘isinf’ was not declared in this scope
if (isnan(K.array()).any() || isinf(K.array()).any())
^
/home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/src/kalman_filter.cpp:113:48: note: suggested alternative:
In file included from /usr/include/c++/5/complex:44:0,
from /usr/local/include/eigen3/Eigen/Core:28,
from /home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/include/amathutils_lib/kalman_filter.hpp:19,
from /home/igs/bty_code/autoware/autoware.ai/src/autoware/common/amathutils_lib/src/kalman_filter.cpp:17:
/usr/include/c++/5/cmath:621:5: note: ‘std::isinf’
isinf(_Tp __x)
^
make[2]: *** [CMakeFiles/amathutils_lib.dir/src/kalman_filter.cpp.o] Error 1
make[1]: *** [CMakeFiles/amathutils_lib.dir/all] Error 2
make: *** [all] Error 2
---
Failed <<< amathutils_lib [ Exited with code 2 ]
Aborted <<< vector_map
Aborted <<< autoware_health_checker
Aborted <<< gnss
[69.325s] ERROR:colcon.colcon_core.event_reactor:Exception in event handler extension 'log': write to closed file
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/colcon_core/event_reactor.py", line 78, in _notify_observers
retval = observer(event)
File "/usr/lib/python3/dist-packages/colcon_output/event_handler/log.py", line 110, in __call__
h.write(line)
ValueError: write to closed file
[69.325s] ERROR:colcon.colcon_core.event_reactor:Exception in event handler extension 'status': <colcon_core.executor.Job object at 0x7f9191548898> ...
You are using Eigen3 in
/usr/local/include/eigen3
, but usually in kinetic,/usr/include/eigen3
should be used. I guess this is causing the error. Though I've installedEigen 3.3.7
and compiled Autoware, I couldn't get the exact same error.So, could you give me the results of two commands?
@Kenji Miyake the first result is blank. the second is
3.2.8
@JohnBT In Autoware docker environment, the following is the result, so there is a difference.
How did you install Eigen3? I'll try to install Eigen 3.2.8 in the same way and to reproduce the problem.
@Kenji Miyake eigen3.2.8 seems to be downloaded from http://eigen.tuxfamily.org/index.php?....
add
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/include/eigen3
to.profile
Did you try this step? I guess you are missing it.
The output should be like this.
I could reproduce the error, so will write an answer soon.
@Kenji Miyake thanks a lot . I will try your solution later.