Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
40.87k stars 9.59k forks source link

Xcode 9.3 breaks GNU detection of vasnprint #4008

Closed chdiza closed 6 years ago

chdiza commented 6 years ago

Xcode has been on a nice run of breaking certain functions that HB then has to paper over in superenv, e.g., homebrew-core/18438. The general kind of fix is exemplified in #3182.

Xcode 9.3 continues this noble tradition. This time the function is vasnprintf. My local custom formulas for grep and diffutils reveal this. In the case of grep, the following is in the configure.log:

configure:7830: checking for vasnprintf
configure:7830: gcc -o conftest -g -O2   conftest.c  >&5
Undefined symbols for architecture x86_64:
  "_vasnprintf", referenced from:
      _main in conftest-b41cac.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

In the case of diffutils, that same thing shows up in configure.log; and in both diffutils and grep there is also new a test failure (I run make check in my local formulas):

FAIL test-vasnprintf (exit status: 132)

I'm wondering whether vasnprintf should get the same treatment as futimens, utimensat and the like.

Doctor says I'm ready to brew. brew config is here:

HOMEBREW_VERSION: 1.5.13-18-g07997d4
ORIGIN: https://github.com/Homebrew/brew
HEAD: 07997d41e896ca1a11d4d774dadea9e6862a853e
Last commit: 21 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 41dd22806a81a5b27ba0d4d09dc90e4275803a19
Core tap last commit: 74 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/hb
HOMEBREW_CACHE: /stuff/brache
HOMEBREW_BUILD_FROM_SOURCE: 1
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_LOGS: /Users/chdiza/Library/Homebrew
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_EMOJI: 1
HOMEBREW_NO_GITHUB_API: 1
HOMEBREW_TEMP: /Users/chdiza/.tmp/tmpdir
HOMEBREW_VERBOSE: 1
CPU: quad-core 64-bit ivybridge
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.1 build 902
Git: 2.16.3 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Java: N/A
macOS: 10.13.3-x86_64
Xcode: 9.3
CLT: 9.3.0.0.1.1521514116
X11: N/A
ilovezfs commented 6 years ago

If you're on 10.13 then it's a different type of bug, since there's no discrepancy between the sdk headers and the libraries.