Bug #1028
HAVE_BUGGY_SINCOS test is wrong
Status: | Closed | Start date: | 2017-01-15 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | - | |||
Target version: | Candidate for next bugfix release | |||
Affected version: | 5.x-svn | Platform: |
Description
See Peter
Regarding cmake/modules/ConfigureChecks.cmake
First the "#" should clearly be in front of the line
include <math.h>"
Second, the result is "1" when sincos works (see the comment "/* return TRUE if sincos works ok */"
The check clearly is meant to detect a sincos function that doesn't change c or s ... this may have been the case for some implementation on sincos on some platform.
Normally, it should return "1" on FAILURE, so the we need this line instead
return (s == s1 || c == c1);} /* return TRUE if sincos fails */
History
#1
Updated by Remko over 1 year ago
- Status changed from New to Resolved
- Assignee set to Remko
- % Done changed from 0 to 100
#2
Updated by Florian over 1 year ago
Should we just remove this check altogether? This is an ancient leftover from the autotools configure checks. Are you aware of any faulty implementations of sincos?
#3
Updated by Paul about 1 year ago
This dates way back to when some alpha chip(?) systems had a buggy sincos. It is at least 10 years and was added by Lloyd Parkes in New Zealand. I am sure it could be removed. Lloyd has not been active with GMT for probably 5 years and has not registered with the wiki.
#4
Updated by Paul about 1 year ago
- Status changed from Resolved to In Progress
See issue # 1033. Now we get SEGV under WIndows 10 Ubuntu as well. Something was broken in this fix.
#5
Updated by Paul about 1 year ago
Under Ubuntu on Windows 10 the revised test says SINCOS is buggy and then our sincos replacement code is compiled. Yet, sincos exists and for unclear reasons when sincos is called we do enter into the code in gmt_notposix.c and it crashes. Not clear in ddd why it crashes. I think the fix needs to be revised. I agree with the missing hashtag in front of the include but not with the reversal of the test. I have put back the test the way it was. FYI, when I try that dummy program with sincos under WIn10 Ubuntu the results are correct. Yet, after the fix cmake says sincos is buggy.... Update in r17487.