Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

installation error could not compile hftokenizer due to missing argument in truncate() #10

Open
cregouby opened this issue Jan 2, 2022 · 0 comments

Comments

@cregouby
Copy link
Contributor

cregouby commented Jan 2, 2022

Hello,
hftokenizers fails to install on a ubuntu setup from remotes::install_github("mlverse/hftokenizers") with the following diagnostic error : (end of the log)

   Compiling hftokenizers v0.0.1 (/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust)
     Running `rustc --crate-name hftokenizers --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type staticlib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=3c51a260a281a961 -C extra-filename=-3c51a260a281a961 --out-dir /tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps -C incremental=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/incremental -L dependency=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps --extern extendr_api=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps/libextendr_api-ab8e2e69f8f7e92d.rlib --extern serde=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps/libserde-5c0cd83066b865c7.rlib --extern tokenizers=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps/libtokenizers-227ec495a8363253.rlib -L /usr/lib/R/lib -L native=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/build/bzip2-sys-9ae042ae79e63dec/out/lib -L native=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/build/esaxx-rs-cd30cfa5e3c29c37/out -L native=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/build/onig_sys-3d2bc41975184ad9/out`
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> src/encoding.rs:88:19
    |
88  |     self.encoding.truncate(max_length as usize, stride as usize);
    |                   ^^^^^^^^ -------------------  --------------- supplied 2 arguments
    |                   |
    |                   expected 3 arguments
    |
note: associated function defined here
   --> ~/.cargo/git/checkouts/tokenizers-d0d74b041c9cfecb/7069988/tokenizers/src/tokenizer/encoding.rs:299:12
    |
299 |     pub fn truncate(&mut self, max_len: usize, stride: usize, direction: TruncationDirection) {
    |            ^^^^^^^^

For more information about this error, try `rustc --explain E0061`.
error: could not compile `hftokenizers` due to previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name hftokenizers --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type staticlib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=3c51a260a281a961 -C extra-filename=-3c51a260a281a961 --out-dir /tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps -C incremental=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/incremental -L dependency=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps --extern extendr_api=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps/libextendr_api-ab8e2e69f8f7e92d.rlib --extern serde=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps/libserde-5c0cd83066b865c7.rlib --extern tokenizers=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/deps/libtokenizers-227ec495a8363253.rlib -L /usr/lib/R/lib -L native=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/build/bzip2-sys-9ae042ae79e63dec/out/lib -L native=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/build/esaxx-rs-cd30cfa5e3c29c37/out -L native=/tmp/RtmpzQuC9Z/R.INSTALL36138d6d567615/hftokenizers/src/rust/target/debug/build/onig_sys-3d2bc41975184ad9/out` (exit status: 1)
make: *** [Makevars:11 : rust/target/debug/libhftokenizers.a] Erreur 101
ERROR: compilation failed for package ‘hftokenizers’
* removing ‘~/R/x86_64-pc-linux-gnu-library/4.1/hftokenizers’
Message d'avis :
Dans i.p(...) :
  installation of package ‘/tmp/Rtmp95El90/file33d68b5b5f4ffd/hftokenizers_0.1.0.tar.gz’ had non-zero exit status
@cregouby cregouby changed the title installation error could not compile hftokenizer installation error could not compile hftokenizer due to missing argument in truncate() Jan 2, 2022
dfalbel added a commit that referenced this issue Jan 3, 2022
bypass #10 though explicit last commit before TruncateDirection
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant