JuliaDatabases / ODBC.jl

An ODBC interface for the Julia programming language
https://odbc.juliadatabases.org/stable
Other
106 stars 63 forks source link

Cannot install ODBC on Windows 10 with Julia 1.6.1 (problem unixODBC) #326

Closed stla closed 3 years ago

stla commented 3 years ago

Hello,

I'm using Julia portable 1.6.1 on a Windows 10 laptop in which I don't have admin rights. When I try to install ODBC.jl (] add ODBC), that starts fine but there's an error at the end:

ERROR: Unable to automatically install 'unixODBC' from 'C:\PortableApps\julia_depot_path\packages\unixODBC_jll\ORD69\Artifacts.toml'
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] ensure_artifact_installed(name::String, meta::Dict{String, Any}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Artifacts.jl:443
  [3] ensure_all_artifacts_installed(artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, pkg_uuid::Nothing, include_lazy::Bool, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Artifacts.jl:508
  [4] download_artifacts(ctx::Pkg.Types.Context, pkg_roots::Vector{String}; platform::Base.BinaryPlatforms.Platform, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:706
  [5] download_artifacts(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:683
  [6] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1237
  [7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:203
  [8] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:79
  [9] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:77
 [10] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:408
 [11] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:386
 [12] do_cmd
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:377 [inlined]
 [13] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:550
 [14] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [15] invokelatest
    @ .\essentials.jl:706 [inlined]
 [16] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\LineEdit.jl:2441
 [17] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:1126
 [18] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:411

I don't know what is this folder: C:\buildbot, it doesn't exist.

stla commented 3 years ago

That's fine now. I disconnected the VPN and the package has been installed. However Julia indicated there is an error with one of the dependencies. Here is what happen when I load the package:

julia> using ODBC
[ Info: Precompiling ODBC [be6f12e9-ca4f-5eb2-a339-a4f995cc0291]
ERROR: LoadError: LoadError: error finding ODBC/config/odbc.ini file; please Pkg.build("ODBC") again
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] top-level scope
    @ C:\PortableApps\julia_depot_path\packages\ODBC\qhwMX\src\API.jl:181
  [3] include(mod::Module, _path::String)
    @ Base .\Base.jl:386
  [4] include(x::String)
    @ ODBC C:\PortableApps\julia_depot_path\packages\ODBC\qhwMX\src\ODBC.jl:1
  [5] top-level scope
    @ C:\PortableApps\julia_depot_path\packages\ODBC\qhwMX\src\ODBC.jl:7
  [6] include
    @ .\Base.jl:386 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1213
  [8] top-level scope
    @ none:1
  [9] eval
    @ .\boot.jl:360 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [11] top-level scope
    @ none:1
in expression starting at C:\PortableApps\julia_depot_path\packages\ODBC\qhwMX\src\API.jl:1
in expression starting at C:\PortableApps\julia_depot_path\packages\ODBC\qhwMX\src\ODBC.jl:1
ERROR: Failed to precompile ODBC [be6f12e9-ca4f-5eb2-a339-a4f995cc0291] to C:\PortableApps\julia_depot_path\compiled\v1.6\ODBC\jl_B531.tmp.
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base .\loading.jl:1360
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base .\loading.jl:1306
 [4] _require(pkg::Base.PkgId)
   @ Base .\loading.jl:1021
 [5] require(uuidkey::Base.PkgId)
   @ Base .\loading.jl:914
 [6] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:901
stla commented 3 years ago

Ok, I ran Pkg.build("ODBC") and it works. Sorry.