Skip to content

Build Failure with CMake and pydifem #2

@abdelhakim96

Description

@abdelhakim96

Issue: Build Failure with CMake and pydifem
Summary:
I'm experiencing a build failure when compiling the pydifem.cc file due to an error related to the isfinite function in Eigen with CppAD::AD. The issue occurs while building the project using CMake on a Linux environment.

Environment Details:
OS: Linux (Ubuntu/Debian)
Compiler: GCC (version 11.4)
Eigen Version: 3.4
CppAD Version: 2021.00.00.8
Python Version: 3.8 (Conda environment)
CMake Version: 3.22.1

FAILED: CMakeFiles/pydifem.dir/python/pydifem.cc.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB ... -c /home/hakim/diff_fem/python/pydifem.cc
In file included from /usr/include/eigen3/Eigen/Core:171,
from /home/hakim/diff_fem/python/../sim/diff/cppad_utils.h:25,
from /home/hakim/diff_fem/python/pydifem.cc:8:
/usr/include/eigen3/Eigen/src/Core/MathFunctions.h: In instantiation of
‘typename Eigen::internal::enable_if<((! std::is_integral<_Tp>::value) && (!
Eigen::NumTraits::IsComplex)), bool>::type Eigen::internal::isfinite_impl(const T&)
[with T = CppAD::AD; typename Eigen::internal::enable_if<((!
std::is_integral<_Tp>::value) && (! Eigen::NumTraits::IsComplex)),
bool>::type = bool]’:
/usr/include/eigen3/Eigen/src/SVD/JacobiSVD.h:680:26: required from
‘Eigen::JacobiSVD<MatrixType, QRPreconditioner>::JacobiSVD(const MatrixType&, unsigned int)’
[with _MatrixType = Eigen::Matrix<CppAD::AD, 3, 3, 0, 3, 3>; int QRPreconditioner = 2]

...

/usr/include/c++/11/cmath:578:5: note: candidate: ‘template constexpr
typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value,
bool>::__type std::isfinite(_Tp)’
error: no matching function for call to ‘isfinite(const CppAD::AD&)’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions