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

Windows CI for the Julia Pkg errors with 'Could not load symbol "duckdb_vector_size"' #13911

Open
2 tasks done
abelsiqueira opened this issue Sep 12, 2024 · 16 comments · May be fixed by JuliaPackaging/Yggdrasil#9737
Open
2 tasks done

Comments

@abelsiqueira
Copy link

What happens?

We have a failing Julia package build with DuckDB_jll 1.1.0 for Windows GitHub runners: https://github.com/TulipaEnergy/TulipaEnergyModel.jl/actions/runs/10833112611/job/30062514253

Revelant part reproduced:

ERROR: LoadError: could not load symbol "duckdb_vector_size":
The specified procedure could not be found. 

I saw other failures on 1.1.0, but I couldn't tell if they were related to this issue or not.

To Reproduce

I created a simple repo building a Julia package that runs DuckDB here: https://github.com/abelsiqueira/DuckDBDebug.jl/actions/runs/10835456425/job/30067028887

You can see:

  • It passes for ubuntu on DuckDB_jll 1.0.0 and 1.1.0
  • It passes for Windows on DuckDB_jll 1.0.0
  • It fails for Windows on DuckDB_jll 1.1.0

The code is very simple, and it doesn't actually run, since it fails on precompilation, but everything is included in the repo (https://github.com/abelsiqueira/DuckDBDebug.jl).

OS:

windows-latest on CII

DuckDB Version:

1.1.0

DuckDB Client:

Julia

Hardware:

No response

Full Name:

Abel Soares Siqueira

Affiliation:

Netherlands eScience Center

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have
@ansaardollie
Copy link

I am having the same issue, just got a new laptop and did a fresh install of Julia, tried adding the package and this error prevented the package from precompiling.

@szarnyasg
Copy link
Collaborator

Hi @abelsiqueira and @ansaardollie, thanks for opening this issue and joining the discussion. The DuckDB Julia API is experimental and not covered by community support. We welcome contributions fixing this issue but the core team is unlikely to fix this bug in the near future.

@abelsiqueira
Copy link
Author

Thanks for the reply @szarnyasg. Just an update on our side, [email protected] is broken on local Windows machines as well, not just the CI.

Maybe limiting the DuckDB dependency on DuckDB_jll to =1.0.0 is a workaround until it's fixed.

For other users, you can add and pin DuckDB_jll to v1.0.0 with

Since DuckDB compat bounds include DuckDB_jll 1.1.0, then you either do that or pin DuckDB itself to v0.10.3.

@szarnyasg
Copy link
Collaborator

Thanks for the additional info, this definitely warrants a look on our side.

@Mytherin
Copy link
Collaborator

Does this issue still persist with DuckDB 1.1, or is this issue specifically about using DuckDB 1.0 in combination with DuckDB_jll 1.1?

@abelsiqueira
Copy link
Author

It was about DuckDB.jl 1.0 with jll 1.1, because DuckDB.jl 1.1.0 was not around yet. But I reran the tests in https://github.com/abelsiqueira/DuckDBDebug.jl/actions/runs/10835456425/job/30067028887 and they also fail with DuckDB.jl 1.1.0

@abelsiqueira
Copy link
Author

abelsiqueira commented Sep 19, 2024

@jhmenke
Copy link

jhmenke commented Sep 20, 2024

I can confirm this issue on a number of different Windows 10 computers.

I guess the Windows libduckdb is not compiled correctly. A temporary fix was:

[compat]
DuckDB_jll = "=1.0.0"

in the Project.toml

@abelsiqueira
Copy link
Author

Maybe version 1.1.1 fixes the issue? Can we have new DuckDB_jll and DuckDB.jl releases?

@mzy2240
Copy link

mzy2240 commented Oct 1, 2024

Still an issue in Windows

abelsiqueira added a commit to abelsiqueira/TulipaEnergyModel.jl that referenced this issue Oct 7, 2024
DuckDB.jl 1.1 on Windows is broken with an error
'Could not load symbol duckdb_vector_size'
This limits the DuckDB version until that is fixed.

refs:
- duckdb/duckdb#13911
datejada pushed a commit to TulipaEnergy/TulipaEnergyModel.jl that referenced this issue Oct 7, 2024
DuckDB.jl 1.1 on Windows is broken with an error
'Could not load symbol duckdb_vector_size'
This limits the DuckDB version until that is fixed.

