Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

Gettext: New version 0.22.5

Open eschnett opened this issue 1 year ago • 7 comments

eschnett avatar Mar 12 '24 16:03 eschnett

I think you can just remove the patch we are carrying in this update, since it looks like it was already incorporated upstream and so is now present in the tarball (hence the conflict).

imciner2 avatar Mar 13 '24 11:03 imciner2

Yes. Unfortunately that leads to a follow-up error...

eschnett avatar Mar 13 '24 14:03 eschnett

This is a known problem, discussed here. The solution seems to be this patch:

diff --git a/autogen.sh b/autogen.sh
index b896c3f1e..02a5fe130 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -134,6 +134,7 @@ if ! $skip_gnulib; then
     c-strcasestr
     c-strstr
     clean-temp
+    close
     closedir
     closeout
     configmake

I assume that, after patching autogen.sh, one needs to run it. This is where the trouble starts.

  • autogen.sh doesn't work in a release tarball (although it's present), one has to start from a git checkout
  • some additional files are not in git and need to be downloaded and uncompressed manually
  • building requires a lot of weird dependencies. Current issue: ppcx64 is missing (probably a Pascal compiler?) As much as I like a challenge, this package surely doesn't like being developed.

eschnett avatar Mar 13 '24 15:03 eschnett

Well, apparently NixOS just says to modify the headers and force GNULIB_CLOSE to be 1: https://github.com/NixOS/nixpkgs/pull/280197. That said, I don't know exactly what that sledgehammer is actually doing here, and also what file is being patched (I don't see a unistd.in.h in the gettext source, only a unistd.in.h.diff)

imciner2 avatar Mar 14 '24 11:03 imciner2

Thanks for the pointer. There are actually several unistd.h.in files in the distribution tarball (maybe 8?). I think they might all be autogenerated by make dist. I'm keeping the sed command instead of creating a patch.

I think the sledgehammer does the same thing that my previous (non-working) patch was trying to do.

eschnett avatar Mar 15 '24 17:03 eschnett

The Windows libraries now have different names than before. They used to encode just the major version number, now they encode the complete version number. I am renaming them in the build script. Does that sound right? Otherwise I can change the name of the build product. I think that might break compatibility for other packages using Gettext. Is that desired? Or even required? Does Gettext use semver?

eschnett avatar Mar 15 '24 19:03 eschnett

ping

eschnett avatar May 08 '24 18:05 eschnett

Merge?

ViralBShah avatar Jan 13 '25 14:01 ViralBShah

As discussed in #6950 and https://github.com/Julia-i18n/Gettext.jl/pull/5, can you configure --with-included-gettext and include libintl in the build products?

stevengj avatar Feb 22 '25 13:02 stevengj

The windows build is failing with:

[04:34:33] /opt/x86_64-w64-mingw32/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld: .libs/libgettextsrc_la-write-catalog.o:write-catalog.c:(.text+0x6c9): undefined reference to `close_used_without_requesting_gnulib_module_close'

This is how Nix fixed it: https://github.com/NixOS/nixpkgs/pull/280197/files

I wonder if we should just go to 0.25 - the latest release instead of trying to fix this.

cc @nhz2

ViralBShah avatar May 09 '25 11:05 ViralBShah

Oh, interesting, I didn't know about the https://github.com/Julia-i18n/Gettext.jl package. Yes, https://github.com/JuliaPackaging/Yggdrasil/pull/11038 currently builds libintl as a product for all platforms.

nhz2 avatar May 09 '25 18:05 nhz2

In the meantime there is PR #11388 with gettext 0.25 ...

fingolfin avatar Jun 17 '25 16:06 fingolfin