将 NixOS 升级到 20.03 后,带有柴油和 mysql 依赖项的箱子不再针对 mariadb 进行编译
Crate with diesel and mysql dependencies no longer compiles against mariadb after upgrading NixOS to 20.03
我的箱子,取决于diesel with the mysql
feature enabled, no longer compiles after upgrading my system from NixOS 19.09 to 20.03. It seems the only significant change is an update of the mariadb-server
package from 10.2.17 to 10.3.18. There is no change to the Rust toolchain etc. (it's statically pinned in nix-shell
to nightly 2020-04-20).
very long compiler message 开头为:
warning: build failed, waiting for other jobs to finish...
error: linking with `cc` failed: exit code: 1
我该怎么办?
这个构建脚本 tells 使用编译器的标志 `-lmariadb 将货物 link 包装箱解决了这个问题:
fn main() {
println!("cargo:rustc-link-lib=mariadb");
}
更新2020-05-01
实际上这个问题可以在 mysqlclient-sys crate 中解决。
我的箱子,取决于diesel with the mysql
feature enabled, no longer compiles after upgrading my system from NixOS 19.09 to 20.03. It seems the only significant change is an update of the mariadb-server
package from 10.2.17 to 10.3.18. There is no change to the Rust toolchain etc. (it's statically pinned in nix-shell
to nightly 2020-04-20).
very long compiler message 开头为:
warning: build failed, waiting for other jobs to finish...
error: linking with `cc` failed: exit code: 1
我该怎么办?
这个构建脚本 tells 使用编译器的标志 `-lmariadb 将货物 link 包装箱解决了这个问题:
fn main() {
println!("cargo:rustc-link-lib=mariadb");
}
更新2020-05-01
实际上这个问题可以在 mysqlclient-sys crate 中解决。