Conflicting declaration ‘typedef __fp16 float16_t’

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

we are getting error(conflicting declaration ‘typedef __fp16 float16_t’), when we add eigen library in our code.
is there any work around for this issue ? im attaching the errors below

/home/agx-pegasus/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/include/arm_neon.h:72:16: error: conflicting declaration ‘typedef __fp16 float16_t’
typedef __fp16 float16_t;
In file included from /usr/local/driveworks/targets/aarch64-Linux/include/dw/sensors/Sensors.h:62:0,
from /home/agx-pegasus/dw-ros/src/nv_radar_multiple/include/radar.h:14,
from /home/agx-pegasus/dw-ros/src/nv_radar_multiple/src/radar.cpp:13:
/usr/local/driveworks/targets/aarch64-Linux/include/dw/core/Types.h:75:16: note: previous declaration as ‘typedef struct __half float16_t’
typedef __half float16_t;
In file included from /home/agx-pegasus/dw-ros/src/nv_radar_multiple/src/Eigen/Core:129:0,
from /home/agx-pegasus/dw-ros/src/nv_radar_multiple/src/Eigen/Dense:1,
from /home/agx-pegasus/dw-ros/src/nv_radar_multiple/src/radar.cpp:21:
/home/agx-pegasus/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/include/arm_neon.h: In function ‘float16x4_t vld1_f16(const float16_t*)’:
/home/agx-pegasus/nvidia/nvidia_sdk/DRIVE_OS_5.2.0_SDK_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.3.1/include/arm_neon.h:17049:40: error: cannot convert ‘const float16_t* {aka const __half*}’ to ‘const __fp16*’ for argument ‘1’ to ‘__vector(4) __fp16 __builtin_aarch64_ld1v4hf(const __fp16*)’
return __builtin_aarch64_ld1v4hf (__a);

we have gone through the below thread but we are not sure how to solve, let me know if it has work around.


Hi @vimal.prasath,

Please share the source file you changed for our reproducing. Thanks.

We get this error when i include the #include “Eigen/Dense”. im attaching the following header files as well.
Dense (122 Bytes)
Core (12.5 KB)
in 129th line of core file you can find the arm_neon.h is called.


Please see if any preprocessor in Eigen: Preprocessor directives can work around this. Or below line in OpenCV - compile OpenCV 4.1.1 on Drive Software 10.0 helps on this issue.

sed -i ‘s/include <Eigen/Core>/include <eigen3/Eigen/Core>/g’

Thank you i solved the issue.

#define float16_t eigen_broken_float16_t
#include "Core"
#include "LU"
#include "Cholesky"
#include "QR"
#include "SVD"
#include "Geometry"
#include "Eigenvalues"
#undef float16_t

Thanks for sharing back.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.