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

Cannot compile on armv7-unknown-linux-gnueabihf #146

Closed
al-jshen opened this issue Oct 10, 2021 · 5 comments
Closed

Cannot compile on armv7-unknown-linux-gnueabihf #146

al-jshen opened this issue Oct 10, 2021 · 5 comments

Comments

@al-jshen
Copy link

al-jshen commented Oct 10, 2021

Trying to compile a crate with fitsio="0.17.0" as a dependency on a Raspberry Pi running Raspberry Pi OS Lite. This is the error message:

error: no rules expected the token `DataType`
   --> /root/.cargo/registry/src/github.com-1285ae84e5963aae/fitsio-0.17.0/src/images.rs:295:42
    |
91  | macro_rules! read_image_impl_vec {
    | -------------------------------- when calling this macro
...
295 | read_image_impl_vec!(i64, i64::default() DataType::TLONGLONG);
    |                                         -^^^^^^^^ no rules expected this token in macro call
    |                                         |
    |                                         help: missing comma here

error: no rules expected the token `DataType`
   --> /root/.cargo/registry/src/github.com-1285ae84e5963aae/fitsio-0.17.0/src/images.rs:308:39
    |
210 | macro_rules! write_image_impl {
    | ----------------------------- when calling this macro
...
308 | write_image_impl!(i64, i64::default() DataType::TLONGLONG);
    |                                      -^^^^^^^^ no rules expected this token in macro call
    |                                      |
    |                                      help: missing comma here

error[E0425]: cannot find function `fits_read_key_lnglng` in this scope
   --> /root/.cargo/registry/src/github.com-1285ae84e5963aae/fitsio-0.17.0/src/headers.rs:61:22
    |
61  |   reads_key_impl!(i64, fits_read_key_lnglng);
    |                        ^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `fits_read_key_lng`
    |
   ::: /root/.cargo/registry/src/github.com-1285ae84e5963aae/fitsio-0.17.0/src/longnam.rs:240:1
    |
240 | / pub(crate) unsafe fn fits_read_key_lng(
241 | |     fptr: *mut fitsfile,
242 | |     keyname: *const c_char,
243 | |     value: *mut c_long,
...   |
247 | |     ffgkyj(fptr, keyname, value, comm, status)
248 | | }
    | |_- similarly named function `fits_read_key_lng` defined here

error[E0425]: cannot find function `fits_read_col_lnglng` in this scope
   --> /root/.cargo/registry/src/github.com-1285ae84e5963aae/fitsio-0.17.0/src/tables.rs:156:22
    |
156 |   reads_col_impl!(i64, fits_read_col_lnglng, 0);
    |                        ^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `fits_read_col_lng`
    |
   ::: /root/.cargo/registry/src/github.com-1285ae84e5963aae/fitsio-0.17.0/src/longnam.rs:198:1
    |
198 | / pub(crate) unsafe fn fits_read_col_lng(
199 | |     fptr: *mut fitsfile,
200 | |     colnum: c_int,
201 | |     firstrow: LONGLONG,
...   |
211 | |     )
212 | | }
    | |_- similarly named function `fits_read_col_lng` defined here

For more information about this error, try `rustc --explain E0425`.
@al-jshen al-jshen changed the title Cannot compile on armv7l Cannot compile on armv7-unknown-linux-gnueabihf Oct 10, 2021
@al-jshen
Copy link
Author

Works with fitsio = { git = "https://github.com/mindriot101/rust-fitsio" }

@simonrw
Copy link
Owner

simonrw commented Oct 10, 2021

Sorry about that. As you can tell I haven't done a release fixing arm support. I'll get one out when I can, thanks for reporting!

For my information, how are you using the crate? I'm keen to know more about the use cases it is being used for.

@al-jshen
Copy link
Author

No problem, thanks for your work on this crate.

Hopefully as part of a camera control library for a telescope! Still figuring out whether everything (there's some C++ stuff) can run on arm.

@simonrw
Copy link
Owner

simonrw commented Oct 16, 2021

I've just released v0.18.0 to crates.io with arm support. Would you be able to test, rather than using the git repository directly?

@al-jshen
Copy link
Author

Sorry about the slow response. I switched over to arm64 and fitsio = 0.18.0 compiles fine here. Not sure about the 32 bit systems though.

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

No branches or pull requests

2 participants