Why was the Homebrew report "unable to understand kern.osversion` 14.0.0"?

When I run brew -- config , I get

 HOMEBREW_VERSION: 0.9.5 ORIGIN: https://github.com/Homebrew/homebrew HEAD: bc071fb5448628aea8f066bbc0f37b0ecb4f11ee Last commit: 16 hours ago HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar CPU: quad-core 64-bit haswell OS X: 10.10.1-x86_64 Xcode: 6.1.1 CLT: 6.1.1.0.1.1416017670 couldn't understand kern.osversion `14.0.0' GCC-4.2: build 5666 Clang: 6.0 build 600 X11: 2.7.7 => /opt/X11 System Ruby: 2.0.0-p481 Perl: /usr/bin/perl Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/bin/python2.7 Ruby: /usr/bin/ruby 

although my Xcode command line tools (on Yosemite) seem current (so I run xcode-select --install ) and in the right place

 /Applications/Xcode.app/Contents/Developer 

according to xcode-select -print-path , my (only) gcc is

 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.0.0 Thread model: posix 

and the only problems according to brew doctor are

 Unexpected static libraries: /usr/local/lib/libtclstub8.6.a /usr/local/lib/libtkstub8.6.a 

However, I have a couple of suspicious things lying around, especially usr/bin/gcc-4.2 , for which --version gives

 couldn't understand kern.osversion `14.0.0' i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) ... 

and /usr/bin/i686-apple-darwin11-gcc-4.2.1 , for which --version also gives

 couldn't understand kern.osversion `14.0.0' i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) ... 

What brew -- config reports brew -- config report

could not understand kern.osversion `14.0.0 '

mean? Should I do something about this?

+5
source share
1 answer

Did you upgrade OS X on this computer a while ago? I think they are from an old installation. Since gcc not installed by default, updating the OS probably did not remove or replace gcc and other Xcode command-line tools. If you really can safely delete them, I don’t know, but it’s obvious that you can rename them (or move them to a backup subdirectory) so that they are outside your PATH . Thus, homebrew will not find them and does not use the new compiler ( clang ). Most likely, your system (Xcode, brew) will continue as usual, as they will use the clang found on your system.

The error you see was “could not understand kern.osversion '14 .0.0”, probably due to the fact that this gcc was compiled against an older version of the OS X kernel, and the current (Yosemite / 14.0.0) backwards is incompatible with this.

I don’t know exactly what compiler tools are installed, but for just offensive gcc you can do something like:

 mv /usr/bin/gcc-4.2 /usr/bin/gcc-4.2-oldOSX10.9 

(it is assumed that it was installed on 10.9, possibly on an earlier version).

It is a little annoying that updating Xcode (or rather, a completely new version) does not check old versions of command-line tools and removes them (*). Although it is clear that Apple, of course, assumes that you are not using anything outside the usual Xcode tools; they obviously will not support homegrown this way.

(*), perhaps it is, but if you missed version or 2, it may not come back so far as to check old versions.

+3
source

Source: https://habr.com/ru/post/1211612/


All Articles