Skip to content
This repository was archived by the owner on May 19, 2022. It is now read-only.
This repository was archived by the owner on May 19, 2022. It is now read-only.

Cargo config is not always found. #194

@IamTheCarl

Description

@IamTheCarl

My use case is that I am using the official Rust Docker container to build the package.
The official Docker container installs cargo's config file at /usr/local/cargo.

I am cross-compiling with this container. I install the needed assets and cargo finds them fine thanks to the configuration file, but cargo-deb does not. I have to create a copy of the config file in the root user's home directory to get cargo-deb to call the aarch64 version of the strip command.

# Make it aware of ARM linker (Rust doesn't have their own yet)
RUN echo "[target.aarch64-unknown-linux-gnu]" >> ${CARGO_HOME}/config \
 && echo "linker = \"aarch64-linux-gnu-gcc\"" >> ${CARGO_HOME}/config

# This is compensating for a bug in cargo-deb
RUN mkdir -p /root/.cargo \
 && echo "[target.aarch64-unknown-linux-gnu]" >> /root/.cargo/config \
 && echo "linker = \"aarch64-linux-gnu-gcc\"" >> /root/.cargo/config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions