I cannot install the fts extension in DuckDB. The docs say it should auto-install, but it reports that it fails. I have also tried to install manually using
DBInterface.execute(con, "INSTALL fts FROM 'http://extensions.duckdb.org'";)
DBInterface.execute(con,"LOAD fts";)
both with and without the From clause. Again, it fails.
This is the error message:
ERROR: LoadError: DuckDB.QueryException("Execute of query \"INSTALL fts FROM 'http://extensions.duckdb.org'\" failed: HTTP Error: Failed to download extension \"fts\" at URL \"http://extensions.duckdb.org/v1.0.0/windows_amd64_mingw/fts.duckdb_extension.gz\"\nExtension \"fts\" is an existing extension.\n")
This implies that I need to file my issue against DuckDB.jl but I can’t see a way to do that. I can only find DuckDB · JuliaHub but this just links back to the main DuckDB site on github.
There is no separate repo right now. DuckDB.jl is in the main duckdb repo, that’s what the response is saying. They will I guess be moving it elsewhere. I think this will actually help rather than hurt DuckDB.jl development.
FWIW I also ran into the “same” issue regarding the https extension yesterday. This issue had arisen in the past, been fixed, but seems to have returned. I think it has to do with versioning.
It seems to be a Window only issue with the Julia client related to mingw, see this issue on github from some time ago
In fact, I currently can not install any DuckDB extension on Windows with the Julia client (while everything works fine on Linux) - so it’s apparently not just FTS but a more general issue.
There’s a hacky solution in the comments, but I haven’t tried it myself. Given the emphasis on the new support policy for DuckDB, that sadly doesn’t include Julia, I doubt anything will be done about this anytime soon from their side (see the comments in the github issue).
Not sure if anything could be done on Julia’s side to mitigate this issue?
If I define environmental variable JULIA_DUCKDB_LIBRARY in Windows before I add DuckDB package in Julia and point it to duckdb.dll which I downloaded from the Releases page everything works like a dream.
I’ve not used environment variables before but a quick search indicates that I would need admin privileges to define one as proposed. Maybe this isn’t true but, if it is, this solution isn’t available to me.
I downloaded DuckDB.dll from this file on the releases page: libduckdb-windows-amd64.zip
import Pkg
Pkg.activate(;temp=true)
ENV["JULIA_DUCKDB_LIBRARY"] = raw"C:\Users\TGebbels\...\Documents\Julia\Julia Experimenting\OSdatatesting\duckdb.dll"
Pkg.add(["DuckDB"])
using DuckDB
con = DBInterface.connect(DuckDB.DB, "ddb.DuckDB")
DBInterface.execute(con, "INSTALL fts";)
DBInterface.execute(con, "LOAD fts";)
ERROR: LoadError: DuckDB.QueryException("Execute of query \"INSTALL fts\" failed: HTTP Error: Failed to download extension \"fts\" at URL \"http://extensions.duckdb.org/v1.0.0/windows_amd64_mingw/fts.duckdb_extension.gz\"\nExtension \"fts\" is an existing extension.\n")
ERROR: LoadError: DuckDB.QueryException("Execute of query \"INSTALL 'C:\\Users\\TGebbels\\fts.duckdb_extension'\" failed: IO Error: Failed to install 'C:\\Users\\TGebbels\\fts.duckdb_extension'\nThe file was built for the platform 'windows_amd64', but we can only load extensions built for platform 'windows_amd64_mingw'.")
Then it seems like setting the environment variable and pointing to the DuckDB library that was not shipped with the Julia package (i.e. not cross-compiled with incompatible mingw) doesn’t work somehow
Have you tried removing and re-adding the DuckDB package from Julia after you set the environment variable?
The only other thing I could think of would be to build the extension yourself for Windows with mingw (on a Linux machine) and try to load it manually
It’s really unfortunate that this is such a hassle, since I’m also locked into a Windows environment at work and would really like to be able to use DuckDB with Julia and extensions on it
I’ve been trying these options with Pkg.activate(;temp=true) and only adding DuckDB after setting the ENV variable. Is that not enough? Do I need to remove DuckDB universally (and if so, how)?
The only other thing I could think of would be to build the extension yourself for Windows with mingw (on a Linux machine) and try to load it manually
I really don’t think I have the expertise for this and nor do I have ready access to a Linux machine.