On Wed, Sep 9, 2020 at 9:31 PM Matthias Köppe <matthiaskoe...@gmail.com>
wrote:

> Very strange, can you run it with ./configure CONFIG_SHELL="bash -x" and
> post the output?
>
I think I know what's going on.
The autoconf macro in question is looping over the entries in the PATH (and
this is documented behaviour)
So the outer loop is

for as_dir in $PATH

now, the PATH is a bit funny in my case:

/usr/local/opt/gettext/bin:/usr/local/opt/gettext/bin:/usr/local/opt/python@3.7
/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin


for each $as_dir it loops over the list of Pythons we provide,

and the first match happens to be Python3.7, not Python3.8.


Indeed, to verify this,
I've added an echo for ac_path_PYTHON3 in the inner loop of ./configure and
see

Checking whether SageMath should install SPKG python3...

checking whether any of sqlite libpng bzip2 xz libffi is installed as or
will be installed as SPKG... no

checking for python3 >= 3.6, < 3.9 with modules sqlite3, ctypes, math,
hashlib, crypt, readline, socket, zlib, distutils.core...

ac_path_PYTHON3= /usr/local/opt/gettext/bin/python3.8

ac_path_PYTHON3= /usr/local/opt/gettext/bin/python3.7

ac_path_PYTHON3= /usr/local/opt/gettext/bin/python3.6

ac_path_PYTHON3= /usr/local/opt/gettext/bin/python3

ac_path_PYTHON3= /usr/local/opt/gettext/bin/python3.8

ac_path_PYTHON3= /usr/local/opt/gettext/bin/python3.7

ac_path_PYTHON3= /usr/local/opt/gettext/bin/python3.6

ac_path_PYTHON3= /usr/local/opt/gettext/bin/python3

ac_path_PYTHON3= /usr/local/opt/python@3.7/bin/python3.8

ac_path_PYTHON3= /usr/local/opt/python@3.7/bin/python3.7

checking ... whether /usr/local/opt/python@3.7/bin/python3.7 is good... yes

checking for python3 >= 3.6, < 3.9 with modules sqlite3, ctypes, math,
hashlib, crypt, readline, socket, zlib, distutils.core...
/usr/local/opt/python@3.7/bin/python3.7
configure: will use system package and not install SPKG python3

Indeed, intuitively, one would think that the outer loop should be over the
programs in the list,

not the entries in the PATH, but, alas, it seems that all the autoconf
macros dealing with finding

executables loop over the PATH entries first.




