Skip to content
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

Fix DEBUG_4ti2 build: Replace lp->it_cnt by lpx_get_int_parm #18

Open
mkoeppe opened this issue Aug 24, 2018 · 0 comments
Open

Fix DEBUG_4ti2 build: Replace lp->it_cnt by lpx_get_int_parm #18

mkoeppe opened this issue Aug 24, 2018 · 0 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 24, 2018

From Jerry James for Fedora:

there is a bug in the patch, but only for debug builds. Where the old version had:

  lpx_get_int_parm(lp, LPX_K_ITCNT)

the patched version has:

  lp->it_cnt

which is only correct if the compiler can see the structure definition. By default, that is not the case; it is an opaque type. I complained to glpk upstream about the lack of a way to get this information with the new API. I was promised that the next release of glpk will have a function glp_get_it_cnt() to retrieve it. However, that next release hasn't happened yet. Anyway, if you want those DEBUG_4ti2() forms to compile correctly, you'll have to arrange to see the internal structure for now, then migrate to glp_get_it_cnt() once it is actually available, or patch your copy of glpk to add glp_get_it_cnt(). We did the latter for Fedora, with the attached patch. It guards the new function with FEDORA_GLPK_ITCNT to avoid compatibility problems; you probably don't want that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant