0

Running SAGA algorithms from QGIS throws up a list of errors about not being able to load a GDAL plugin libltidsdk.9.dylib:

ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/libltidsdk.9.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/usr/local/lib/libltidsdk.9.dylib' (no such file), '/usr/lib/libltidsdk.9.dylib' (no such file)

Why is SAGA (or QGIS) trying to load it from all those locations instead of from inside QGIS.app? It is there at:

/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/3rdparty/libltidsdk.9.dylib

It seems to be a problem with the variable @rpath mentioned in the error message.

In QGIS/Setting/Options/Providers/SAGANG, the SAGA folder is /opt/local/bin.

Since I can't find any reference to setting the variable @rpath, I deleted my user profile, reinstalled SAGANG provider, and tried again. Same error persists.

Versions info:

  • SAGA 9.2.0 is installed at /opt/local/lib (by macports)

  • MacOS 12.6.2

The full log is included below:

QGIS version: 3.34.1-Prizren
QGIS code revision: 133927424d9
Qt version: 5.15.2
Python version: 3.9.5
GDAL version: 3.3.2
GEOS version: 3.9.1-CAPI-1.14.2
PROJ version: Rel. 8.1.1, September 1st, 2021
PDAL version: 2.3.0 (git-version: Release)
SAGA Next Gen version: 1.0.0
Algorithm started at: 2023-12-08T15:48:02
Algorithm 'Triangulation' starting…
Input parameters:
{ 'FIELD' : 'zcoord', 'FRAME' : False, 'POINTS' : 'memory://memory?geometry=PointZ&crs=EPSG:2284&field=Name:string(255,0)&field=vertex_index:integer(10,0)&field=vertex_part:integer(10,0)&field=vertex_part_index:integer(10,0)&field=distance:double(20,14)&field=angle:double(20,14)&field=xcoord:double(0,0)&field=ycoord:double(0,0)&field=zcoord:double(0,0)&uid={4df3363c-014b-43e2-8ee1-10f4e78b2a55}', 'TARGET_OUT_GRID' : 'TEMPORARY_OUTPUT', 'TARGET_USER_FITS' : 0, 'TARGET_USER_SIZE' : 0.5, 'TARGET_USER_XMIN TARGET_USER_XMAX TARGET_USER_YMIN TARGET_USER_YMAX' : None }

grid_gridding "5" -TARGET_DEFINITION 0 -POINTS "/private/var/folders/y7/8n8knqt56ylb9n8kbdd983f40000gn/T/processing_kdRlwj/8ab3092edbda49f8b11123319a3d5459/POINTS.shp" -FIELD "zcoord" -TARGET_USER_SIZE 0.5 -TARGET_USER_FITS 0 -FRAME false -TARGET_OUT_GRID "/private/var/folders/y7/8n8knqt56ylb9n8kbdd983f40000gn/T/processing_kdRlwj/baca76dfaa3a402e82c597bf4ab7b010/TARGET_OUT_GRID.sdat"
____________________________

##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
____________________________

