Closed mks-h closed 2 years ago
Aha! So the library is being built in /tmp/t6326-0/lib64 (the log is full of mentions of that directory), but we're trying to copy from /tmp/t6326-0/lib. This is definitely a problem with our build.rs.
Now the question is: why does gettex is trying to place the lib into "lib64" rather than "lib".
@delight-aug, can you please try this patch and see if it helps?
diff --git a/gettext-sys/build.rs b/gettext-sys/build.rs
index 37d543b..153108a 100644
--- a/gettext-sys/build.rs
+++ b/gettext-sys/build.rs
@@ -220,6 +220,7 @@ fn main() {
}
cmd.arg(format!("--prefix={}", &posix_path(&build_dir)));
+ cmd.arg(format!("--libdir={}", &posix_path(&build_dir.join("lib"))));
if target != host && (!target.contains("windows") || !host.contains("windows")) {
// NOTE GNU terminology
(I don't know why it chooses lib64 over lib, so I'm just forcing it to use lib. It's not a big deal since we are not actually installing anything on the user's machine — these paths are only relevant to our own build.rs, which copies the necessary files and statically links them with the final executable.)
It's choosing lib64 because, turns out, there is openSuse's downstream patch, that changes path. You can see this page for used sources/patches.
gettext-sys doesn't rely on the system package, and compiles its own from the source it bundles. So downstream patches shouldn't affect anything.
The patch worked!
Thanks for testing!
When I'm building
gettext-rs
crate using dev profile — it seems to skip buildinggettext-sys
. But when I'm building it with a release profile — it starts buildinggettext-sys
for around 5 minutes and then errors out. The same happens if I buildgettext-sys
with dev profile. You can see gist with the full log. I'm on openSUSE Tumbleweed, and I do have gettext-devel and gcc packages installed. Thanks in advance!