Skip to content

Proj isnt compiling in docker container, but does locally #163

@gmmorris

Description

@gmmorris

I'm not sure if this is a Proj issue specifically, this might be an ffi issue, but I'm hoping you'll have a better hunch than I.

I have a project that compiles locally just fine, and runs fine on an ubuntu based image in CI.
When I try to build a local docker image, I get the following error:

#16 236.3 error[E0308]: mismatched types
#16 236.3   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/proj-0.27.0/src/network.rs:53:48
#16 236.3    |
#16 236.3 53 |             let _ = unsafe { CString::from_raw(header.as_ptr() as *mut i8) };
#16 236.3    |                              ----------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut u8`, found `*mut i8`
#16 236.3    |                              |
#16 236.3    |                              arguments to this function are incorrect
#16 236.3    |
#16 236.3    = note: expected raw pointer `*mut u8`
#16 236.3               found raw pointer `*mut i8`
#16 236.3 note: associated function defined here
#16 236.3   --> /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/ffi/c_str.rs:397:19
#16 236.3
#16 236.3 For more information about this error, try `rustc --explain E0308`.
#16 236.3 error: could not compile `proj` (lib) due to previous error

It seems proj can't compile due to a type mismatch with CString in the container.
I'm guessing this an API being called in proj-sys? But don't really know where to start debugging this. 😅

Any advice would be highly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions