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

Problems following example usage #2

Open
karlb opened this issue Jan 11, 2024 · 5 comments
Open

Problems following example usage #2

karlb opened this issue Jan 11, 2024 · 5 comments

Comments

@karlb
Copy link

karlb commented Jan 11, 2024

The given compilation command did not create a dynamic library for me. Using the following command created one at the expected place (removed -- and added release, since the example used a release build):

cargo rustc --features extension --release --crate-type=cdylib

The suggested .load command will only work on MacOS, since other systems use a different suffix for dynamic libraries. A simple way to avoid that problem is to omit the suffix, since sqlite will look up files with the correct suffix for the used OS:

.load ./target/release/libsignal_tokenizer

When changing these two things, sqlite3 find the library, but still fails to load it correctly due to

Error: ./target/release/libsignal_tokenizer.so: undefined symbol: sqlite3_signaltokenizer_init

I haven't looked into that problem yet. Any obvious explanation? Did I break something by changing the rustc call?

@trucnguyenlam
Copy link

@karlb I also run into the same issue.

@mpr1255
Copy link

mpr1255 commented Mar 20, 2024

I have the same issue. Came here after several hours of debugging. What is the point of releasing a library like this if we can't even use it?? My gosh.

@AlexErrant
Copy link

From the blog:

Note that default sqlite3 shell doesn't support extensions so you'd have to build your own or use Signal's fork of better-sqlite3 which automatically loads signal_tokenizer.

Maybe that'll help you? I haven't tried it myself since the code is AGPL.

@mpr1255
Copy link

mpr1255 commented Apr 29, 2024

From the blog:

Note that default sqlite3 shell doesn't support extensions so you'd have to build your own or use Signal's fork of better-sqlite3 which automatically loads signal_tokenizer.

Maybe that'll help you? I haven't tried it myself since the code is AGPL.

I just gave up and use https://github.com/wangfenjin/simple

@geakstr
Copy link

geakstr commented Aug 20, 2024

I've prepared pull request (#3) to fix the issue. I wasn't be able to figure out root cause and how it was supposed to work at first place, but fixed with just trials and errors

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

No branches or pull requests

5 participants