-
-
Notifications
You must be signed in to change notification settings - Fork 654
Description
As previously discussed in #30745, /usr/local
is leaking into our build, through wrong orders of include and/or library directives.
In #30745, this problem was not fixed but rather some more packages were found to be usable on homebrew, so distro information was added.
The problem has been reported again with pari
(building cypari2
) in #31029/#30589.
This is caused by a misconfigured python3
. In this ticket, we add code to detect this problem when looking for the system python at configure time.
Checking whether SageMath should install SPKG python3...
checking whether any of libpng bzip2 xz libffi is installed as or will be installed as SPKG... no
checking for python3 >= 3.6.0, < 3.10.0 with modules sqlite3, ctypes, math, hashlib, crypt, readline, socket, zlib, distutils.core...
checking ... whether /usr/local/bin/python3 is good... no, this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see https://github.com/sagemath/sage-prod/issues/31132; to use it anyway, use ./configure --with-python=/usr/local/bin/python3
checking ... whether /usr/bin/python3 is good... yes
checking for python3 >= 3.6.0, < 3.10.0 with modules sqlite3, ctypes, math, hashlib, crypt, readline, socket, zlib, distutils.core... /usr/bin/python3
configure: will use system package and not install SPKG python3
When --with-python=...
is used, only a warning is issued.
See also:
- cython_aliases: Use ecl-config to determine compiler/linker flags for ecl #30770 cython_aliases: Use ecl-config to determine compiler/linker flags for ecl
- Upgrade: Singular 4.2.0, pysingular 0.9.7 #25993 Upgrade Singular
Related homebrew issues and pull requests:
- Python CFLAGS are causing collisions when building native Python modules Homebrew/homebrew-core#68352
- Python: Change Homebrew includes into NODIST flags Homebrew/homebrew-core#68528
- python@3.9 and gdbm finally break on Apple Silicon. Homebrew/homebrew-core#67388
- python@3.9: various improvements Homebrew/homebrew-core#67718
Depends on #30589
Upstream: Reported upstream. No feedback yet.
CC: @orlitzky @jhpalmieri @zlscherr @kiwifb @NathanDunfield @kliem
Component: build
Author: Matthias Koeppe
Branch: 76d5fd1
Reviewer: Zachary Scherr
Issue created by migration from https://trac.sagemath.org/ticket/31132