Linux wheels builds failing with: error: lvalue required as unary ‘&’ operand
All the Linux wheels builds have been failing for some time, looks like since !1608 (merged) was merged.
There are many errors of the form:
LALSimIMRPhenomTHM_internals.c: In function ‘IMRPhenomTSetPhase22Coefficients’:
LALSimIMRPhenomTHM_internals.c:408:16: error: lvalue required as unary ‘&’ operand
408 | REAL8 ascut = GSL_REAL(gsl_complex_arcsinh(phi));
| ^~~~~~~~
Full build log is here.
/cc @riccardo-sturani, @@leo-singer
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Developer
cc @hector.estelles as PhenomTHM developer
- David Keitel added lalsimulation prioritymustfix labels
added lalsimulation prioritymustfix labels
- Developer
The wheels are currently built with GSL 2.6. I noticed the following in the GSL 2.7 change log:
What is new in gsl-2.7:
...
- added support for native C complex number types in gsl_complex when using a C11 compiler
I'll try updating GSL. Does LALSuite now require GSL 2.7? If so, then the check in configure.ac should be updated to reflect that.
- Developer
Wait, no, I already updated to GSL 2.7 in lalsuite-manylinux!20 (merged)...
- Developer
The date that the wheels started failing is also consistent with the date that I merged lalsuite-manylinux!20 (merged). So does LALSuite require GSL <= 2.6?
- Author Owner
The macOS machines have GSL-2.7 and don't exhibit the same error.
- Author Owner
Can you please look at this ASAP as I'm trying to get a release out. If it's not addressed by the end of the week I will revert the change that introduced the problem.
- Owner
@leo-singer, @hector.estelles, I think I have seen that make changes of this sort resolves the errors:
@@ -1753,7 +1755,8 @@ double IMRPhenomTRDAmpAnsatzHM(REAL8 t, IMRPhenomTHMAmpStruct *pAmp) REAL8 c1 = pAmp->c1_prec; gsl_complex phi = gsl_complex_rect(c2*(t-tpeak) + c3,0); - REAL8 tanh = GSL_REAL(gsl_complex_tanh(phi)); + gsl_complex tanhc = gsl_complex_tanh(phi); + REAL8 tanh = GSL_REAL(tanhc); REAL8 expAlpha = exp(-pAmp->alpha1RD_prec*(t-tpeak));
but I have no real understand of why this works.
Collapse replies - Owner
For (fairly) obvious reasons, the following works, and may be cleaner:
@@ -1752,8 +1759,8 @@ double IMRPhenomTRDAmpAnsatzHM(REAL8 t, IMRPhenomTHMAmpStruct *pAmp) REAL8 c2 = pAmp->c2_prec; REAL8 c1 = pAmp->c1_prec; - gsl_complex phi = gsl_complex_rect(c2*(t-tpeak) + c3,0); - REAL8 tanh = GSL_REAL(gsl_complex_tanh(phi)); + gsl_complex phi = gsl_complex_tanh(gsl_complex_rect(c2*(t-tpeak) + c3,0)); + REAL8 tanh = GSL_REAL(phi); REAL8 expAlpha = exp(-pAmp->alpha1RD_prec*(t-tpeak));
- Developer
Does
GSL_REAL((gsl_complex) gsl_complex_arcsinh(phi))
work? Collapse replies - Owner
@leo-singer, no:
LALSimIMRPhenomTHM_internals.c: In function 'IMRPhenomTRDAmpAnsatzHM': LALSimIMRPhenomTHM_internals.c:1756:16: error: lvalue required as unary '&' operand 1756 | REAL8 tanh = GSL_REAL((gsl_complex) gsl_complex_tanh(phi)); | ^~~~~~~~
- Adam Mercer mentioned in merge request !1632 (merged)
mentioned in merge request !1632 (merged)
- Adam Mercer mentioned in merge request !1631 (merged)
mentioned in merge request !1631 (merged)
- Duncan Macleod mentioned in merge request !1634 (merged)
mentioned in merge request !1634 (merged)
- Duncan Macleod assigned to @duncanmmacleod
assigned to @duncanmmacleod
- Duncan Macleod mentioned in commit 103b3bf2
mentioned in commit 103b3bf2
- Duncan Macleod closed with merge request !1634 (merged)
closed with merge request !1634 (merged)
- Patrick Godwin mentioned in merge request gstlal!104 (merged)
mentioned in merge request gstlal!104 (merged)