Giter Club home page Giter Club logo

Comments (9)

iwillspeak avatar iwillspeak commented on June 21, 2024 1

We aim to please. Thanks for the report btw.

from rust-onig.

happysalada avatar happysalada commented on June 21, 2024

It looks like it might just be a matter of bumping this https://github.com/rust-onig/rust-onig/blob/main/onig/Cargo.toml#L38

from rust-onig.

iwillspeak avatar iwillspeak commented on June 21, 2024

Fixed in 6.3.1:

https://crates.io/crates/onig/6.3.1

from rust-onig.

happysalada avatar happysalada commented on June 21, 2024

Thank you so much for the very fast fix!

from rust-onig.

happysalada avatar happysalada commented on June 21, 2024

Sorry to bother with this. But using cargo vendor with one of the dependencies of one project being onig, I still get the following error

   Compiling tracing-limit v0.1.0 (/private/tmp/nix-build-vector-0.17.3.drv-0/source/lib/tracing-limit)
   Compiling fakedata v0.1.0 (/private/tmp/nix-build-vector-0.17.3.drv-0/source/lib/fakedata)
   Compiling num_enum v0.5.4
   Compiling heim v0.1.0-rc.1 (https://github.com/heim-rs/heim.git?rev=b292f1535bb27c03800cdb7509fa81a4085
   Compiling onig v6.3.1
error[E0425]: cannot find value `ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME` in crate `onig_sys`
  --> /private/tmp/nix-build-vector-0.17.3.drv-0/vector-0.17.3-vendor.tar.gz/onig/src/flags.rs:74:22
   |
74 |         = (onig_sys::ONIG_SYN_OP2_QMARK_CAPITAL_P_NAME as u64);
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `
   |
  ::: /private/tmp/nix-build-vector-0.17.3.drv-0/source/target/x86_64-apple-darwin/release/build/onig_sys-
   |
3  | ...EN_IF_ELSE : u32 = 2097152 ; pub const ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP : u32 = 4194304 ; pub const
   |                                 ----------------------------------------------------------- similarly

error[E0425]: cannot find value `OnigSyntaxPython` in crate `onig_sys`
  --> /private/tmp/nix-build-vector-0.17.3.drv-0/vector-0.17.3-vendor.tar.gz/onig/src/syntax.rs:39:39
   |
39 |         unsafe { transmute(&onig_sys::OnigSyntaxPython) }
   |                                       ^^^^^^^^^^^^^^^^ help: a static with a similar name exists: `On
   |
  ::: /private/tmp/nix-build-vector-0.17.3.drv-0/source/target/x86_64-apple-darwin/release/build/onig_sys-
5ad7fd7cc508e343/out/bindings.rs:3:22644
   |
3  | ... } extern "C" { pub static mut OnigSyntaxPerl : OnigSyntaxType ; } extern "C" { pub static mut Oni
gSyntaxPerl_NG : OnigSyntaxType ; } ...
   |                    ------------------------------------------------ similarly named static `OnigSynta
xPerl` defined here

For more information about this error, try `rustc --explain E0425`.
error: could not compile `onig` due to 2 previous errors

When checking on the official rust documentation of the crate, those structs don't appear
http://rust-onig.github.io/rust-onig/onig_sys/
Could it be that the github version is not released to crates.io ?

I can confirm that the problem only seems to happen when you vendor dependencies. Using the normal compilation process, there doesn't seem to be any problems.

from rust-onig.

iwillspeak avatar iwillspeak commented on June 21, 2024

I think the docs are just really old. The key marker here is the Python syntax. That is in the latest version on docs.rs: https://docs.rs/onig_sys/69.7.1/onig_sys/static.OnigSyntaxPython.html

from rust-onig.

iwillspeak avatar iwillspeak commented on June 21, 2024

I don’t know about how vendoring works. Are you using 69.7.1 of onig_sys?

from rust-onig.

iwillspeak avatar iwillspeak commented on June 21, 2024

On closer inspection it looks like your error is to do with the version of oniguruma (the native library) you’re compiling against. You could try either updating that, or switching to use the built-in copy of Oniguruma: https://github.com/rust-onig/rust-onig#build-errors-caused-by-libclangllvm

from rust-onig.

happysalada avatar happysalada commented on June 21, 2024

wow thank you for this! You are right, the oniguruma is one version behind!
I'm going to update that.
Since onig is a depedency of a dependency in the build, I don't think I can define the default-feature = false with the cargo cli.
Updating the oniguruma should work fine I think.
Thanks a lot for your help on this!

from rust-onig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.