-
Notifications
You must be signed in to change notification settings - Fork 7
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
new macro to check and test for lib and header (#143) #148
Conversation
@svigerske, I've ended up doing a fair bit of tweaking to |
Yes, that should be no problem. |
Well piffle! Apologies for polluting the log with all those past commits. I'm still baffled by git some days. Looked much cleaner locally, a nice fast-forward with four commits. Anyway, I'm hoping this addresses all the issues except the question of splitting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm ... maybe I should have clicked 'leave a single comment' instead of 'start a review.'
Before we merge this, let's clean up the history a bit. Lou, I guess you are pulling master with the default merging behavior. You need to pull with rebase in order to avoid all of those old commits coming in. You will need to do a force push to your fork after rebasing, but this shouldn't cause any issues for branches where you are the only contributor. (You can make pulling with rebase your default with |
@svigerske, here's the mass of changes I mentioned in email. I've pulled |
@svigerske, doing a drive-by check and noticed the `thumbs up'. Let me know when (if) you think we're ready to try and merge this and I'll do up a clean pull request. Given the changes, we may well see the occasional bit of breakage in existing configure.ac and Makefile.am. If there are any projects you think might be at risk, let me know. I should have the odd day over the next few weeks and can try to test. |
I think the changes are ready to be tried. Not sure I am ready, too. We shouldn't merge before trying them. We can do this in separate branches of your and my favorite projects to see what Teds travis and appveyor tests are saying. |
I tried AC_COIN_CHK_LIBHDR in this form:
and it works when I specify no flags for SoPlex, flags for SoPlex 3.1.1, and flags for current SoPlex for configure.
(I find all these linebreaks too much, but ok). My concern is that configure keeps running, finishing with
I think it should stop with an error if the flags that the user provided explicitly do not work. |
On Cbc, there is
I configure with But the macro seems to record
and this gives me a number of warnings from the finalize_flags part in configure:
(and linking fails) If a user specifies some |
I've now tried this on Ipopt, CoinUtils, Osi, and Cbc in branches configure-update. In the configure.ac, I removed the use of
We also need to update the docu in docs/configure.md before merging. |
@svigerske, I've made a pair of small changes as suggested in your comments. CHK_LIBHDR issues the same warning message as before, then forces an error stop if the failure results from user-supplied flags. FIND_PRIM_PKG now clears prim_pcfiles if the user supplies any flags. See if this does it for you. |
@svigerske, I hate to bring up a new glitch, but as I got to rewriting configure.md I ended up looking at COIN_CHK_HERE, and now I'm looking at commit 5fae467. Seems to me the check
is the wrong check, it should consider Which got me to thinking, 'What if I want to use CHK_HERE for a primary that doesn't get installed? No reason that it should have a .pc file, it's not useful.' So maybe CHK_HERE really does need to consider the possibility that there is no .pc file. The change would not be backward compatible. There are surely places where the default is used. Osi2, for one. Still, if we're going to change, this is as good a time as any. |
So fixing up the documentation is a good thing. 1f15721 because I thought maybe it'd be good to actually check that COIN_SKIP_PROJECTS works :-) |
@svigerske, I've done a major rewrite of configure.md. See what you think. |
Yes, right. I fixed that in this branch now (67267ca).
Yes, would be ok to change this now. |
Looks very good. Thank you! |
So, to me, this looks good now. My machine and travis+appveyor were ok on the corresponding branches of Ipopt, CoinUtils, Osi, and Cbc. @LouHafer Can we just merge this, or you want to work a bit more on |
@svigerske, it's true that the issue with |
…_LIB. Various tweaks to coin.m4 to correct some incorrect calls to DEF_PRIM_ARGS.
… Change CHK_LAPACK to look for dorhr_col (embedded underscore, so we get that right) and produce a readable `checking for Lapack' message.
…t it does a better job with command line parameters. Adjust CHK_LIB_HDR so that any of --with-prim, --with-prim-lflags, --with-prim-cflags, --with-prim-data override a default do not use. Use CPPFLAGS instead of CXXFLAGS for compile and link checks. Do not guess default values for lflags, data. Add helpful advice in the event of compile or link failure.
specifically designed to confirm only the ability to link.
CHK_LIBHDR, and CHK_LIB to change the usage keywords from {yes, no, build} to {default_use, default_skip, default_build}. Also added an m4_fatal trap to catch attempts to use default_build in the CHK_LIB / CHK_LIBHDR chain at run_autotools (so the developer can change it). Only CHK_PKG recognises this option.
complete rewrite of both to match the behaviour of the LIBHDR chain. Fixed dfltaction = build as best it can be fixed. Added warnings that appear from run_autotools to prompt maintainers to quit using it.
dfltaction=build. From the LIBHDR chain, this triggers a fatal error at run_autotools execution. From the PKG chain, it's just a warning.
- echo flags used within check-result line to avoid strange configure output - echo user-lapack flags also if error - remove sgi handling for lapack (no way to test this)
- suppress in lapack check only
- e.g., argument 3 of AC_COIN_TRY_LINK([pardiso_ipopt_newinterface],[$pardiso_lflags $lapack_lflags],[$lapack_pcfiles],...) is not empty, but $lapack_pcfiles may be
- dorhr_col is Lapack 3.9 (released 11/21/19, https://github.com/Reference-LAPACK/lapack-www/blob/master/lapack-3.9.0.txt), which hasn't been spread around much yet and COIN-OR projects typically don't require such a new version
- will no longer be used and can be replaced by a AC_COIN_TRY_LINK call, e.g., as in coin-or/Ipopt@eb7c15a
- since having an underscore seems to be the default on my system for fortran codes (gfortan 10)
…rack the presence of user flags and force a stop on error if they don't work.
CHK_PKG and CHK_LIBHDR.
- before: configure: error: Aborting configure; user-specified flags failed. - new: configure: error: user-specified flags for SoPlex do not work. - since this is the last message, I think it is pretty clear that configure aborted
- meant to test whether m4_default($3,m4_tolower($1)) is not empty - and it cannot be empty
- because they typically rely on libtool, too
- the variables would be COIN_HAS_SUB_TRUE and COIN_HAS_SUB_FALSE
- projects may still require an explicit -lm on the linkline, which they don't get just from the coinutils so depending on libm
So I did a |
Adds macro
and replaces
AC_COIN_CHK_LIB
by a wrapper aroundAC_COIN_CHK_LIBHDR
.