When cross-compiling from Ubuntu 14.04 to QNX 6.5.0 using qcc (based on gcc 4.4.2), I get the following build errors such as these ones: ``` /home/antonio/Public/install/QCC/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h: In function 'Eigen::half Eigen::half_impl::log(const Eigen::half&)': /home/antonio/Public/install/QCC/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h:395: error: '::logf' has not been declared /home/antonio/Public/install/QCC/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h: In function 'Eigen::half Eigen::half_impl::log10(const Eigen::half&)': /home/antonio/Public/install/QCC/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h:402: error: '::log10f' has not been declared /home/antonio/Public/install/QCC/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h: In function 'Eigen::half Eigen::half_impl::sqrt(const Eigen::half&)': /home/antonio/Public/install/QCC/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h:405: error: '::sqrtf' has not been declared ``` ``` ``` /home/antonio/Public/install/QCC/include/eigen3/Eigen/src/Core/util/Memory.h:496: error: 'memcpy' was not declared in this scope ``` I managed to fix these errors with this patch, but I don't know if it's the best solution: ``` diff -ru eigen3.orig/Eigen/src/Core/arch/CUDA/Half.h eigen3/Eigen/src/Core/arch/CUDA/Half.h --- Eigen/src/Core/arch/CUDA/Half.h 2017-09-14 17:53:15.318720104 +0200 +++ Eigen/src/Core/arch/CUDA/Half.h 2017-09-14 18:05:20.774726963 +0200 @@ -42,6 +42,7 @@ #define EIGEN_EXPLICIT_CAST(tgt_type) operator tgt_type() #endif +#include <math.h> namespace Eigen { diff -ru eigen3.orig/Eigen/src/Core/util/Memory.h eigen3/Eigen/src/Core/util/Memory.h --- Eigen/src/Core/util/Memory.h 2017-09-14 17:53:15.318720104 +0200 +++ Eigen/src/Core/util/Memory.h 2017-09-14 18:13:17.850731474 +0200 @@ -20,6 +20,8 @@ #ifndef EIGEN_MEMORY_H #define EIGEN_MEMORY_H +#include <string.h> + #ifndef EIGEN_MALLOC_ALREADY_ALIGNED // Try to determine automatically if malloc is already aligned. ```
Could you try if replacing ::logf by std::log (or by numext::log), etc works as well? Also, try replacing memcpy by std::memcpy (not sure why it is not there)
> Could you try if replacing ::logf by std::log (or by numext::log), etc works as well? Works, without the need to include any header. > Also, try replacing memcpy by std::memcpy (not sure why it is not there) Works, without the need to include any header.
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1468.