-
Notifications
You must be signed in to change notification settings - Fork 5
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
Build script fails on OS X because it is unable to check if an IEEE floating point value is finite #18
Comments
@mandeluna --- Looks like I just need to update dylp's configure to use the current coin macros for isfinite and isnan. One of the many rough edges to smooth out in this update. I'll do that over the course of the day and try to have something ready this afternoon or tomorrow. If there are no issues with configuration of CoinUtils, this should work, as CoinUtils uses the same macros I'm going to plug into dylp. You can check by looking in the build directory at the file CoinUtils/src/config.h, the symbol COINUTILS_C_FINITE. If it's defined to something sensible, we're good. |
Thanks @LouHafer -- CoinUtils builds with BuildTools/coin_math.m4 has a macro that handles this correctly |
Just keep in mind that there hasn't been a release of any projects in the Cbc stack using the "new" BuildTools ( |
@mandeluna, @tkralphs --- Ouch, forgot about that. I did (sort of) have to roll my own macro. The ones in coin_math.m4 insist on trying in the C++ context first, a non-starter for dylp. Easy enough to replace the guts of my old macros with the guts of the new coin macros, so I could try a backport. Painful, though. I've been working with BuildTools master ever since we got started writing the new version. I'll have to recreate an environment suitable for Buildtools/stable/0.8. @mandeluna, how important is that (compatibility with stable/0.8) to you? Do you actually work with the autotools stuff? Or will the ability to pull a working Dylp/master do the trick? |
I guess the main question is whether @mandeluna wants a homebrew install of DyLP, in which case there is no choice but for it to be from a release. |
I ran into this issue while trying to install Symphony. I still haven't got all the pieces to work together on this laptop as I have been working off the master branch, but I am curious about how well the solver performs on this architecture. I wanted to record the issue here in case others run into the same problem. It is not urgent for me, as I had dusted off an old computer and fell back to a precompiled Linux package for the work I was doing. |
@mandeluna, I've committed some revisions to dylp's configure macros (as per above, replaced the guts of the original macros in m4/ac_dylp_find_fp_funcs.m4 with the guts of the current macros from coin_math.m4). Give it a try when you have a chance and let me know if configure can find isfinite now. If it still fails, it'll help me if you attach the config.log file produced by when configure is run. |
|
@LouHafer thanks for the update. Unfortunately the macros are still unable to resolve the symbol. My configure output is here config.log It does not seem that AC_CHECK_DECL and friends are able to find this symbol in the C context (I have no idea why, I can see the definition in math.h). The following preprocessor check does work, but I don't know how or whether it makes sense to incorporate into a macro (
|
@mandeluna --- Good grief! And thanks for a working test! The `only available after GCC 10' isn't a problem, the test will simply fail :-). I'll see what I can do, various other distractions to deal with today. |
Just curious how you ran into this while installing SYMPHONY, which doesn't depend on DyLP. I guess that it can use DyLP as the underlying LP solver in principle, but I've never actually tried this. |
Hi @tkralphs -- I was unfamiliar with the project, and followed the basic instructions on the Github page:
It is building DyLP as a dependency, and everything stops with the error we have been discussing, excerpted below:
|
@mandeluna, I went in a slightly different direction and added The most curious thing (to me) about all this is that the check for isfinite fails but the check for isnan succeeds. Unfortunately, your configure doesn't include the failed program in config.log (except for once, at line 14902), so there's not as much information as I was hoping to get from it. |
Thanks @LouHafer. I have confirmed that I've excerpted some of Apple's math.h macro definitions and their commentary regarding the inlining of these calls. I think the declarations are inlined under normal circumstances, and resolve neither to a function nor a macro. It is puzzling that
|
@mandeluna, thanks for checking and for sending the excerpt from math.h. Looking at the excerpt, I'm thinking the macro resolves at compile time, when sizeof(x) should be a compile-time constant. But it won't work without an actual parameter (sizeof(1.0) maybe, sizeof() would be an error). What bothers me at this point is that the doc'n for AC_CHECK_DECL says "This macro actually tests whether symbol is defined as a macro or can be used as an r-value". The definitions for isfinite and isnan look to me to be identical, but isnan works and isfinite doesn't. It's a mystery. There's something we're missing. I'll try and incorporate your working test from a few days back into an autoconf macro. |
@mandeluna, I've attached two files (zipped), a revised configure script for dylp, and a revised copy of ac_dylp_find_fp_funcs.m4 so you can see what's happening in
Just replace dylp's configure with the one included here and give it a spin. Let me know what you see, please. Should avoid a lot of 'trying again' commits. |
Hi @LouHafer -- Very interesting indeed; this is very close to what I am seeing. The project builds without any additional tweaks and all 90 tests completed successfully.
|
@mandeluna, very interesting indeed. Because that first line ( |
Continuation of discussion with @LouHafer on coin-or-tools/homebrew-coinor #80
The root cause is that
isfinite
is a macro on Mac OS, so AC_CHECK_FUNC is unable to resolve the symbol inac_dylp_find_fp_funcs.m4
However, replacing the AC_CHECK_FUNC for
isfinite
with the following check does not resolve the symbol either:AC_CHECK_DECL([isfinite],[ac_name_of_isfinite=isfinite],,[#include <math.h>])
Some searching finds similar problems in the past:
https://list.coin-or.org/pipermail/coinutils/2011-November/000027.html
and
https://issues.fast-downward.org/issue295
According to the mailing list discussion, there seems to be (at least circa 2011) some odd behaviour related to importing <math.h> vs but the code builds with
isfinite
and usingstd::isfinite
seems ridiculous, and, anyway, after trying various permutations of those, it is still unable to resolve anything.Suggestions are welcome.
The text was updated successfully, but these errors were encountered: