[Qgis-developer] OS X trunk build issues

John C. Tull john.tull at wildnevada.org
Wed Nov 17 00:07:28 EST 2010


I took out all of the ifdef's setting math.h for OS X on these and other header files that used that. Additionally, I had to append "std::" to the isnan and isinf in the two if statements, e.g.:
    if ( std::isnan( inX[i2] ) || std::isnan( inY[i2] ) || std::isinf( inX[i2] ) || std::isinf( inY[i2] )
         || std::isnan( inX[i1] ) || std::isnan( inY[i1] ) || std::isinf( inX[i1] ) || std::isinf( inY[i1] ) )

in the qgsclipper.h file. Likely, there might need to be an ifdef for Q_OS_MACX in this file for this. I got a successful build afterwards.

John

On Nov 16, 2010, at 5:10 PM, William Kyngesburye wrote:

> ... Well, the problem is not isnan, that's just what r14601 mentioned.  The problem is abs(), and this has come up before for OS X - I think it had something to do with the order of includes.
> 
> There are a lot of places in Qgis that use abs() (more than just the 2 interpolator sources changed in r14601), and they generally include cmath/math.h after most other includes.  Strange, there is a lot of inconsistent use of the includes and function calls:
> 
> some always include cmath and use std::abs()
> 
> some conditionally include math.h for OS X and cmath for all other systems, and use abs() (without the std C++ namespace)
> 
> ... so, cmath seems to work on OS X in those other parts of Qgis (maybe there were problems with cmath on older OS X systems?), so just always include cmath.  Worked for me on 10.6, but should be checked on older systems (at least 10.5).  I might be able to try that this week (I do need to build the 1.6 PPC package still).
> 
> On Nov 16, 2010, at 5:56 PM, John C. Tull wrote:
> 
>> Things are still not working for me, and I have been behind a firewall unable to get on irc to chat with Jüergen. Perhaps I can assist in testing some code ideas he may have later in the week.
>> 
>> On Nov 16, 2010, at 3:54 PM, William Kyngesburye wrote:
>> 
>>> I think I saw something pass thru the tracker with some isnan updates, after r14601.  But I haven't tried anything in svn yet.
>>> 
>>> On Nov 16, 2010, at 5:39 PM, John C. Tull wrote:
>>> 
>>>> Hi William,
>>>> 
>>>> Have you attempted to build off of the current trunk source? I'd be interested in your verification of the issue that I presented in this ticket:
>>>> http://trac.osgeo.org/qgis/ticket/3215
>>>> 
>>> 
>>> 
>>> -----
>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>> http://www.kyngchaos.com/
>>> 
>>> "Oh, look, I seem to have fallen down a deep, dark hole.  Now what does that remind me of?  Ah, yes - life."
>>> 
>>> - Marvin
>>> 
>>> 
>> 
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
> 
> "The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."
> 
> - the wisdom of Tarzan
> 
> 
> 
> 
> 



More information about the Qgis-developer mailing list