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

Latest version fails to build for android #455

Closed
IsmailAlamKhan opened this issue Feb 14, 2024 · 5 comments
Closed

Latest version fails to build for android #455

IsmailAlamKhan opened this issue Feb 14, 2024 · 5 comments
Labels
bug This is a bug

Comments

@IsmailAlamKhan
Copy link

IsmailAlamKhan commented Feb 14, 2024

I am not able to build for android when using the latest version of your package with the following error.

image

@Enet4 Enet4 added the bug This is a bug label Feb 14, 2024
@Enet4
Copy link
Owner

Enet4 commented Feb 14, 2024

Thank you for reporting. Please follow the recommendations in issues #432 and #446 so that openjp2 is excluded from building for that platform. You can also try PR #449.

@IsmailAlamKhan
Copy link
Author

Hey I am kinda new to rust how can I use the version from your PR?

@Enet4
Copy link
Owner

Enet4 commented Feb 14, 2024

At your Cargo.toml:

[dependencies]
dicom = { git = "https://github.com/Enet4/dicom-rs", branch = "change/openjp2-opt" }

This also works when fetching individual crates.

See also: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories

@IsmailAlamKhan
Copy link
Author

IsmailAlamKhan commented Feb 14, 2024

Thanks a lot for the responses, I still get the same issue. Here is my build command

rustup target add \
        aarch64-linux-android \
        armv7-linux-androideabi \
        x86_64-linux-android \
        i686-linux-android

# Build the android libraries in the jniLibs directory
cargo ndk -o $JNI_DIR \
        --manifest-path ../Cargo.toml \
        -t armeabi-v7a \
        -t arm64-v8a \
        -t x86 \
        -t x86_64 \
        build --release

and my environment is Apple Mac Mini M2 2023 MacOS Sonoma 14.2.1

@IsmailAlamKhan
Copy link
Author

IsmailAlamKhan commented Feb 15, 2024

@Enet4 Thanks a lot! I was able to solve the issue with the PR by updating the dicom-pixeldata dependency, which was still on the official version. Here's the updated Cargo.toml. This might be helpful for someone else who encounters the same problem.

dicom = { git = "https://github.com/Enet4/dicom-rs", branch = "change/openjp2-opt" }
dicom-pixeldata = { git = "https://github.com/Enet4/dicom-rs", branch = "change/openjp2-opt", default-features = false, features = [
    "rayon",
    "openjpeg-sys",
    "image",
] }

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

No branches or pull requests

2 participants