Open MMcBain opened 1 year ago
In INSTALL.MD at root of this repository, you have an apt command with all the necessary to compile QGIS. Dis you check that everything needed is installed ?
Yes. All those apt commands completed successfully before the compile was started.
There is a similar old issue https://github.com/qgis/QGIS/issues/28788
The build from source on ubuntu mantic is also failing with the same error message. I was able to fix this with the following patch:
diff --git a/cmake/SIPMacros.cmake b/cmake/SIPMacros.cmake
index a0bfb1e6e22..7f3022a6ccd 100644
--- a/cmake/SIPMacros.cmake
+++ b/cmake/SIPMacros.cmake
@@ -101,7 +101,7 @@ MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP SIP_FILES CPP_FILES
ENDIF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} )
ENDFOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} )
- SET(SIPCMD ${SIP_BUILD_EXECUTABLE} --no-protected-is-public --pep484-pyi --no-make --concatenate=${SIP_CONCAT_PARTS} --qmake=${QMAKE_EXECUTABLE} --include-dir=${CMAKE_CURRENT_BINARY_DIR} --include-dir=${PYQT_SIP_DIR} --api-dir ${CMAKE_BINARY_DIR}/python ${SIP_BUILD_EXTRA_OPTIONS})
+ SET(SIPCMD ${SIP_BUILD_EXECUTABLE} --no-protected-is-public --pep484-pyi --no-make --concatenate=${SIP_CONCAT_PARTS} --qmake=${QMAKE_EXECUTABLE} --include-dir=${CMAKE_CURRENT_BINARY_DIR} --include-dir=/usr/lib/python3/dist-packages/PyQt5/bindings --api-dir ${CMAKE_BINARY_DIR}/python ${SIP_BUILD_EXTRA_OPTIONS})
ADD_CUSTOM_COMMAND(
OUTPUT ${_sip_output_files}
which is evidently not the correct fix, but may give a hint to someone knowledgeable. Before this patch, ${PYQT_SIP_DIR}
was being (incorrectly, given the actual location of the .sip files) expanded to /usr/local/lib/python3.11/dist-packages/PyQt5/bindings
Thanks @tbonfort that worked for me as well! On ubuntu 23.10 (Mantic).
Short version, if you hit this: set
export DEB_PYTHON_INSTALL_LAYOUT=deb
BEFORE your cmake or ccmake step.
The crux is where your distro puts your distro-python packages:
/usr/local/lib/python3.11/dist-packages/
vs
/usr/lib/python3/dist-packages/
Longer version:
No cmake guru, but adding some debug info, I ended up on seeing that Python_SITEARCH was not set correctly.
Googling that, I found @sebastic mail: https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1916226.html
Then reading https://gitlab.kitware.com/cmake/cmake/-/issues/25113 it appears something that cmake after a certain version is interpreting the posix rules differently, and Debian uses this environment variable to disinguish between the 2 different install models:
# without the environ var set:
python3
>>> import sysconfig
>>> sysconfig.get_path('purelib', vars={'base': '/usr/local'})
'/usr/local/local/lib/python3.11/dist-packages'
# the environ var set:
export DEB_PYTHON_INSTALL_LAYOUT=deb
python3
>>> import sysconfig
>>> sysconfig.get_path('purelib', vars={'base': '/usr/local'})
'/usr/local/lib/python3/dist-packages'
Not sure if some flag in the cmake machinery to determine if it is Debian or a derivative would help?
debian/rules does set DEB_PYTHON_INSTALL_LAYOUT=deb_system
@jef-n ah, thanks now I see :-) (mmm, is it deb_system
? For me deb
worked...)
But, debian/rules is used when you build the debian package, while (I think) a lot of people build (parallel versions) locally in their home dir (like me).
Would it benefit Debian users to set that variable somewhere in the cmake scripts, in some 'if Debian/Ubuntu' clause?
Or should 'we' just put export DEB_PYTHON_INSTALL_LAYOUT=deb_system
in our .bash_rc
?
@jef-n ah, thanks now I see :-) (mmm, is it
deb_system
? For medeb
worked...) But, debian/rules is used when you build the debian package, while (I think) a lot of people build (parallel versions) locally in their home dir (like me). Would it benefit Debian users to set that variable somewhere in the cmake scripts, in some 'if Debian/Ubuntu' clause? Or should 'we' just putexport DEB_PYTHON_INSTALL_LAYOUT=deb_system
in our.bashrc
?
or run DEB_PYTHON_INSTALL_LAYOUT=deb cmake… - because it's apparently only necessary when running cmake to setup the build, but not for the actual build.
BTW I'm hardly building any packages locally, but I'm always using the debian packaging to setup the build directory (in debian/build).
My 2 cents: Attempting to compile QGIS against Qt6, I followed suggestions in this thread, thanks for posting them! In the end, I could get the error solved by also installing these 2 packages (that is, the same resolution that in the old issue mentioned here by @nicogodet):
pyqt6-dev and pyqt6.qsci-dev
What is the bug or the crash?
Compiling qgis-3.33.0+git20230806+a75694e190+99sid from source, I an error for missing qt5 sip files.
I am running a fresh install of debian 12 [trixie/sid], on which this version of qgis runs successfully from the nightly deb files, so I thought all the required dependencies were installed. As far as I know, all the qt5 SIP modules have been installed [I have reinstalled all the qt5 debian distribution, but I can't see where these modules are supposed to come from.Any pointer would be helpful
Steps to reproduce the issue
sip-build: /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/core/core.sip: line 94: column 9: 'QtXml/QtXmlmod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/core/core.sip: line 95: column 9: 'QtNetwork/QtNetworkmod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/core/core.sip: line 96: column 9: 'QtSql/QtSqlmod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/core/core.sip: line 98: column 9: 'QtPrintSupport/QtPrintSupportmod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/core/core.sip: line 99: column 9: 'QtWidgets/QtWidgetsmod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/core/core.sip: line 100: column 9: 'QtPositioning/QtPositioningmod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/gui/gui.sip: line 11: column 9: 'QtCore/QtCoremod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/gui/gui.sip: line 12: column 9: 'QtGui/QtGuimod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/gui/gui.sip: line 13: column 9: 'QtXml/QtXmlmod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/gui/gui.sip: line 14: column 9: 'QtMultimedia/QtMultimediamod.sip' could not be found /Hangar/qgis/sourcecode/qgis-3.33.0+git20230806+a75694e190+99sid/build/python/gui/gui.sip: line 15: column 9: 'Qsci/qscimod5.sip' could not be found
Versions
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
QGIS version | 3.33.0-Master | QGIS code revision | a75694e190 -- | -- | -- | -- Qt version | 5.15.10 Python version | 3.11.4 GDAL/OGR version | 3.7.1 PROJ version | 9.2.1 EPSG Registry database version | v10.088 (2023-05-13) GEOS version | 3.12.0-CAPI-1.18.0 SQLite version | 3.42.0 PostgreSQL client version | 15.3 (Debian 15.3-0+deb12u1) SpatiaLite version | 5.1.0 QWT version | 6.1.4 QScintilla2 version | 2.14.1 OS version | Debian GNU/Linux trixie/sid QGIS version 3.33.0-Master QGIS code revision [a75694e190](https://github.com/qgis/QGIS/commit/a75694e190) Qt version 5.15.10 Python version 3.11.4 GDAL/OGR version 3.7.1 PROJ version 9.2.1 EPSG Registry database version v10.088 (2023-05-13) GEOS version 3.12.0-CAPI-1.18.0 SQLite version 3.42.0 PostgreSQL client version 15.3 (Debian 15.3-0+deb12u1) SpatiaLite version 5.1.0 QWT version 6.1.4 QScintilla2 version 2.14.1 OS version Debian GNU/Linux trixie/sid ### Supported QGIS version - [ ] I'm running a supported QGIS version according to [the roadmap](https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule). ### New profile - [ ] I tried with a new [QGIS profile](https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles) ### Additional context The recompile is to get point clouds working. pdal and pdal_wrench have been installed.