Skip to content

Commit

Permalink
Trac #26899: OS X Mojave without /usr/include: a range of issues
Browse files Browse the repository at this point in the history
On OS X Mojave, it is possible to have Xcode installed but to have no
directory `/usr/include`.

* The configure check from #26286 finds zlib somewhere, but the Python
build does not: Python reports that it has built without zlib support.
Without zlib, pip will not build.

* gcc/gfortran needs the location of headers to be explicitly passed via
`--with-native-system-header-dir=` option. (untested)

URL: https://trac.sagemath.org/26899
Reported by: jhpalmieri
Ticket author(s): Dima Pasechnik, Volker Braun
Reviewer(s): Dima Pasechnik, Volker Braun
  • Loading branch information
Release Manager authored and vbraun committed Mar 30, 2019
2 parents e43613e + db50d09 commit da17267
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/pkgs/gcc/build-gcc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ GCC_CONFIGURE="$@ $GCC_CONFIGURE"

# On OSX:
if [ "$UNAME" = "Darwin" ]; then
# /usr/include is the latest victim in Apple's quest to get rid of standard locations
SDK_PATH=$(xcrun --show-sdk-path)
GCC_CONFIGURE="--with-sysroot=$SDK_PATH $GCC_CONFIGURE"
echo "Building with XCode SDK at $SDK_PATH."

# isl/cloog libraries are almost certainly from Homebrew and won't work
GCC_CONFIGURE="--without-isl --without-cloog $GCC_CONFIGURE"

Expand Down
1 change: 1 addition & 0 deletions build/pkgs/zlib/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ SAGE_SPKG_CONFIGURE([zlib], [
AX_CHECK_ZLIB([], [zlib_cv_libz=no])
])
AS_IF([test "x$zlib_cv_libz" != "xyes"], [sage_spkg_install_zlib=yes])
AC_CHECK_FILE([/usr/include/],[],[sage_spkg_install_zlib=yes])
])

0 comments on commit da17267

Please sign in to comment.