asonix / release-manager

A utility to manage releasing rust programs for multiple platforms
1 stars 1 forks source link

Allow multiple builds with the same architecture, linking different libraries #1

Closed asonix closed 6 years ago

asonix commented 6 years ago

Currently, projects built with release-manager can only produce one build per os/arch/libc version. This can be an issue, when a dynamically linked binary isn't able to find required shared objects on a target machine. This is particularly an issue with libssl, libcrypto, and libcurl on aarch64 machines.

I first encountered this issue when trying to run my aarch64-unknown-linux-gnu build on my pine64 running Armbian. Since openssl is linked to version 1.1 in the compile, but only version 1.0 is present on Armbian, the binary fails to run. This is compounded by the issue of aarch64-unknown-linux-musl not being a valid target, so static binaries do not work on this platform.

Since release-manager already doesn't check for duplicates when parsing Release.toml, this addition shouldn't be too much effort. The Release.toml format could be altered to include an optional build_postfix parameter as follows:

[config.Linux.amd64]
build_postfix = "openssl-1.0"
libs = ["/path/to/openssl-1.0/lib"]
env = { OPENSSL_DIR = "/some/other/path" }

The above config should produce a build titled x86_64-unknown-linux-gnu-openssl-1.0. Since this would be an optional parameter, it would not render previous Release.tomls invalid.