refs:
- duckdb/duckdb#13911
abelsiqueira added a commit to abelsiqueira/TulipaEnergyModel.jl that referenced this issue Oct 7, 2024
DuckDB.jl 1.1 on Windows is broken with an error
'Could not load symbol duckdb_vector_size'
This limits the DuckDB version until that is fixed.

refs:
- duckdb/duckdb#13911
abelsiqueira added a commit to abelsiqueira/TulipaEnergyModel.jl that referenced this issue Oct 7, 2024
DuckDB 1.0 allows DuckDB_jll 1.1.0, which is not correct.
This limits DuckDB_jll as well.

refs:
- duckdb/duckdb#13911
datejada pushed a commit to TulipaEnergy/TulipaEnergyModel.jl that referenced this issue Oct 7, 2024
DuckDB 1.0 allows DuckDB_jll 1.1.0, which is not correct.
This limits DuckDB_jll as well.

refs:
- duckdb/duckdb#13911
@GhostOfElectric
Copy link

GhostOfElectric commented Oct 14, 2024

If the 1.1.1 C/C++ windows library is downloaded from the DuckDB website and an environment variable JULIA_DUCKDB_LIBRARY is set to point at duckdb.dll within it, then the latest version will successfully compile in Julia on windows.

@jdpavek
Copy link

jdpavek commented Oct 17, 2024

Thanks, GhostOfElectric. that worked for me.

@KronosTheLate
Copy link

If the 1.1.1 C/C++ windows library is downloaded from the DuckDB website and an environment variable JULIA_DUCKDB_LIBRARY is set to point at duckdb.dll within it, then the latest version will successfully compile in Julia on windows.

If version 1.1.1 of the binary works with DuckDB.jl, then I figures that the fix would be updating the binary. I triggered that in this PR, which might just fix this issue on your next update.

For future reference, I am pretty sure that one could automate a github workflow to trigger on a new tag, and create a PR with the tiny changes required to trigger a new build. This would ensure that the binary stays updated.

@KronosTheLate
Copy link

KronosTheLate commented Nov 4, 2024

The outline for a workflow `.github/workflows/JuliaRelease.yml` could be something like this:
name: On Tag

on:
  push:
    tags:        
      - 'v[0-9]+.[0-9]+.[0-9]+'

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

permissions:
  id-token: write
  contents: read

jobs:
  update_duckdb:
    runs-on: ubuntu-latest
    
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Clone Yggdrasil
        run: git clone https://github.com/JuliaPackaging/Yggdrasil
    
      - name: Create branch
        run: |
          TAG=${{ github.ref }}
          BRANCH_NAME=update_duckdb_jll_${TAG#refs/tags/}
          git switch -c $BRANCH_NAME

      - name: Update version
        run: |
          COMMIT_HASH=$(git rev-parse HEAD)
          sed -i "s|version = v\".*\"|version = v\"${TAG#refs/tags/}\"|g" D/DuckDB/build_tarballs.jl
          sed -i "s|GitSource(\"https://github.com/duckdb/duckdb.git\", \".*\")|GitSource(\"https://github.com/duckdb/duckdb.git\", \"$COMMIT_HASH\")|g" D/DuckDB/build_tarballs.jl

      - name: Commit changes
        run: |
          git add .
          git commit -m "Update DuckDB to commit $COMMIT_HASH"

      - name: Push changes
        run: git push --set-upstream origin $BRANCH_NAME

      - name: Create pull request
        run: gh pr create -B base_branch -H $BRANCH_NAME --title 'Merge $BRANCH_NAME into base_branch' --body 'Created by GitHub action'

@KronosTheLate
Copy link

KronosTheLate commented Nov 4, 2024

The jll is now updated to 1.1.2, but I still got the same precompilation error. The fix provided by @GhostOfElectric worked. So it seems like the 1.1.2 C/C++ library downloaded from here differs from the 1.1.2 library built by Yggdrasil.jl which ends up here.

This might be related to how the windows build has specific requirements:
image

@KronosTheLate
Copy link

I created this discouse post to get exta sets of eyes on this. I suspect the right person could fix this in a couple of minutes.

KronosTheLate added a commit to KronosTheLate/Yggdrasil that referenced this issue Nov 5, 2024
Attempting to fix [this issue](duckdb/duckdb#13911) by adding a special case for windows. Tried to make that special case a mixture of the generic build script, and the contents [here](https://duckdb.org/docs/dev/building/build_instructions.html#windows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants