gettext-sys fails to build on FreeBSD 14.0
Here's the build log I got from my CI (https://github.com/newsboat/newsboat/pull/2646): build.log.gz The same CI, with exact same commands but FreeBSD 13.2 image, builds the program fine.
Likely the same bug as https://github.com/Koka/gettext-rs/issues/114
As a further comment on this issue, I ran into it again with FreeBSD 14 when updating dependencies for two different applications. When digging in I was reminded that the option to link against the system gettext is disabled everywhere except linux-glibc and windows-gnu. This is less than ideal because it then builds a static gettext all in the background with no progress information, which is time consuming and ultimately fails anyway.
As an experiment I hacked in code to link dynamically against GNU gettext libintl installed from ports and thus far have zero issues. Would patches be accepted for this? Or is there a particar reason why it is the way it is?
// build.rs, @103
} else if target.contains("freebsd") {
println!("cargo:rustc-link-search=native=/usr/local/lib");
println!("cargo:rustc-link-lib=dylib=intl");
return;
}
@nfisher1226, you're right, it fails with the same error as in #114. Closing. Thank you!
As for your change for FreeBSD, it looks good and I'd accept a PR. Please update the README to mention that the feature now supports FreeBSD and what port one needs to install for this to work.