Skip to content

Commit

Permalink
Debug spatialite
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiBolibar committed Aug 2, 2024
1 parent 7ee4095 commit c2c8741
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions src/setup/config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,23 @@ function __init__()
end

function load_libxml()
lib_paths = [
joinpath(root_dir, ".CondaPkg/env/lib/libxml.so"),
joinpath(root_dir, ".CondaPkg/env/lib/libxml.so.2"),
joinpath(root_dir, ".CondaPkg/env/lib/libxml.so.2.12.7")
]
for lib in lib_paths
if isfile(lib)
try
dlopen(lib)
println("Opened $lib")
catch e
println("Failed to load $lib: $e")
end
lib_dir = joinpath(root_dir, ".CondaPkg/env/lib")

# Find all libspatialite files in the directory
lib_files = filter(f -> startswith(f, "libxml") && (endswith(f, ".so") || contains(f, ".so.")), readdir(lib_dir))

if isempty(lib_files)
println("No libxml files found in $lib_dir")
return
end

for lib_file in lib_files
lib_path = joinpath(lib_dir, lib_file)
try
dlopen(lib_path)
println("Opened $lib_path")
catch e
println("Failed to load $lib_path: $e")
end
end
end
Expand Down

0 comments on commit c2c8741

Please sign in to comment.