SAGA Version: 9.2.0

ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/libltidsdk.9.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/usr/local/lib/libltidsdk.9.dylib' (no such file), '/usr/lib/libltidsdk.9.dylib' (no such file)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/libltidsdk.9.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/usr/local/lib/libltidsdk.9.dylib' (no such file), '/usr/lib/libltidsdk.9.dylib' (no such file)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_ECW_JP2ECW.dylib, 0x0001): symbol not found in flat namespace (__ZN11GDALDataset11CreateLayerEPKcP19OGRSpatialReference18OGRwkbGeometryTypePPc)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_ECW_JP2ECW.dylib, 0x0001): symbol not found in flat namespace (__ZN11GDALDataset11CreateLayerEPKcP19OGRSpatialReference18OGRwkbGeometryTypePPc)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MG4Lidar.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MG4Lidar.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/usr/local/lib/liblti_lidar_dsdk.1.dylib' (no such file), '/usr/lib/liblti_lidar_dsdk.1.dylib' (no such file)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MG4Lidar.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MG4Lidar.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/usr/local/lib/liblti_lidar_dsdk.1.dylib' (no such file), '/usr/lib/liblti_lidar_dsdk.1.dylib' (no such file)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/libltidsdk.9.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/usr/local/lib/libltidsdk.9.dylib' (no such file), '/usr/lib/libltidsdk.9.dylib' (no such file)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/libltidsdk.9.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MrSID.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/libltidsdk.9.dylib' (no such file), '/usr/local/lib/libltidsdk.9.dylib' (no such file), '/usr/lib/libltidsdk.9.dylib' (no such file)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_ECW_JP2ECW.dylib, 0x0001): symbol not found in flat namespace (__ZN11GDALDataset11CreateLayerEPKcP19OGRSpatialReference18OGRwkbGeometryTypePPc)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_ECW_JP2ECW.dylib, 0x0001): symbol not found in flat namespace (__ZN11GDALDataset11CreateLayerEPKcP19OGRSpatialReference18OGRwkbGeometryTypePPc)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MG4Lidar.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MG4Lidar.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/usr/local/lib/liblti_lidar_dsdk.1.dylib' (no such file), '/usr/lib/liblti_lidar_dsdk.1.dylib' (no such file)
ERROR 1: dlopen(/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MG4Lidar.dylib, 0x0001): Library not loaded: '@rpath/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib'
Referenced from: '/Applications/QGIS.app/Contents/MacOS/lib/gdalplugins/gdal_MG4Lidar.dylib'
Reason: tried: '/opt/local/lib/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/opt/local/lib/libgcc/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/opt/local/lib/gdalplugins/3rdparty/liblti_lidar_dsdk.1.dylib' (no such file), '/usr/local/lib/liblti_lidar_dsdk.1.dylib' (no such file), '/usr/lib/liblti_lidar_dsdk.1.dylib' (no such file)
ERROR 1: PROJ: proj_create: no database context specified
ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/5482
ERROR 1: PROJ: proj_create: no database context specified
ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/5936
ERROR 1: PROJ: proj_create: no database context specified
ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/3978
ERROR 1: PROJ: proj_create: no database context specified
ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/2193
ERROR 1: PROJ: proj_create: no database context specified
ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/5482
ERROR 1: PROJ: proj_create: no database context specified
ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/5936
ERROR 1: PROJ: proj_create: no database context specified
ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/3978
ERROR 1: PROJ: proj_create: no database context specified
ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/2193
____________________________
library path: /opt/local/lib/saga/
library path: /opt/local/lib/saga/
library name: libgrid_gridding
library : grid_gridding
tool : Triangulation
identifier : 5
author : O.Conrad (c) 2004
____________________________

Loading shapes: /private/var/folders/y7/8n8knqt56ylb9n8kbdd983f40000gn/T/processing_kdRlwj/8ab3092edbda49f8b11123319a3d5459/POINTS.shp...


okay
[Triangulation] Execution started...

__________
[Triangulation] Parameters:

Points: POINTS
Attribute: zcoord
Target Grid System: user defined
Cellsize: 0.5
West: 11391173.2
East: 11391200.7
South: 3743512.2
North: 3743539.7
Columns: 56
Rows: 56
Fit: nodes
Add Frame: false

[Error] failed to create TIN

__________
total execution time: 0 milliseconds (less than 1 millisecond)

[Triangulation] Execution failed (less than 1 millisecond)
[Error] executing tool:
Triangulation
Execution completed in 1.65 seconds
Results:
{'TARGET_OUT_GRID': '/private/var/folders/y7/8n8knqt56ylb9n8kbdd983f40000gn/T/processing_kdRlwj/baca76dfaa3a402e82c597bf4ab7b010/TARGET_OUT_GRID.sdat'}

Loading resulting layers
The following layers were not correctly generated.
• /private/var/folders/y7/8n8knqt56ylb9n8kbdd983f40000gn/T/processing_kdRlwj/baca76dfaa3a402e82c597bf4ab7b010/TARGET_OUT_GRID.sdat
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

1 Answer 1

1

Making the official QGIS.app bundle work with MacPorts’ SAGA fails because of conflicting linked libraries. The MacPorts’ SAGA is linked to MacPorts’ GDAL and PROJ version (located under /opt/local/), whereas the QGIS.app comes bundled with its own GDAL and PROJ libraries (and everything else that is needed).

Considering you already have MacPorts installed, you’ll benefit from installing QGIS from MacPorts. Apart from solving the problem you’re currently have, you’ll make use of the latest version of GDAL, PDAL, PROJ etc. You may install qgis3 and qgis3-ltr side by side (and don’t forget +grass variant if you need GRASS GIS integration).

port selfupdate
port upgrade outdated

port install saga
port install py311-pysaga
port install qgis3

Then install the SAGA Next Gen plugin.

(A note on MacPorts’ gdal port: by default it includes mainly the built-in drivers, see port variants gdal if there’s additional driver(s) you wish to add).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.