[Qgis-developer] QGIS setup with Qt 5 on mac

Nyall Dawson nyall.dawson at gmail.com
Thu Jan 5 15:12:44 PST 2017


On 1 January 2017 at 09:41, Larry Shaffer <larrys at dakotacarto.com> wrote:

> Yep: https://github.com/Homebrew/homebrew-core/pull/8306
>
> Qt5 is now the default, since ~ yesterday, and `qt` and `pyqt` are now
> aliases to Qt5 formulae. I've pushed some fixes, please `brew update` try
> again.

Thanks Larry - that worked perfectly!

>
> Please try following the dev tutorial, once you have it building. Any
> feedback appreciated (using the github issue tracker there).
>
> https://github.com/qgis/homebrew-qgisdev/tree/master/development

Will do - it's not my machine, so I only get occasional access. I'll
let you know when I've given it a test.

Nyall


>
> Regards,
>
> Larry Shaffer
> Dakota Cartography
> Black Hills, South Dakota
>
>>
>>
>> Nyall
>>
>>
>>
>>
>>
>> >
>> > Takes ~ 18-20 mins to build on a newer Mac with 8 cores. There is a long
>> > pause when compiling src/core/qgsxmlutils.cpp (not sure why it happens
>> > only
>> > for a Homebrew formula).
>> >
>> > Note: there are definitely macOS-related bugs in the resultant QGIS.app.
>> > Please report them as QGIS bugs, unless you think it is related to the
>> > formula, then report on github tracker for homebrew-qgisdev repo.
>> >
>> > If you have the time, please test this and contribute however you can.
>> > Thanks!
>> >
>> > I am working on a 'qgis3-travis' formula, specific for use in main QGIS
>> > source tree Travis CI testing. Also working on an updated tutorial for
>> > using
>> > Qt Creator 4.1, etc. to develop on QGIS source based upon these formulae
>> > Homebrew dependencies (much easier now).
>> >
>> > Regards,
>> >
>> > Larry Shaffer
>> > Dakota Cartography
>> > Black Hills, South Dakota
>> >
>> > On Thu, Nov 17, 2016 at 6:55 PM, Larry Shaffer <larrys at dakotacarto.com>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> Quick update. Success! I've finally built QGIS 3 master branch off of
>> >> unmodified Homebrew dependencies, though had to edit several bits of
>> >> source
>> >> code and pull some hair out.
>> >>
>> >> QGIS version: 2.99.0-Master
>> >> QGIS code revision: 6727ea7
>> >> Compiled against: Qt 5.7.0
>> >> Running against Qt: 5.7.0
>> >> Compiled against GDAL/OGR: 2.1.2
>> >> Running against GDAL/OGR: 2.1.2
>> >> Compiled against GEOS: 3.5.0-CAPI-1.9.0
>> >> Running against GEOS: 3.5.0-CAPI-1.9.0 r4084
>> >> PostgreSQL Client Version: 9.6.1
>> >> SpatiaLite Version: 4.3.0a
>> >> QWT Version: 6.1.3
>> >> PROJ.4 Version: 493
>> >> QScintilla2 Version: 2.9.3
>> >> This copy of QGIS writes debugging output.
>> >>
>> >> and Python 3.5.2.
>> >>
>> >>
>> >> http://drive.dakotacarto.com/qgis/qgis3-master_homewbrew-macos-10.11.png
>> >>
>> >> It's take me a bit more time to commit proper changes, create the
>> >> qgis3-dev formula and add the docs for:
>> >>
>> >> https://github.com/qgis/homebrew-qgisdev
>> >>
>> >> Is anyone else already developing QGIS 3 master on Mac?
>> >>
>> >> Regards,
>> >>
>> >> Larry Shaffer
>> >> Dakota Cartography
>> >> Black Hills, South Dakota
>> >>
>> >> On Tue, Nov 8, 2016 at 1:02 PM, Rouzaud Denis <denis.rouzaud at gmail.com>
>> >> wrote:
>> >>>
>> >>> Hi Larry,
>> >>>
>> >>> Thanks a lot for tackling this!
>> >>> Glad to read it’ll land soon, but no pressure ;)
>> >>>
>> >>> Cheers,
>> >>> Denis
>> >>>
>> >>>
>> >>> On 8 Nov 2016, at 18:13, Larry Shaffer <larrys at dakotacarto.com> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> On Sun, Nov 6, 2016 at 7:23 PM, Etienne Trimaille
>> >>> <etienne.trimaille at gmail.com> wrote:
>> >>>>
>> >>>> Thanks David and Matthias for providing some feedbacks about QGIS 3
>> >>>> on
>> >>>> mac.
>> >>>> I also would like QGIS 3 compiling on mac.
>> >>>>
>> >>>> I hope you will update the install.md on the repo when you will have
>> >>>> a
>> >>>> working workflow ? Thanks
>> >>>
>> >>>
>> >>> I have been preparing Homebrew and OSGeo4Mac 'taps' for this move and
>> >>> am
>> >>> now focusing on QGIS 3 formulae, probably starting on Thursday or
>> >>> Friday. I
>> >>> hope to have everything building and docs completed by the end of the
>> >>> weekend.
>> >>>
>> >>> The new formulae will not be hosted in OSGeo4Mac or Homebrew (at least
>> >>> not until there are stable releases), but in a specific tap for QGIS
>> >>> development and Travis CI support:
>> >>>
>> >>> https://github.com/qgis/homebrew-qgisdev
>> >>>
>> >>> So, look for changes there as things progress. Please contribute or
>> >>> post
>> >>> bug reports there for those dev formulae or docs, once they are
>> >>> available.
>> >>>
>> >>> Regards,
>> >>>
>> >>> Larry Shaffer
>> >>> Dakota Cartography
>> >>> Black Hills, South Dakota
>> >>>
>> >>>>
>> >>>> 2016-11-01 1:22 GMT+07:00 Matthias Kuhn <matthias at opengis.ch>:
>> >>>>>
>> >>>>> Hi Diane and welcome aboard,
>> >>>>>
>> >>>>> I also didn't manage to compile master on osx yet.
>> >>>>>
>> >>>>> Some more information can be found here also:
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> https://github.com/OSGeo/homebrew-osgeo4mac/pull/146#issuecomment-254011621
>> >>>>>
>> >>>>> I think most of the dependencies should meanwhile be available on
>> >>>>> homebrew (but not sure).
>> >>>>>
>> >>>>> Regards
>> >>>>> Matthias
>> >>>>>
>> >>>>> On 10/31/2016 06:56 PM, David Marteau wrote:
>> >>>>> > Hi
>> >>>>> >
>> >>>>> > I will speak with my own experience using and compiling Qgis on
>> >>>>> > Mac
>> >>>>> > (El capitan and Maverick):
>> >>>>> >
>> >>>>> > First I use Macport: MacPort use clang/libc++ by default (at least
>> >>>>> > with XCode 5.3 on Maverick, 7.3 on El capitan) so this should
>> >>>>> > solve one of
>> >>>>> > your problems.
>> >>>>> > I have installed qt5 from MacPort without problems.
>> >>>>> >
>> >>>>> > The problems arise with some ports that do not fully support qt5
>> >>>>> > variants and you need to tweak some portfiles: qscintilla and
>> >>>>> > py-qscintilla
>> >>>>> > are one of them and are required by Qgis.
>> >>>>> > If you are interested I can give you my diff files for portfiles.
>> >>>>> >
>> >>>>> > I had to build qwt directly from sources because tweaking Macport
>> >>>>> > portfiles was too painful, but I did not encounter any serious
>> >>>>> > problems as
>> >>>>> > far as I can remember.
>> >>>>> >
>> >>>>> > No source code was needed to be patched, only compilation
>> >>>>> > configurations.
>> >>>>> >
>> >>>>> > Once you get all dependencies you need to set the cmake options
>> >>>>> > accordingly to the path of your installation:
>> >>>>> >
>> >>>>> > Here is my defines:
>> >>>>> >
>> >>>>> > »   »   -DCMAKE_INSTALL_PREFIX:PATH=/Applications \
>> >>>>> > »   »   -DWITH_SERVER=ON \
>> >>>>> > »   »   -DWITH_PYSPATIALITE=ON \
>> >>>>> > »   »
>> >>>>> >
>> >>>>> > -DPYTHON_CUSTOM_FRAMEWORK:PATH=/opt/local/Library/Frameworks/Python.framework
>> >>>>> > \
>> >>>>> > »   »   -DEXPAT_INCLUDE_DIR:PATH=/opt/local/include \
>> >>>>> > »   »   -DEXPAT_LIBRARY:FILEPATH=/opt/local/lib/libexpat.dylib \
>> >>>>> > »   »   -DSQLITE3_INCLUDE_DIR:PATH=/opt/local/include \
>> >>>>> > »   »   -DSQLITE3_LIBRARY:FILEPATH=/opt/local/lib/libsqlite3.dylib
>> >>>>> > \
>> >>>>> > »   »
>> >>>>> > -DQT_QMAKE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/qmake \
>> >>>>> > »   »
>> >>>>> >
>> >>>>> > -DQWT_INCLUDE_DIR:PATH=/usr/local/qwt-6.1.3/lib/qwt.framework/Versions/6/Headers
>> >>>>> > \
>> >>>>> > »   »
>> >>>>> >
>> >>>>> > -DQWT_LIBRARY:FILEPATH=/usr/local/qwt-6.1.3/lib/qwt.framework/Versions/6/qwt
>> >>>>> > \
>> >>>>> > »   »   -DQCA_INCLUDE_DIR:PATH=/opt/local/include/qca \
>> >>>>> > »   »   -DQCA_LIBRARY:FILEPATH=/opt/local/lib/libqca.dylib \
>> >>>>> > »   »
>> >>>>> > -DQSCINTILLA_INCLUDE_DIR:PATH=/opt/local/libexec/qt5/include
>> >>>>> > \
>> >>>>> > »   »
>> >>>>> >
>> >>>>> > -DQSCINTILLA_LIBRARY:FILEPATH=/opt/local/libexec/qt5/lib/libqscintilla2.dylib
>> >>>>> > \
>> >>>>> > »   »
>> >>>>> >
>> >>>>> > -DQT_LRELEASE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/lrelease \
>> >>>>> >
>> >>>>> > I hope that full support for qt5 will be available from Macport
>> >>>>> > soon,
>> >>>>> > but for now I have managed to compile Qgis from the master branch
>> >>>>> > without
>> >>>>> > struggling too much.
>> >>>>> >
>> >>>>> > Best,
>> >>>>> > David
>> >>>>> >
>> >>>>> >> Le 31 oct. 2016 à 16:12, Diane Perez <lintawa at gmail.com> a écrit
>> >>>>> >> :
>> >>>>> >>
>> >>>>> >> Dear QGIS developers,
>> >>>>> >>
>> >>>>> >> First of all, thank you very much for the great job, I have been
>> >>>>> >> a
>> >>>>> >> very happy user for years !
>> >>>>> >>
>> >>>>> >> I would like to contribute now to the development, but I found
>> >>>>> >> myself stuck at the installation of dependencies.
>> >>>>> >>
>> >>>>> >> According to the instructions of the INSTALL file provided with
>> >>>>> >> the
>> >>>>> >> source code, mac users should use Qt 4 and compile and install a
>> >>>>> >> bunch of
>> >>>>> >> dependencies for which binaries are not available (mainly
>> >>>>> >> Spatialindex, SIP,
>> >>>>> >> QScintilla2, PyQt, Qwt and bison) before being able to compile
>> >>>>> >> QGIS. I
>> >>>>> >> followed the instructions and got stuck at compiling QGIS as the
>> >>>>> >> master now
>> >>>>> >> requires Qt 5.
>> >>>>> >>
>> >>>>> >> Now as I actually started by installing Qt 5 by mistake, I had
>> >>>>> >> the
>> >>>>> >> opportunity to see that it leads to a lot of problems to compile
>> >>>>> >> the
>> >>>>> >> dependencies. As far as I understand, Qt 5 requires C++11, which
>> >>>>> >> means one
>> >>>>> >> must use the new libc++ library instead of the old libstdc++ (at
>> >>>>> >> least on my
>> >>>>> >> configuration, with El Capitan and clang/llvm). Some
>> >>>>> >> modifications are such
>> >>>>> >> that mixing both is not possible, so everything must be compiled
>> >>>>> >> from start
>> >>>>> >> with C++11 and libc++. Unfortunately most of the dependencies I
>> >>>>> >> mention
>> >>>>> >> above do not compile without tweaking, and I stopped doing it
>> >>>>> >> when it
>> >>>>> >> started meaning not only modifying the Makefiles but the code
>> >>>>> >> itself...
>> >>>>> >>
>> >>>>> >> I guess some of you work on mac, and have a far better
>> >>>>> >> understanding
>> >>>>> >> of all this than me. So my question is : how did you install
>> >>>>> >> those
>> >>>>> >> dependencies to compile the last version of QGIS with Qt 5 ?
>> >>>>> >>
>> >>>>> >> Did you have to compile again all of them or only a subset using
>> >>>>> >> Qt
>> >>>>> >> 5 and C++11 ? If so, how did you do it ? I got stuck at Qwt
>> >>>>> >> (6.1.3) which
>> >>>>> >> uses lots of functions deprecated in Qt 5.
>> >>>>> >>
>> >>>>> >> I hope someone can give me pointers, as I would really like to
>> >>>>> >> contribute to QGIS (and hopefully fix a few bugs bugging me) !
>> >>>>> >>
>> >>>>> >> Best regards,
>> >>>>> >> Diane
>> >>>>> >>
>> >>>>> >> _______________________________________________
>> >>>>> >> Qgis-developer mailing list
>> >>>>> >> Qgis-developer at lists.osgeo.org
>> >>>>> >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>>> >> Unsubscribe:
>> >>>>> >> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>>> >
>> >>>>> > _______________________________________________
>> >>>>> > Qgis-developer mailing list
>> >>>>> > Qgis-developer at lists.osgeo.org
>> >>>>> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>>> > Unsubscribe:
>> >>>>> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>>> >
>> >>>>> _______________________________________________
>> >>>>> Qgis-developer mailing list
>> >>>>> Qgis-developer at lists.osgeo.org
>> >>>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>>
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> Qgis-developer mailing list
>> >>>> Qgis-developer at lists.osgeo.org
>> >>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> Qgis-developer mailing list
>> >>> Qgis-developer at lists.osgeo.org
>> >>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >>>
>> >>>
>> >>
>> >
>> >
>> > _______________________________________________
>> > Qgis-developer mailing list
>> > Qgis-developer at lists.osgeo.org
>> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>


More information about the Qgis-developer mailing list