Bonjour,

A weird thing happens during the ./configure of sage 9.4.beta0 on the 
computer of a colleague of mine running MacOS BigSur 11.4. It says the 
system python3 is good, but it seems it should not as `import readline` is 
broken.

More precisely, after git cloning 9.4.beta0,  we did make configure. Then 
./configure. Then we brew install the list of suggested packages including 
freetype, fplll, python3, readline, etc. We got problem with not allowed 
permissions for few of the packages including freetype.

In particular, a problem occurs with readline:

$ brew install readline
Warning: readline 8.1 is already installed, it's just not linked.
To link this version, run:
  brew link readline
$ brew link readline
Warning: Refusing to link macOS provided/shadowed software: readline
For compilers to find readline you may need to set:
  export LDFLAGS="-L/usr/local/opt/readline/lib"
  export CPPFLAGS="-I/usr/local/opt/readline/include"
For pkg-config to find readline you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"


Then, running ./configure again says that python3 is ok while having some 
problem with it:

----------------------------------------------------------------
Checking whether SageMath should install SPKG python3...
checking whether any of bzip2 xz libffi is installed as or will be 
installed as SPKG... no
checking for python3 >= 3.7.0, < 3.10.0 with modules sqlite3, ctypes, math, 
hashlib, crypt, readline, socket, zlib, distutils.core... 
checking ... whether /usr/local/bin/python3 is good... Traceback (most 
recent call last):
  File "<string>", line 1, in <module>
ImportError: 
dlopen(/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/readline.cpython-39-darwin.so,
 
2): Library not loaded: /usr/local/opt/readline/lib/libreadline.8.dylib
  Referenced from: 
/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/readline.cpython-39-darwin.so
  Reason: image not found
no, the version is in the supported range but cannot import one of the 
required modules: sqlite3, ctypes, math, hashlib, crypt, readline, socket, 
zlib, distutils.core
checking ... whether /usr/bin/python3 is good... yes
checking for python3 >= 3.7.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
checking whether /usr/bin/python3 is configured to build multiarch 
extensions... no
checking whether "-march=native" works with the C/C++ compilers configured 
for building extensions for /usr/bin/python3... yes
--------------------------------------------------------------------------------

Indeed the python3 provided by the system does not allow to import readline:

$ python3
Python 3.9.5 (default, May  4 2021, 03:36:27) 
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3, ctypes, math, hashlib, crypt, readline, socket, zlib, 
distutils.core
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: 
dlopen(/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/readline.cpython-39-darwin.so,
 
2): Library not loaded: /usr/local/opt/readline/lib/libreadline.8.dylib
  Referenced from: 
/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/readline.cpython-39-darwin.so
  Reason: image not found

Then, we ran make and we are still waiting for the end of that (still 
compiling gfortran).

Is it okay that ./configure picks up python3 from the system provided 
import readline is broken?

Thank you,

Sébastien



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/89bfdb5c-3de5-495f-bf73-3e3337aad5b0n%40googlegroups.com.

Reply via email to