#2497 closed defect (fixed)
check whether libm defines sincos() at configure time
Reported by: | msieczka | Owned by: | Mateusz Łoskot |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.3 |
Component: | ConfigBuild | Version: | svn-trunk |
Severity: | critical | Keywords: | unix libm math sincos |
Cc: | Mateusz Łoskot, Even Rouault |
Description
On GRASS and QGIS MLs it was noticed that GDAL should "be a bit more careful about defining sincos, i.e. have configure actually check whether libm defines sincos()". See [1], [2] for the whole story, [3] for resume.
In the discussion on GDAL ML [4] Andrew Brooks adds:
"And don't forget that on Solaris sincos() is defined in libsunmath. On old versions of Solaris it used to be wise to use -Bstatic -lsunmath -Bdynamic in case libsunmath was not installed by default." [1]http://www.nabble.com/forum/ViewPost.jtp?post=18555960&framed=y [2]http://www.nabble.com/forum/ViewPost.jtp?post=18581292&framed=y [3]http://www.nabble.com/forum/ViewPost.jtp?post=18579971&framed=y [4]http://www.nabble.com/forum/ViewPost.jtp?post=18583950&framed=y
Change History (10)
comment:1 by , 16 years ago
Cc: | added |
---|---|
Keywords: | unix libm math sincos added |
comment:2 by , 16 years ago
Cc: | added |
---|---|
Priority: | high → normal |
comment:3 by , 16 years ago
I'd draw something like this:
- Detect sincos from ./configure script
- Set preprocessor macro if native sincos implementation available, ie. HAVE_SINCOS
- Wrap private implementations of sincos with #ifdef HAVE_SINCOS
- Detect target platform and
- on Unix - add libm
- on Solaris - add libsunmath to linker flags
comment:4 by , 16 years ago
My understanding is that Even removed use of sincos() from our copy of the hdfeos code. So it isn't clear to me that we need any of this detection stuff. Perhaps I'm misunderstanding?
comment:5 by , 16 years ago
I understand it, but I still see the second part of the issue: distinguish platforms (Unix and Solaris, at least) to be able to set proper linker flags.
follow-up: 7 comment:6 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Folks,
As we have clarified and confirmed with Frank that GDAL does not use sincos function. So, we have came to the following conclusion:
- Even's patch removing private implementation of sincos is sufficient to fix the problem
- We do not need to distinguish Linux and Solaris in order to add specific math library to linker flags
Shortly, fix for #2494 is supposed to fix this problem as well.
Maciej,
Please, could you confirm the problem has been fixed in GDAL SVN?
comment:7 by , 16 years ago
comment:8 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Maciej,
Good to hear. So, I think I can close the ticket.
follow-up: 10 comment:9 by , 15 years ago
Paolo,
What GDAL version do you use? If you use GDAL 1.5.2 + SVN r14997 or greater is the problem gone? I suggest to close the ticket then.
comment:10 by , 15 years ago
Replying to msieczka:
Paolo,
What GDAL version do you use? If you use GDAL 1.5.2 + SVN r14997 or greater is the problem gone? I suggest to close the ticket then.
Sorry for this entry. It was supposed to go to http://trac.osgeo.org/grass/ticket/361 where this GDAL issue has re-appeared.
See also #2494 related to the sincos() issue.
Even, perhaps you can advise on what ought to be done? Feel free to assign the ticket to mloskot if there is work to do and you don't want to do it yourself.