On May 21, 2014, at 02:39, Thorsten Glaser wrote: > Ryan Schmidt dixit: > >> I also wanted to report a bug I found. When building, it says: >> >> Hi from $MirOS: src/bin/mksh/Build.sh,v 1.655 2014/01/05 21:57:21 tg Exp $ >> on: >> $ hwprefs machine_type os_type os_class >&2 >> | ./Build.sh: line 211: hwprefs: command not found >> >> It seems you're deliberately targeting Darwin OS (i.e. OS X) and in > > Actually, I was just trying to shove some information about the > environment the shell was built in into the log, in case I get > asked questions by packagers. I’ve gathered information from a > friend who is a Macintosh user, and from what I could try out > when he gave me ssh access to his laptop and his iPhone. > >> that case running the hwprefs command, but no such command exists. If >> you want to get info about an OS X system, system_profiler, sw_vers or >> sysctl would be good commands to use. For example: > > Will add these (I’ll keep hwprefs for people building on older > systems though). Thanks a lot.
Oh, I see now, yes, hwprefs does exist on older Mac OS X systems. But a survey of my systems says it only existed on Intel Macs running Mac OS X 10.4, 10.5, and 10.6 -- not later Intel systems, and not earlier PowerPC systems -- so it's not terribly portable. >> If there's other information you want to gather, let me know what >> information you want it to print and I'll see what I can do. > > Basically anything you can imagine either upstream or a porter > or packager could want to know about the operating environment > when debugging a build “post-mortem”, from the build log. Now that I've seen the output of "hwprefs machine_type os_type os_class" on an older machine, I see that it's the same information that you can get from "sysctl hw.model" and "sw_vers" on any OS X version or CPU, so I'd use that instead. I don't know a command to give you the marketing name of the OS, which is what "hwprefs os_class" gave, but knowing the exact OS version number is more useful, and you can look up the marketing name from that if you really need to. The OS version is important, as is knowing what compiler was used, which you can get with "$CC -v". (Depending on the version of OS X and Xcode, Macs may be compiling with various versions of Apple's version of gcc, llvm-gcc, or clang.) You can also get the Xcode version information with "xcodebuild -version". (The compiler comes with Xcode, but the user could update (or forget to update) the compiler when they update Xcode; they could also forget to update Xcode after upgrading OS X, and be trying (and failing) to use a version of Xcode or the compiler not designed to work on their version of OS X.) Knowing whether the processor is Intel or PowerPC, or 32-bit or 64-bit, might be useful too, since over the years Macs have used all four combinations. (The model implies that, but unless you're familiar with the history of Mac models it'll be easier to just print this directly.) You might also care to know what version of sh is being used, since your build script depends on it. Here's a command that might be useful: sw_vers; sysctl kern.version hw.machine hw.model hw.memsize \ hw.availcpu hw.cpufrequency hw.byteorder hw.cpu64bit_capable; \ cc -v; xcodebuild -version; /bin/sh --version Here's an example of what it produces on a MacBook Pro running Mavericks: ProductName: Mac OS X ProductVersion: 10.9.3 BuildVersion: 13D65 kern.version: Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 hw.machine: x86_64 hw.model: MacBookPro10,1 hw.memsize: 17179869184 hw.availcpu = 8 hw.cpufrequency: 2600000000 hw.byteorder: 1234 hw.cpu64bit_capable: 1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.2.0 Thread model: posix Xcode 5.1.1 Build version 5B1008 GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13) Copyright (C) 2007 Free Software Foundation, Inc. And what it produces on a PowerBook G4 running Tiger: ProductName: Mac OS X ProductVersion: 10.4.11 BuildVersion: 8S165 kern.version = Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC hw.machine: Power Macintosh hw.model: PowerBook5,6 hw.memsize: 536870912 hw.availcpu = 1 hw.cpufrequency: 1666666660 hw.byteorder: 4321 second level name cpu64bit_capable in hw.cpu64bit_capable is invalid Using built-in specs. Target: powerpc-apple-darwin8 Configured with: /var/tmp/gcc/gcc-5370~2/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8 Thread model: posix gcc version 4.0.1 (Apple Computer, Inc. build 5370) Component versions: DevToolsCore-798.0; DevToolsSupport-794.0 GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0) Copyright (C) 2002 Free Software Foundation, Inc. (hw.cpu64bit_capable became available in Mac OS X 10.5) > ah, that reminds me, thanks for the stellar entertainment that you and certain > other people provide on the Debian mailing lists │ sole reason I subscribed to > them (I'm not using Debian anywhere) is the entertainment factor │ Debian does > not strike me as a place for good humour, much less German admin-style humour Must be a different person! I'm not on any Debian lists.
