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

Add special case for DuckDB_jll windows build #9775

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KronosTheLate
Copy link
Contributor

Continuation of #9737

@KronosTheLate
Copy link
Contributor Author

So suddently things wokred, and I could install DuckDB on windows. I am now trying to run a test-build with the old file contents, to see if I can then still install the package. If that fails, then I know that this PR fixed the issue. If it still works, then I am not sure why, but the problem is fixed and this PR can be closed.

I have a commit loaded up that re-implements the final version of the changes made in #9737. If this one goes through, and the installation fails, I will re-push that commit with the fix.

@KronosTheLate
Copy link
Contributor Author

The precompiling still seems to work locally. I think this branch can be closed safely. Not sure what changed, but if it is working, we do not really need to understand why 😆

@ViralBShah
Copy link
Member

So close this PR? Or is this the one that should be merged?

@KronosTheLate
Copy link
Contributor Author

KronosTheLate commented Nov 18, 2024

This is the relevant PR, the other one can be forgotten.

I am however now getting the original error again. I am not sure why it was working for a little while on wednesday. The error is here:

󰍲 dennis.bal  ~   08:57 
 juliaup update
Updating channel release

󰍲 dennis.bal  ~   08:57 
 julia
Precompiling OhMyREPL...
  8 dependencies successfully precompiled in 14 seconds. 27 already precompiled.
[ Info: OhMyREPL loaded
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.1 (2024-10-16)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using DuckDB
 │ Package DuckDB not found, but a package named DuckDB is available from a registry.
 │ Install package?
 │   (@v1.11) pkg> add DuckDB
 └ (y/n/o) [y]:
    Updating registry at `C:\Users\dennis.bal\.julia\registries\General.toml`
   Resolving package versions...
    Updating `C:\Users\dennis.bal\.julia\environments\v1.11\Project.toml`
  [d2f5444f] + DuckDB v1.1.0
    Updating `C:\Users\dennis.bal\.julia\environments\v1.11\Manifest.toml`
  [c3b6d118] + BitIntegers v0.3.2
  [a10d1c49] + DBInterface v2.6.1
  [d2f5444f] + DuckDB v1.1.0
  [fb4d412d] + FixedPointDecimals v0.5.3
  [ea10d353] + WeakRefStrings v1.4.2
Precompiling DuckDB...
Info Given DuckDB was explicitly requested, output will be shown live
ERROR: LoadError: could not load symbol "duckdb_vector_size":
The specified procedure could not be found.
Stacktrace:
 [1] duckdb_vector_size()
   @ DuckDB C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\api.jl:715
 [2] top-level scope
   @ C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\database.jl:100
 [3] include(mod::Module, _path::String)
   @ Base .\Base.jl:557
 [4] include(x::String)
   @ DuckDB C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\DuckDB.jl:1
 [5] top-level scope
   @ C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\DuckDB.jl:28
 [6] include
   @ .\Base.jl:557 [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, UInt128}}, source::Nothing)
   @ Base .\loading.jl:2790
 [8] top-level scope
   @ stdin:5
in expression starting at C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\database.jl:100
in expression starting at C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\DuckDB.jl:1
in expression starting at stdin:5
  ✗ DuckDB
  15 dependencies successfully precompiled in 18 seconds. 7 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

DuckDB

Failed to precompile DuckDB [d2f5444f-75bc-4fdf-ac35-56f514c445e1] to "C:\\Users\\dennis.bal\\.julia\\compiled\\v1.11\\DuckDB\\jl_4079.tmp".
ERROR: LoadError: could not load symbol "duckdb_vector_size":
The specified procedure could not be found.
Stacktrace:
 [1] duckdb_vector_size()
   @ DuckDB C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\api.jl:715
 [2] top-level scope
   @ C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\database.jl:100
 [3] include(mod::Module, _path::String)
   @ Base .\Base.jl:557
 [4] include(x::String)
   @ DuckDB C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\DuckDB.jl:1
 [5] top-level scope
   @ C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\DuckDB.jl:28
 [6] include
   @ .\Base.jl:557 [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, UInt128}}, source::Nothing)
   @ Base .\loading.jl:2790
 [8] top-level scope
   @ stdin:5
in expression starting at C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\database.jl:100
in expression starting at C:\Users\dennis.bal\.julia\packages\DuckDB\8Gvy6\src\DuckDB.jl:1
in expression starting at stdin:

As mentioned previously, one does not get this compilation error if one downloads the binary from the official website, and tells julia to use that one. Which is why I believe that the issue lies in the DuckDB_jll binary.

I am not sure if this PR will fix the problem. It is more hope than anything else TBH.

@ViralBShah
Copy link
Member

@giordano Ok to merge and see how it goes?

@ViralBShah
Copy link
Member

Bump. Should we merge?

@@ -53,4 +61,4 @@ dependencies = Dependency[
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v"6.1.0", julia_compat="1.6")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v"6.1.0", julia_compat="1.6")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change whitespace without a good reason, especially if the result is to remove the trailing newline.

Suggested change
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v"6.1.0", julia_compat="1.6")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v"6.1.0", julia_compat="1.6")

if [[ "${target}" == *-mingw32 ]]; then
install -Dvm 755 "build/src/libduckdb.${dlext}" -t "${libdir}"
if [[ "$target" == *-ming* ]]; then
build_command="cmake -B build -G \"Ninja\""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why we should use different commands for different platforms.

install -Dvm 755 "build/src/libduckdb.${dlext}" -t "${libdir}"
if [[ "$target" == *-ming* ]]; then
build_command="cmake -B build -G \"Ninja\""
build_extensions="icu;parquet;json"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the different extensions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants