This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 1484

Summary: compilation failure in MatrixExponential.h due to LDBL_MANT_DIG == 113
Product: Eigen Reporter: Neal Norwitz <nnorwitz>
Component: Unsupported modulesAssignee: Nobody <eigen.nobody>
Status: REOPENED ---    
Severity: Compilation Problem CC: chtz, gael.guennebaud, rmlarsen
Priority: Normal    
Version: 3.3 (current stable)   
Hardware: ARM - general   
OS: Linux   
Whiteboard:

Description Neal Norwitz 2017-11-09 16:38:24 UTC
I'm trying to build Eigen for an Nvidia Jetson TX-2 device.  I'm having several problems.  First,

$ aarch64-grtev4-linux-gnu/bin/g++ -E -dM - < /dev/null | grep LDBL_MANT
#define __LDBL_MANT_DIG__ 113

From https://eigen.tuxfamily.org/dox/unsupported/MatrixExponential_8h_source.html line 338 says that LDBL_MANT_DIG > 112 should be handled in compute.  However, on line 366 below, it calls the function directly in all cases.  So that comment seems out of date.  The <= 112 path is also broken since maxnorm is used on line 329, however, it's not defined as the other cases.  Tracking back to 2011, the value seems like it should be:
   const double maxnorm = 2.884233277829519311757165057717815L;

At this point, I'm not sure of the correct fix to get the build working.  Can you advise what's the best way to fix this?  I'm happy to test things out since I realize this platform isn't that well supported.  It's roughly gcc 4.9 + nvidia fixes IIUC.
Comment 2 Gael Guennebaud 2017-11-10 09:29:40 UTC
This should do the job (tested with boost::mp::float128):

https://bitbucket.org/eigen/eigen/commits/d53cb00f85f5/
Changeset:   d53cb00f85f5
User:        ggael
Date:        2017-11-10 09:25:41+00:00
Summary:     Bug 1484: restore deleted line for 128 bits long doubles, and improve dispatching logic.

3.3 backport: https://bitbucket.org/eigen/eigen/commits/dffc0f957f19/
Comment 3 Rasmus Munk Larsen 2018-08-21 17:40:20 UTC
The fix in https://bitbucket.org/eigen/eigen/commits/d53cb00f85f5/ is not sufficient, since if LDBL_MANT_DIG >= 112, we get into the branch that calls assert. We need to change 

#elif LDBL_MANT_DIG <= 112

to 

#elif LDBL_MANT_DIG <= 113
Comment 4 Nobody 2019-12-04 17:16:25 UTC
-- 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/1484.