tzdata: add libintl dependency on FreeBSD#313893
tzdata: add libintl dependency on FreeBSD#313893rhelmot wants to merge 1 commit intoNixOS:masterfrom
Conversation
wolfgangwalther
left a comment
There was a problem hiding this comment.
The makefile actually contains the explicit example of FreeBSD as a platform you have to explicitly add -lintl on!
Not 100%.
The Makefile for tzdata contains:
# Non-default libraries needed to link.
# On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0.
LDLIBS=
# Add the following to an uncommented "CFLAGS=" line as needed
# to override defaults specified in the source code or by the system.
[...]
# -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris),
# where LDLIBS also needs to contain -lintl on some hosts;
# -DHAVE_GETTEXT=0 to avoid using gettext
I can't judge the "why", i.e. whether FreeBSD is one of "those hosts", but the "how" seems good. But given that it fixed things for you, the "why" seems pretty close.
Ericson2314
left a comment
There was a problem hiding this comment.
I think it might be good to have a libIntlSeparateFromLibc ? stdenv.hostPlatform.libc and use libIntlSeparateFromLibc in the two conditions?
Also, please add the description to the commit message
|
libintl is already defined as So I guess we can just make the dependency unconditional? Might want to change the default from null to stdenv.cc.libc, if I'm understanding the directions we would like to take for nixpkgs? :) |
|
Yeah I am surprised it built on darwin, but I guess they include some libintl. |
Ericson2314
left a comment
There was a problem hiding this comment.
Hmm, I just cross compiled this without any changes, and it built fine. Are we sure we need this?
|
EXCELLENT catch! I did some forensics and found that this is only because of the way the FreeBSD bootstrap tools work, and if I override it for just that one stdenv it works fine. It turns out that tzdata is doing quite a bit of self-configuration at build time through use of the |
Description of changes
part of #296581
tzdata doesn't have a configure step. It instead has instructions to edit the make flags until it works. The makefile actually contains the explicit example of FreeBSD as a platform you have to explicitly add -lintl on!
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.