-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS X Mojave without /usr/include: a range of issues #26899
Comments
comment:2
On this machine, Sage 8.5.beta4 builds. I am now testing. So it's probably not the same issue as #26713 which was opened before 8.5.rc0 was released. Or it's not necessarily the same issue. In particular, I believe that the problem on this machine can be traced directly to #26286. I believe that on this machine, I once ran
as advised at #26713, and then I believe a subsequent Xcode upgrade removed |
comment:3
Confirmed: 8.5.beta6 builds but 8.5.rc0 does not. It's the zlib problem. Is there a way to configure Python to detect zlib in the proper location? |
comment:4
The easiest fix is to delete the file |
comment:5
Replying to @jhpalmieri:
Proper, i.e. only known to Xcode? I don't know. It's not really a zlib problem, it's an Apple bug, if you ask me. They really, really want you to do everything via Xcode. |
comment:6
Replying to @jhpalmieri:
will build zlib from scratch and install it in SAGE_LOCAL, as always. |
comment:7
Once again, on the machine with this problem, do you have I guess it might be that you need to run that If this does not help then we need to find out whether it's that you actually have non-functioning zlib installation before you start building python, or it's a python issue |
comment:8
Once again, no I do not have I can't tell whether it's something out of sync with this machine, as you suggest, or whether it could routinely happen to other people. If we think it could affect other machines, which is the more conservative point of view, then we should roll back the zlib part of #26286 to fix it. Assuming it's just my machine is riskier and could mean that others will not be able to build Sage. |
comment:9
Rather than blindly rolling back, we'd like to know the cause of the problem, no? |
comment:10
I don't think we are going to be able to do anything in the short run, for now you just have to install |
comment:11
From the main
I'm rebuilding now (I deleted the old build to test whether removing |
comment:12
Volker: a short term fix that doesn't hurt anything is just to remove |
comment:13
Attachment: python2-2.7.15.p0.log Here is the Python log. I don't see anything helpful in there. By the way, why is Python built twice? Is this a recent thing? |
comment:14
Thanks. In the log there not even an attempt to build Python's zlib extension, probably meaning that a pre-build check is failing (such as something that checks for headers somewhere...) By the way, could you check whether zlib extension is built for the Python3? Another question is where that zlib.h is found by spkg-configure.m4 |
comment:15
In Python2/3 configure.ac, one sees that OSX is treated in a special way:
One may wonder whether it could pick up wrong old zlib from /usr/local, say, and then fail on testing it being recent enough). By right, Python should have a configure option to tell it where zlib is, and do not fool around the system looking for one... |
comment:16
Python should be built only once. Our logging concatenates output from different builds. |
comment:17
IMHO the
and lots of our packages are not going to look into /sw for zlib... |
comment:18
Replying to @dimpase:
Same for Python 3. As you note in your later comment,
Perhaps the relevant ones are
In any case, there is nothing relevant in |
comment:19
Replying to @vbraun:
I did actually know that second part, which is what led me to ask the question in the first place. If I run
The "real[TAB][time]" string is typically only printed when the installation is complete. Oh, I see, it's running |
comment:20
Replying to @vbraun:
The requirements are needed to make libpg happy, the version we use needs these checks to pass.
Homebrew and freebsd have most things in /usr/local. What is needed for conda?
|
comment:21
My current theory is that our macro to recognise/test zlib resorts to calling C complier/linker without extra flags, and everything works, whereas Python's one does something less clever, and fails. That is we can patch Python's configure.ac and get everything working. |
comment:22
Or we can make build/pkgs/zlib/spkg-configure.m4 less clever. The cost for building zlib unnecessary is a few seconds walltime, and the cost for not building zlib when required is total failure. PS: Conda is not installed at any fixed path, users can place it whereever they want in their home directory. |
comment:23
Replying to @vbraun:
Assuming that mixing system's zlib and Sage's zlib is not a good idea, note that that means not using system's zlib forces building of a lot of other Sage libs... |
comment:24
Since its a common dependency its even more important that we err on the safe side IMHO either
Trying to poke around in the filesystem in sage configure is just going to be endless hurt as every third-party configure is going to do work a little bit different. In particular, if you want homebrew integration then make a homebrew package that uses 2. to configure the correct paths. |
comment:25
Replying to @vbraun:
it's only (hopefully) standard on Linux...
we already see a lot of interference from system, and from quasi-distributions' such as Anaconda, libraries on lots of platforms, so instead of fighting this, it's better to let people use Sage on these platforms in a sane way.
This is a lot of work for a relatively small crowd, and I don't see why automating it should not be considered. |
comment:26
Replying to @dimpase:
Its pretty much on every unix-like OS, including OSX. The only thing that OSX lacks here is a sane way to distribute software that is not an self-contained opaque application bundle.
And the sane way is to let the users explicitly pick their dependencies, not rummage around and see if we can randomly find something that isn't part of the OS/distribution. It should just be a matter of
Surely there are many more homebrew developers than sage developers. Its also going to be much easier to maintain a homebrew package when there is a simple way to configure the sage dependencies, than to fix all possible Sage build pitfalls with whatever broken bits and pieces we may find in the filesystem. |
comment:78
PS: the osx buildbot worker had his /usr/include wiped in the last osx update |
comment:79
I'm seting up a remote paid-for (from the grant, hopefully) Mac mini with 10.14, hopefully I'd sort these issues out. |
comment:80
Replying to @dimpase:
Using |
comment:81
Replying to @jhpalmieri:
yes, this works (checking on a very bare MacOS 10.14, with nothing except Command Line Tools for Xcode 10.2 installed), thanks: --- a/build/pkgs/gcc/build-gcc
+++ b/build/pkgs/gcc/build-gcc
@@ -25,6 +25,7 @@ if [ "$UNAME" = "Darwin" ]; then
# files prior to comparison during bootstrap (broken by Xcode 6.3).
# See #18156
GCC_CONFIGURE="--with-build-config=bootstrap-debug $GCC_CONFIGURE"
+ GCC_CONFIGURE="--with-sysroot=`xcrun --show-sdk-path` $GCC_CONFIGURE"
fi
# Let Gfortran build on Raspberry Pi using hard floats. I suppose it should be done conditionally, only if there is no |
comment:82
I've added that to the branch, now gfortran builds... |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:84
Passes so I'd suggest we merge this to get the OSX buildbot up and running again. Feel free to reintroduce the zlib configure in a later ticket, then we'll be able to test it against a buildbot without the extra headers installed. |
comment:85
If you are really in rush we can add a condition disabling spkg-configure.m4 for zlib in the case there is no /usr/include present. I hopefully soon will have a Python fix ready that would make this not necessary. |
Reviewer: Dima Pasechnik |
comment:86
Instead of removing spkg-configure.m4, apply --- a/build/pkgs/zlib/spkg-configure.m4
+++ b/build/pkgs/zlib/spkg-configure.m4
@@ -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])
]) this disables the usage of |
Changed reviewer from Dima Pasechnik to Dima Pasechnik, Volker Braun |
Author: Dima Pasechnik, Volker Braun |
Changed branch from u/vbraun/os_x_mojave_without__usr_include__python_builds_without_zlib_support to |
Changed commit from |
comment:91
Replying to @dimpase:
Patching Python 3 to do this is easy, |
comment:92
IMO this is kinda weak, albeit harmless for the time being (though the line added to |
On OS X Mojave, it is possible to have Xcode installed but to have no directory
/usr/include
.The configure check from more system package checks #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)Upstream: Reported upstream. No feedback yet.
CC: @embray
Component: packages: standard
Author: Dima Pasechnik, Volker Braun
Branch:
db50d09
Reviewer: Dima Pasechnik, Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/26899
The text was updated successfully, but these errors were encountered: