-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnu-tar: fix build for High Sierra #155992
Conversation
Mimicking Homebrew#136880, on High Sierra there are complaints about missing _libintl_ symbols too. Configure also checked for external libintl but did not add this LDFLAG. Seeing this formula built fine on newest macOSes, it's probably the system's `libiconv` being too old.
libintl is from gettext but gettext isn't a dependency here. I'm guessing there's some opportunistic linking going on. |
We probably want to add |
On my system the compiled binary links like this:
And works fine (i.e. displays localized characters). I guess the linking to libintl isn't as catastrophic as it seems? The bug report referenced in the
|
Not catastrophic per se, but not expected behaviour as we don't have It should be made consistent: either everything uses
libiconv does not provide libintl symbols at all, even on newer macOS. libintl and libiconv are separate things. libintl support in gnu-tar is completely optional - it will use it if it can find it but ignore it if it can't. It can be forced disabled with |
Pulled out gnu-tar.rb for tar-1.34 and did a little experiment:
For tar-1.35:
Found these lines in
|
Bottled gnu-tar does not offer localisation. Nobody has really asked for it, and we generally don't provide support outside of English.
This is a legacy compatibly file from when Apple used GCC rather than Clang. They even had a LLVM-GCC layer for a while. The last version was 4.2 (hence the version number you see). A part of this move was libstdc++ (GCC) to libc++ (LLVM), the latter coming the default in OS X 10.8. The code in question will be from GCC's Linux support. On Linux, libintl can be found in glibc. GCC support was removed in Xcode 5 in 2013 (OS X 10.9 release), and that compatibility header was removed in the 10.14 SDK in 2018. libintl doesn't ship in latest macOS SDKs either. Apple have largely gone in the opposite direction and have dropped anything GNU related for licensing reasons. |
Thanks for the historical background!
Well if that is the case, then I probably should open a PR to pass
Just kidding. I personally prefer to leave in gettext as a build-only dependency for those GNU efforts, and write off tar-1.35 as being bugged. After all, the symptom is similar enough to the
It probably checks at runtime, or maybe not at all. I can safely remove /usr/local/opt/gettext and continue using gtar and wget. Gettext is not even in Bottom line: if |
OK I found the correct way to remove |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?Mimicking #136880, on High Sierra there are complaints about missing
_libintl_
symbols too.Configure also checked for external libintl but did not add
-lintl
. Seeing this formula built fine on newest macOSes, it's probably the system's libiconv being too old.Or is it a bug just like 136880?