>
> On Wednesday, September 9, 2020 at 1:17:04 PM UTC-7, Dima Pasechnik wrote:
>>
>>
>>
>> On Wed, Sep 9, 2020 at 9:04 PM Matthias Köppe <matthia...@gmail.com>
>> wrote:
>> >
>> > Are you using a configure cache? Because according to your config.log,
>> it's only checking 1 binary
>> I'm merely running
>>
>> CC=clang CXX=clang++ ./configure --enable-download-from-upstream-url
>>
>> after I reverted
>>
>> --- a/build/pkgs/python3/spkg-configure.m4
>> +++ b/build/pkgs/python3/spkg-configure.m4
>> @@ -12,7 +12,7 @@ SAGE_SPKG_CONFIGURE([python3], [
>>          check_modules="sqlite3, ctypes, math, hashlib, crypt, readline,
>> socket, zlib, distutils.core"
>>          AC_CACHE_CHECK([for python3 >= 3.6, < 3.9 with modules
>> $check_modules], [ac_cv_path_PYTHON3], [
>>              AC_MSG_RESULT([])
>> -            AC_PATH_PROGS_FEATURE_CHECK([PYTHON3], [python3.8 python3.7
>> python3.6 python3], [
>> +            AC_PATH_PROGS_FEATURE_CHECK([PYTHON3], [python3.8],
>>                  AC_MSG_CHECKING([... whether $ac_path_PYTHON3 is good])
>>                  python3_version=`"$ac_path_PYTHON3" --version 2>&1 \
>>                      | $SED -n -e
>> 's/\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\).*/\1/p'`
>>
>> with which it duly picked up python3.8, I re-run ./bootstrap and
>> the above configure command, and then python3.7 gets picked up.
>>
>> Perhaps it's a (mis)feature of AC_CACHE_CHECK?
>> >
>> > On Wednesday, September 9, 2020 at 12:58:26 PM UTC-7, Dima Pasechnik
>> wrote:
>> >>
>> >> On Wed, Sep 9, 2020 at 8:54 PM Matthias Köppe <matthia...@gmail.com>
>> wrote:
>> >> >
>> >> > Is "python3.8" in PATH?
>> >> of course.
>> >>
>> >> dima@oucl13243 sagetrac-mirror % python3
>> >> Python 3.7.8 (default, Jul  8 2020, 14:18:28)
>> >> [Clang 11.0.3 (clang-1103.0.32.62)] on darwin
>> >> Type "help", "copyright", "credits" or "license" for more information.
>> >> >>>
>> >>
>> >> dima@oucl13243 sagetrac-mirror % python3.8
>> >> Python 3.8.5 (default, Jul 21 2020, 10:48:26)
>> >> [Clang 11.0.3 (clang-1103.0.32.62)] on darwin
>> >> Type "help", "copyright", "credits" or "license" for more information.
>> >> >>>
>> >>
>> >> dima@oucl13243 sagetrac-mirror % python3.7
>> >> Python 3.7.8 (default, Jul  8 2020, 14:18:28)
>> >> [Clang 11.0.3 (clang-1103.0.32.62)] on darwin
>> >> Type "help", "copyright", "credits" or "license" for more information.
>> >>
>> >> >>>
>> >>
>> >> >
>> >> > On Wednesday, September 9, 2020 at 12:44:50 PM UTC-7, Dima Pasechnik
>> wrote:
>> >> >>
>> >> >> here it is. The account shell is zsh, but this most probably does
>> not matter.
>> >> >>
>> >> >> On Wed, Sep 9, 2020 at 6:31 PM Matthias Köppe <matthia...@gmail.com>
>> wrote:
>> >> >> >
>> >> >> > On Wednesday, September 9, 2020 at 10:11:14 AM UTC-7, Dima
>> Pasechnik wrote:
>> >> >> >>
>> >> >> >> by the way, I am not able to pick up Homebrew's python3.8 in the
>> presence of python3.7, unless I modify python3's spkg-configure.m4 to
>> exclude python3.7 and python3 from the list of Pythons it checks for.
>> >> >> >>>
>> >> >> >>>
>> >> >> >
>> >> >> > config.log?
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > You received this message because you are subscribed to the
>> Google Groups "sage-release" group.
>> >> >> > To unsubscribe from this group and stop receiving emails from it,
>> send an email to sage-r...@googlegroups.com.
>> >> >> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-release/fead00fa-099a-4119-858f-1168a8481aeao%40googlegroups.com
>> .
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> Groups "sage-release" group.
>> >> > To unsubscribe from this group and stop receiving emails from it,
>> send an email to sage-r...@googlegroups.com.
>> >> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-release/2315e53f-5d2c-4c44-b8bf-1f3940bac109o%40googlegroups.com
>> .
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "sage-release" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to sage-r...@googlegroups.com.
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-release/a5b4735e-a729-4e7d-b421-9c95d320601eo%40googlegroups.com
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-release" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-release+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-release/c2554205-963d-46e9-b3f0-0a3c8a895785o%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-release/c2554205-963d-46e9-b3f0-0a3c8a895785o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-release" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-release+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-release/CAAWYfq0Gp0_bOA7UZ8hJiR0QecUzvzrmXXgzXCmpJMkLWn-edw%40mail.gmail.com.

Reply via email to