[MacPorts] #55288: QGIS Fails to Configure/Install - CMAKE cannot find FindQJSON
MacPorts
noreply at macports.org
Fri Nov 10 17:01:32 UTC 2017
#55288: QGIS Fails to Configure/Install - CMAKE cannot find FindQJSON
-------------------------+----------------------
Reporter: jambonrose | Owner: Veence
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.2
Resolution: | Keywords:
Port: QGIS |
-------------------------+----------------------
Comment (by jambonrose):
I think I've figured it out, but this comes with a "it works on my
computer" warning.
In short, there are two problems with installing QGIS in my environment
right now:
1. Missing `spatialite` dependency
2. Mixed file-naming expectations around `QJSON-
qt5Config.cmake`/`QJSONConfig.cmake`
During my original read of the logs, I missed the errors about missing
variables `SPATIALITE_INCLUDE_DIR` and `SPATIALITE_LIBRARY`. However,
`spatialite` is not installed by the QGIS port. No sweat:
{{{#!shell
$ sudo port install spatialite
}}}
I was then able to fix the QJSON configuration problem by changing the
file named `QJSON-qt5Config.cmake` to `QJSONConfig.cmake`. I was then able
to configure and build QGIS. However, Macports now errors, as shown below.
{{{
$ sudo port clean qgis && sudo port install qgis
---> Cleaning QGIS
---> Computing dependencies for QGIS
---> Fetching archive for QGIS
---> Attempting to fetch QGIS-
2_18_13_2+postgresql96+qt5.darwin_15.x86_64.tbz2 from
https://packages.macports.org/QGIS
---> Attempting to fetch QGIS-
2_18_13_2+postgresql96+qt5.darwin_15.x86_64.tbz2 from
http://ywg.ca.packages.macports.org/mirror/macports/packages/QGIS
---> Attempting to fetch QGIS-
2_18_13_2+postgresql96+qt5.darwin_15.x86_64.tbz2 from
http://mse.uk.packages.macports.org/sites/packages.macports.org/QGIS
---> Fetching distfiles for QGIS
---> Verifying checksums for QGIS
---> Extracting QGIS
---> Applying patches to QGIS
---> Configuring QGIS
---> Building QGIS
---> Staging QGIS into destroot
---> Installing QGIS @2_18_13_2+postgresql96+qt5
---> Activating QGIS @2_18_13_2+postgresql96+qt5
---> Cleaning QGIS
---> Updating database of binaries
Warning: Error determining file type of `/opt/local/lib/cmake/qjson-qt5
/QJSON-qt5Config.cmake': lstat(/opt/local/lib/cmake/qjson-qt5/QJSON-
qt5Config.cmake):no such file or directory
Warning: A file belonging to the `qjson-qt5' port is missing or
unreadable. Consider reinstalling it.
---> Scanning binaries for linking errors
---> No broken files found.
}}}
CMake wants the file in once place, while Macports wants it in another.
Instead of moving the file, I copied it.
{{{#!bash
$ sudo cp /opt/local/lib/cmake/qjson-qt5/QJSON-qt5Config.cmake
/opt/local/lib/cmake/qjson-qt5/QJSONConfig.cmake
}}}
With these changes in place, running `sudo port clean qgis && sudo port
install qgis` allowed me to configure, build and install QGIS.
Hopefully this makes your weekend easier.
--
Ticket URL: <https://trac.macports.org/ticket/55288#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list