Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X install looks for PyQt4 instead of PyQt5 #25117

Closed
qgib opened this issue Sep 28, 2017 · 4 comments
Closed

OS X install looks for PyQt4 instead of PyQt5 #25117

qgib opened this issue Sep 28, 2017 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS Feedback Waiting on the submitter for answers

Comments

@qgib
Copy link
Contributor

qgib commented Sep 28, 2017

Author Name: David Liontooth (David Liontooth)
Original Redmine Issue: 17218
Affected QGIS version: master
Redmine category:build/install
Assignee: dmartella -


On an up-to-date OS X Sierra, using QGIS git master and MacPorts' QT5 following David Marteau's instructions at https://www.3liz.com/blog/rldhont/index.php?post/2017/06/01/How-to-build-qgis-on-OSX-with-MacPort), I set the compilers as suggested in INSTALL:

export CC=/usr/bin/llvm-gcc
export CXX=/usr/bin/llvm-g++

The build was successful, but install complains. I take it these codecs are not required?

-- Updating QGIS library paths...
-- Copying Qt frameworks...
ditto: can't get real path for source '/opt/local/libexec/qt5/plugins/codecs/libqcncodecs.dylib'
ditto: can't get real path for source '/opt/local/libexec/qt5/plugins/codecs/libqjpcodecs.dylib'
ditto: can't get real path for source '/opt/local/libexec/qt5/plugins/codecs/libqkrcodecs.dylib'
ditto: can't get real path for source '/opt/local/libexec/qt5/plugins/codecs/libqtwcodecs.dylib'
ditto: can't get real path for source '/opt/local/libexec/qt5/plugins/phonon_backend/libphonon_qt7.dylib'

Install finds QT5, but looks for PyQt4 instead of PyQt5 -- py36-pyqt5 @5.8.2_0 is installed:

-- Copying Qwt and updating library paths...
-- Copying QCA and updating library paths...
-- Found QCA plugin directory: /opt/local/libexec/qt5/plugins
-- Updating QCA plugins with QCA library path in /opt/local/libexec/qt5/plugins ...
-- PYTHON_MODULE_PATHS to be searched:
--   /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
--   /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
-- Copying sip...
-- Copying PyQt...
--   PyQt4 module Qt.so not found
--   PyQt4 module QtCore.so not found
--   PyQt4 module QtGui.so not found
--   PyQt4 module phonon.so not found
--   PyQt4 module QtXml.so not found
--   PyQt4 module QtNetwork.so not found
--   PyQt4 module QtScript.so not found
--   PyQt4 module QtSvg.so not found
--   PyQt4 module QtSql.so not found
--   PyQt4 module QtWebKit.so not found
--   PyQt4 module QtXmlPatterns.so not found
--   PyQt4 module QtDBus.so not found
--   PyQt4 module QtMultimedia.so not found
--   PyQt4 module QtOpenGL.so not found
--   PyQt4 module QtTest.so not found
--   PyQt4 module Qsci.so not found
cp: cannot stat '/PyQt/uic': No such file or directory
ditto: can't get real path for source '/pylupdate4'
ditto: can't get real path for source '/pyrcc4'
-- Updating Qt library paths...
-- Up-to-date: /Users/liontooth/software/QGIS/QGIS-2.99/dist/QGIS.app/Contents/MacOS/bin/qgis_bench.app
-- Up-to-date: /Users/liontooth/software/QGIS/QGIS-2.99/dist/QGIS.app/Contents/MacOS/bin/qgis_bench.app/Contents
-- Up-to-date: /Users/liontooth/software/QGIS/QGIS-2.99/dist/QGIS.app/Contents/MacOS/bin/qgis_bench.app/Contents/Info.plist
-- Up-to-date: /Users/liontooth/software/QGIS/QGIS-2.99/dist/QGIS.app/Contents/MacOS/bin/qgis_bench.app/Contents/MacOS
-- Installing: /Users/liontooth/software/QGIS/QGIS-2.99/dist/QGIS.app/Contents/MacOS/bin/qgis_bench.app/Contents/MacOS/qgis_bench

