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

mod_spatialite for Mac-Users #59283

Open
2 tasks
Ludwig-K opened this issue Oct 31, 2024 · 2 comments
Open
2 tasks

mod_spatialite for Mac-Users #59283

Ludwig-K opened this issue Oct 31, 2024 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! macOS

Comments

@Ludwig-K
Copy link

What is the bug or the crash?

I develop the QGis-LinearReferencing-Plugin.
For some functionalities with Linestring-M-geometries implemented in the current version, the plugin uses a sqlite3-connection with spatialite-extension (used SpatiaLite-Functions: ST_TrajectoryInterpolatePoint, ST_IsValidTrajectory, ST_AddMeasure, ST_Locate_Between_Measures).
A macOS-user reported the error below, which prevents plugin load and usage:
sqlite3.OperationalError: dlopen(mod_spatialite.dylib, 0x000A): tried: '/Applications/QGIS-LTR.app/Contents/MacOS/../Frameworks/mod_spatialite.dylib' (no such file), '/Applications/QGIS-LTR.app/Contents/MacOS/lib/mod_spatialite.dylib' (no such file), '/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/grass78/lib/mod_spatialite.dyli
This does not occur on windows or linux-machines, therefore I haven't noticed the problem yet nor can reproduce it because I do not use macOS.
Question 1: is this a bug or a known limitation for QGis/Python/SQLite on macOS?
Question 2: is there a python-workaround for the above listed four SpatiaLite-Functions without need of sqlite3/mod_spatialite?

Steps to reproduce the issue

  1. Open Python-console on macOS-QGis
  2. Insert script:
import sqlite3
sqlite_conn = sqlite3.connect(':memory:')
sqlite_conn.enable_load_extension(True)
sqlite_conn.execute('SELECT load_extension("mod_spatialite")')
  1. run script

Versions

3.34.11-Prizren on macOS

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@Ludwig-K Ludwig-K added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 31, 2024
@nirvn
Copy link
Contributor

nirvn commented Feb 2, 2025

@Ludwig-K , could you try these new macos dmg builds here ( #60039 ) and see if things work there? These rely on a completely new build environment and are the bright future of QGIS on macos :)

@Ludwig-K
Copy link
Author

Ludwig-K commented Feb 2, 2025

Unfortunaltely I am not a macos-user and can not test the new build.
Thanks for your efforts for the bright QGis-future on any OS!

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! macOS
Projects
None yet
Development

No branches or pull requests

3 participants