[Qgis-developer] Re: OSX build notes

Tim Sutton tim at linfiniti.com
Tue Jun 5 01:13:49 EDT 2007


2007/6/4, William Kyngesburye <woklist at kyngchaos.com>:
> OK, so I had some time today and broke down and tried the cmake thing
> on OSX.

Yay :-)

  Here are a few notes about Tim's wiki instructions after a
> quick run thru (I tried 0.8.0 first, but moved on to 0.9 trunk).

Its working for me with both 0.8.1 branch and trunk

> - Python - for a universal build, add the -n flag to the SIP
> configure.  PyQt picks this up and automatically builds universal.

Like this you mean?

python configure.py -n

> - I wasn't too keen on the cmake binaries installing in /usr (that
> should be left alone, for system stuff), so I built from source using
> the default /usr/local.  Pretty simple:

Ok - in the instructions I suggested to build in your home dir like this:


> ./bootstrap
> make
> sudo make install

Where does ./bootstrap come from?

> - the Subversion requirement could be removed, to simplify for those
> who just want to build Qgis.  Use the web SVN interface to Qgis
> source and download tarballs from there.

Right I think Magnus Homann has done similar on the CMake backport he
did to 0.8. branch. Ill take a look.

> - it would be nice to list variables for configurable dependencies.
> I have some static libs in non-standard locations.  Or maybe the
> ccmake interactive configure can take care of this?

I think you can set pretty much everything in ccmake or by editing
CMakeCache.txt (==hack I think). Did you have probelsm with gdal.so
etc? Will be nice if we can get the mac version to use .dylib rather.
In openModeller I edited cmake/FindGDAL etc scripts to achieve this
but I dont know if thats the best way...

> - The autodetect for GRASS needs work.  The way I set up the OSX app
> build in the GRASS source (so it's official now) the major.minor
> version is now in the name (so people can more easily have stable and
> CVS versions side-by-side).  ie GRASS-6.2.app.
> So, it should try a versioned GRASS.app first, but how to pick which
> one I don't know (it can't really tell which is stable and which is
> not).  Maybe one of those cmake variables that the user can set?

Hmm Im not sure how it can tell either. Martin? I guess we could scan
for /Applications/QGIS* and then do a little scripting to get the
highest version no....(in cmake/FindGRASS )

> Otherwise a manual GRASS_PREFIX setting is needed.
> - I see some universal flags in the resulting cmakecache.txt, though
> just my architecture is set.  I tried editing cmakecache.txt to set
> both architectures, but it's not adding those flags to compile and
> link.  How do I turn on a universal build?  Or do I need to manually
> add the flags for now?

specify CMAKE_OSX_ARCHITECTURES as i386;ppc

I havent been able to successfully make a universal binary yet - I
guess some of my deps need to be compiled as unoversal too. Did you
see in my wiki notes where I should have done this for gsl etc? Or
does it happen automagically?

> - and then I get stuck at:
> cc1plus: warnings being treated as errors
> ...
> /Users/Shared/src/qgis/qgis-svn-070604/src/core/qgsgeometry.cpp:2511:
> warning: comparison between signed and unsigned integer expressions

Ok this is fixed in SVN. By default the pedantic flag is on and all
warnings are treated as errors. You can turn the pedantic flag off in
ccmake (though I recommend you keep it on and let us know if you get a
similar warning).

> PS. thanks for the tip about the FIXMEs in the GEOS 3 headers.  I'll
> comment those out for an update to the framework release.

Great thanks!

Many thanks for your fantastic work once again getting those
frameworks done! They really do make getting up & running on the mac a



> -----
> 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

Tim Sutton

Visit http://qgis.org for a great Open Source GIS
Home Page: http://linfiniti.com
Skype: timlinux
MSN: tim_bdworld at msn.com
Yahoo: tim_bdworld at yahoo.com
Jabber: timlinux
Irc: timlinux on #qgis at freenode.net

More information about the Qgis-developer mailing list