How can I tell install to look for PyQt5?

@qgib
Copy link
Contributor Author

qgib commented Oct 6, 2017

Author Name: Joel Buckley (Joel Buckley)


David Liontooth wrote:

How can I tell install to look for PyQt5?

What were your cmake options? I have found that

-DQT_VERSION_MAJOR=5 -DPYQT4_BIN_DIR=/usr/local/bin

ameliorates some issues (though I am not 100% satisfied it makes everything go away).

Further, I suspect some changes need to be made in /mac/cmake/1qt.cmake.in (PyQt version 4 seems to be hard-coded in)

@qgib
Copy link
Contributor Author

qgib commented Oct 6, 2017

Author Name: David Liontooth (David Liontooth)


Great, thanks. I've been using this, from David Marteau with supplements:

cmake $(CMAKE_OPTS) \
		-DWITH_ASTYLE=ON \
		-DCMAKE_INSTALL_PREFIX:PATH=$(INSTALL_PATH) \
		-DWITH_SERVER=ON \
		-DWITH_POSTGRESQL:BOOL=TRUE \
		-DPOSTGRES_CONFIG:FILEPATH=/opt/local/lib/postgresql96/bin/pg_config \
		-DWITH_GRASS7:BOOL=ON \
		-DLIBZIP_INCLUDE_DIR:PATH=/opt/local/include \
		-DLIBZIP_CONF_INCLUDE_DIR:FILEPATH=/opt/local/lib/libzip/include \
		-DLIBZIP_LIBRARY:FILEPATH=/opt/local/lib/libzip.dylib \
		-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=/opt/local/libexec/qt5/include/qwt \
		-DQWT_LIBRARY:FILEPATH=/opt/local/libexec/qt5/lib/libqwt.dylib \
		-DQCA_INCLUDE_DIR:PATH=/opt/local/libexec/qt5/include/QtCrypto \
		-DQCA_LIBRARY:FILEPATH=/opt/local/libexec/qt5/lib/libqca-qt5.dylib \
		-DQSCINTILLA_INCLUDE_DIR:PATH=/opt/local/libexec/qt5/include \
		-DQSCINTILLA_LIBRARY:FILEPATH=/opt/local/libexec/qt5/lib/libqscintilla2_qt5.dylib \
		-DQTKEYCHAIN_INCLUDE_DIR:PATH=/usr/local/include/qt5keychain \
		-DQTKEYCHAIN_LIBRARY:FILEPATH=/usr/local/lib/libqt5keychain.dylib \
		-DQT_LRELEASE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/lrelease \

The "-DWITH_GRASS7:BOOL=ON" option fails to find grass7 installed by MacPorts in /opt/local/share/grass-7.2.2.

As you say, pyqt4 is hardcoded in a few places in mac/cmake/1qt.cmake.in:

QGIS-2.99$ grep -i pyqt4 mac/cmake/1qt.cmake.in
            # MESSAGE (STATUS "ditto ${QARCHS} \"${PYQT4MOD}\" \"${QGISPYDIR}/${MODSUBPATH}\"")
        MESSAGE (STATUS "  PyQt4 module ${MODNAME} not found")
    UNSET(PYQT4MOD)
        EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@PYQT4_BIN_DIR@/${PU}" "${QBINDIR}/")
    EXECUTE_PROCESS (COMMAND sed -E "s, /.*/PyQt4/uic/pyuic.py, \"\$(/usr/bin/dirname \"\$0\")/../../Resources/python/PyQt4/uic/pyuic.py\"," "@PYQT4_BIN_DIR@/pyuic4"

Is the goal to support both pyqt4 and 5?

Cheers,
David

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


Please check if this issue is still valid on QGIS 3.4.5 or 3.6.


  • status_id was changed from Open to Feedback

@qgib qgib added Feedback Waiting on the submitter for answers Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS labels May 25, 2019
@gioman
Copy link
Contributor

gioman commented Jan 8, 2020

Closing for lack of feedback.

@gioman gioman closed this as completed Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS Feedback Waiting on the submitter for answers
Projects
None yet
Development

No branches or pull requests

2 participants