Closed smammy closed 3 weeks ago
As expected, this turns out to be somewhat more involved than I expected. I'm probably going to give it another shot after I'm done sorting out Haskell.
In any case, I'd love to know from @mistydemeo (or anyone else who knows) what's already been done on a Tiger superenv, what the known issues are, etc,
Sorry for not replying sooner!
The primary issue is just the absence of xcrun
, which is an Xcode-provided tool to run Xcode/CLT-provided copies of tools while ignoring the $PATH
. It was introduced in macOS 10.5. The xcrun shim is one of the core parts of superenv, and it doesn't work if the real xcrun
is missing.
I'm surprised I didn't write up an issue for this before. I'll try to do that soon.
In my work trying to get GHC building on Tiger/PPC (see #693), I've run into build environment pollution resulting in (for example) Tigerbrew's Perl being detected and used in the build. I noticed that there's no superenv for Xcode 2.5 (see https://github.com/mistydemeo/tigerbrew/issues/272#issuecomment-67547229 and https://github.com/mistydemeo/tigerbrew/issues/173#issuecomment-35572380).
On a lark, I did…
…and it seems to Just Work? I've tried building some simple formulæ and they build just the same as with the standard environment. It can't possibly be that simple. What am I missing?
I'm currently building GHC 7.0.4. It's going fine so far, and (among other things) it didn't pick up Tigerbrew's Perl. I guess if that blows up I'll have my answer, but I'm curious to know what's already known. Thanks!
Output of `brew --env` before adding `ENV/2.5`:
``` CC: /usr/local/bin/gcc-4.2 => /usr/local/Cellar/apple-gcc42/4.2.1-5553/bin/gcc-4.2 CXX: /usr/local/bin/g++-4.2 => /usr/local/Cellar/apple-gcc42/4.2.1-5553/bin/g++-4.2 OBJC: /usr/local/bin/gcc-4.2 OBJCXX: /usr/local/bin/g++-4.2 CFLAGS: -Os -w -pipe -mcpu=7450 -faltivec -mmacosx-version-min=10.4 CXXFLAGS: -Os -w -pipe -mcpu=7450 -faltivec -mmacosx-version-min=10.4 LDFLAGS: -L/usr/local/lib -Wl,-headerpad_max_install_names MAKEFLAGS: -j1 MACOSX_DEPLOYMENT_TARGET: 10.4 PKG_CONFIG_LIBDIR: /usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.4:/usr/lib/pkgconfig PATH: /Users/sam/perl5/bin:/usr/local/opt/perl/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/Library/ENV/scm CPATH: /usr/local/include ```Output of `brew --env` after adding `ENV/2.5`:
``` HOMEBREW_CC: gcc-4.2 HOMEBREW_CXX: g++-4.2 MAKEFLAGS: -j1 CMAKE_PREFIX_PATH: /usr/local CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.4 ACLOCAL_PATH: /usr/local/share/aclocal PATH: /usr/local/Library/ENV/2.5:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/apple-gcc42/bin ```