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

Error: no such module: rtree #149

Closed
jmatsushita opened this issue Jan 20, 2024 · 2 comments
Closed

Error: no such module: rtree #149

jmatsushita opened this issue Jan 20, 2024 · 2 comments

Comments

@jmatsushita
Copy link

I'm trying to use the rtree module following the sqlite docs however this statement fails:

CREATE VIRTUAL TABLE demo_index USING rtree(
   id,              -- Integer primary key
   minX, maxX,      -- Minimum and maximum X coordinate
   minY, maxY       -- Minimum and maximum Y coordinate
);

with this error:

Error: no such module: rtree
    at check (https://rhashimoto.github.io/wa-sqlite/src/sqlite-api.js:857:11)
    at Object.step (https://rhashimoto.github.io/wa-sqlite/src/sqlite-api.js:690:14)
    at async execute (https://rhashimoto.github.io/wa-sqlite/src/examples/tag.js:50:16)

I've checked by doing a local build that -DSQLITE_ENABLE_RTREE is indeed passed as a compilation option, so I would expect this to work. Unless I'm missing something?

Cheers,

Jun

@rhashimoto
Copy link
Owner

I'm pretty sure rtree is not enabled in my builds. If you try PRAGMA compile_options in the demo, there's no ENABLE_RTREE. There are some suggestions for customizing your own build here.

@jmatsushita
Copy link
Author

Perfect thank you make WASQLITE_EXTRA_DEFINES="-DSQLITE_ENABLE_RTREE" did the trick!

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

No branches or pull requests

2 participants