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

v.sample fails with "ERROR: Unable to load GDAL library" #45079

Closed
anitagraser opened this issue Sep 15, 2021 · 11 comments
Closed

v.sample fails with "ERROR: Unable to load GDAL library" #45079

anitagraser opened this issue Sep 15, 2021 · 11 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) Windows Related to Windows operating system

Comments

@anitagraser
Copy link
Member

anitagraser commented Sep 15, 2021

What is the bug or the crash?

On windows (OSGeo4W QGIS 3.16.11), v.sample fails with "ERROR: Unable to load GDAL library".

May be related to https://gis.stackexchange.com/questions/407986/qgis-3-20-1-unable-to-use-grass-toolbox

Steps to reproduce the issue

  1. Run v.sample from the Processing toolbox. Any input datasets will do.

Versions

OSGeo4W QGIS 3.16.11

Additional context

Confirmed by @gioman on Telegram

@anitagraser anitagraser added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 15, 2021
@gioman gioman added Processing Relating to QGIS Processing framework or individual Processing algorithms Regression Something which used to work, but doesn't anymore Windows Related to Windows operating system labels Sep 15, 2021
@gioman
Copy link
Contributor

gioman commented Sep 15, 2021

For what it is worth: runs fine on Ubuntu 20.04.

@gioman
Copy link
Contributor

gioman commented Sep 15, 2021

A similar tool v.what.rast works fine also on Windows.

@agiudiceandrea
Copy link
Contributor

The issue doesn't occur using QGIS 3.16.11 on Windows 10 installed via OSGeo4W old (v1/EXE) standalone installer.

@gioman
Copy link
Contributor

gioman commented Sep 16, 2021

The issue doesn't occur using QGIS 3.16.11 on Windows 10 installed via OSGeo4W old (v1/EXE) standalone installer.

@agiudiceandrea yes, it seems to be a osgeo4w v2 thing only.

@agiudiceandrea
Copy link
Contributor

It seems to me the issue occurs using OSGeo4W new (v2/MSI) installers because GRASS needs, in some circumstances, to load one of the GDAL DLLs named in a list ("gdal300.dll", "gdal204.dll", "gdal203.dll", "gdal202.dll", ...), but the OSGeo4W new (v2/MSI) installers don't provide any of them (the provided GDAL DLL is "gdal303.dll").
See https://github.com/OSGeo/grass/blob/75dd60a694198f7bca17b7e3d6387b6eefa9bb7a/lib/raster/gdal.c#L94-L150

@anitagraser as a temporary workaround, you could make a copy of the gdal303.dll file present in the the bin folder inside the QGIS/OSGeo4W installation folder and rename the copy as gdal300.dll.

@gioman
Copy link
Contributor

gioman commented Sep 16, 2021

It seems to me the issue occurs using OSGeo4W new (v2/MSI) installers because GRASS needs, in some circumstances, to load one of the GDAL DLLs named in a list ("gdal300.dll", "gdal204.dll", "gdal203.dll", "gdal202.dll", ...), but the OSGeo4W new (v2/MSI) installers don't provide any of them (the provided GDAL DLL is "gdal303.dll").
See https://github.com/OSGeo/grass/blob/75dd60a694198f7bca17b7e3d6387b6eefa9bb7a/lib/raster/gdal.c#L94-L150

@jef-n can that libraries be added to osgeo4w v2?

@jef-n
Copy link
Member

jef-n commented Sep 16, 2021

Why is this a QGIS issue at all?

@gioman
Copy link
Contributor

gioman commented Sep 16, 2021

Why is this a QGIS issue at all?

Right, so I guess this must be moved to the osgeo4w tracker?

@jef-n
Copy link
Member

jef-n commented Sep 16, 2021

No. GRASS

@jef-n jef-n added Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) and removed Regression Something which used to work, but doesn't anymore labels Sep 16, 2021
@gioman
Copy link
Contributor

gioman commented Sep 16, 2021

No. GRASS

OSGeo/grass#1872 thanks I was about to file it myself.

@neteler
Copy link
Contributor

neteler commented May 17, 2024

OSGeo/grass#1872 thanks I was about to file it myself.

The upstream report OSGeo/grass#1872 was fixed with OSGeo/grass#2290 on Apr 2, 2022.

Can this report be closed?

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! Processing Relating to QGIS Processing framework or individual Processing algorithms Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) Windows Related to Windows operating system
Projects
None yet
Development

No branches or pull requests

5 participants