-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building without one of the HAVE_DOUBLE constants fails #278
Comments
Rechecked: the things in error are
Those use the Until this is solved I suggest to adjust gmp-impl.h (patch for 3.0.0 version but current version in master has no change in that area): @@ -3404,9 +3404,8 @@
} s;
double d;
};
-#endif
-#if HAVE_DOUBLE_IEEE_LITTLE_ENDIAN
+#elif HAVE_DOUBLE_IEEE_LITTLE_ENDIAN
#define _GMP_IEEE_FLOATS 1
union ieee_double_extract
{
@@ -3419,9 +3418,8 @@
} s;
double d;
};
-#endif
-#if HAVE_DOUBLE_IEEE_BIG_ENDIAN
+#elif HAVE_DOUBLE_IEEE_BIG_ENDIAN
#define _GMP_IEEE_FLOATS 1
union ieee_double_extract
{
@@ -3434,6 +3432,10 @@
} s;
double d;
};
+
+#else
+#error currently unsupported environment, see #278
+
#endif |
Rechecked with GMP 6.1.2 - those check the define before using the structure. I'll create a PR to do the same. |
I eventually just defined it... but in the meantime I did a successful compile without. The tests fail though, I think mpr_set_d can get into a loop dividing infinity by a rational number and the exit condition never gets met (because infinity/x = infinity). |
I'm posting the direct error I faced as it took a while to find the related issue:
Hopefully this comes up better in searches for lost people like me. |
@GitMensch I tried your patch, but I still ended up with errors. I created my own (incorrect, but building) patch #296 for anyone that comes across this issue.
Would really appreciate such a PR, if you get around to it would love a cc. |
I'm building in MSYS2 on WIN64, actually testing my compiler (orange C) on the mpir sources... one of the problems I'm having seems to be on your end. That is that none of the HAVE_DOUBLE_* constants are getting defined. I think because the object file format of orange C is ASCII rather than BINARY. From what I can tell the floating point detection in the autoconfig files needs a binary object file format.
Which itself isn't the real issue. Unfortunately a side effect of not having one of the HAVE_DOUBLE_* constants defined is that the definition of 'union ieee_double_extract' is never made, but it is referenced anyway by at least one of the files in the mpn directory. The compiles fail at that point.
The text was updated successfully, but these errors were encountered: