Closed cstrickland-pag closed 2 months ago
Thank you for reporting. This has also been brought up on our Zulip (ref). It seems that some recent patches to openjp2
broke the integration with DICOM-rs. Ideally this should be reported and patched at the 0.3.x line of openjp2
.
Until then, you should be able to require exact versions which are likely not to have the problem.
[dependencies]
jpeg2k = { version = "=0.6.6", default-features = false }
openjp2 = "=0.3.1"
Thank you for the information. By adding the additional dependencies you have suggested, I can successfully work around the issue.
This is an issue I am only getting on new projects. I have the same dependencies including version in an older project that works without error. Below is a simplified set of steps that can reproduce the issue. I did notice different versions of sub-dependencies in Cargo.lock file. Specifically in older project, with the same dependency versions I get:
jpeg2k: 0.6.6 vs 0.6.7 openjpy: 0.3.0 vs 0.3.4
To replicate (running on Linux, cargo 1.76.0 ):
This creates the following dependencies in the Cargo.toml [dependencies] dicom = { version = "0.6.3", features = ["pixeldata"] }
Then run:
cargo check
opj_stream_read_skip
in this scope --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openjp2-0.3.4/src/openjpeg.rs:664:7opj_stream_read_seek
in this scope --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openjp2-0.3.4/src/openjpeg.rs:672:7opj_stream_write_skip
in this scope --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openjp2-0.3.4/src/openjpeg.rs:682:7opj_stream_write_seek
in this scope --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openjp2-0.3.4/src/openjpeg.rs:690:7opj_stream_default_read
in this scope --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openjp2-0.3.4/src/openjpeg.rs:699:5opj_stream_default_create
defined hereopj_stream_default_write
in this scope --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openjp2-0.3.4/src/openjpeg.rs:707:5opj_stream_default_create
defined hereopj_stream_default_skip
in this scope --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openjp2-0.3.4/src/openjpeg.rs:715:5opj_stream_default_create
defined hereopj_stream_default_seek
in this scope --> /home/chris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openjp2-0.3.4/src/openjpeg.rs:719:5opj_stream_default_create
defined hereFor more information about this error, try
rustc --explain E0425
. error: could not compileopenjp2
(lib) due to 8 previous errorsPlease let me know if I you would like me to supply any more information on this issue? Any help on this would be greatly appreciated.