weixin_39785165
2020-12-09 14:12 阅读 0

Multiple Python-related ./configure errors when installing w/ Cygwin

Installed latest version of gcc chain/automake/autoconf/etc from Cygwin. Ran libWally's ./tools/autogen.sh without issue. Running ./configure, it reports error "This version of the AC_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. " This was with Python 3.8.5 installed. I tried Python 2.7.1 and got same error.

So I set the PYTHON_NOVERSIONCHECK flag and reran configure. Now appears the error:
"this package requires Python >= '2.7.0'. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure."

Config.log file attached.
config.log

Edit: reran configure with following options, got same error: ./configure PYTHON_NOVERSIONCHECK='1' PYTHON='/cygdrive/c/Python2.7.1/python.exe' PYTHON_VERSION='2.7.1'

该提问来源于开源项目:ElementsProject/libwally-core

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

11条回答 默认 最新

  • weixin_39664746 weixin_39664746 2020-12-09 14:12

    Hi , from config.log, configure seems so have found your python exe at /cygdrive/c/Users/MyUserName/AppData/Local/Programs/Python/Python38/python. Can you run the following and attach here the output/result?

    `
    /cygdrive/c/Users/MyUserName/AppData/Local/Programs/Python/Python38/python -c "import sys; ver = sys.version.split ()[0]; print (ver >= '2.1.0')"
    

    `

    点赞 评论 复制链接分享
  • weixin_39785165 weixin_39785165 2020-12-09 14:12

    Thanks for the assist. Output from that line is the word: "True".

    Trying to force the issue, I also reran with the following:

    ./configure --enable-swig-python PYTHON_NOVERSIONCHECK='1' PYTHON='/cygdrive/c/cygwin64/bin/python2.7.exe' PYTHON_VERSION='2.7'

    This got me past the version check issue -- and seems to build a valid make file -- but it does generate the error below, which I am unsure will cause me any difficulties or not:

    Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LIBS environment variable.

    点赞 评论 复制链接分享
  • weixin_39664746 weixin_39664746 2020-12-09 14:12

    Something is amiss with the python install it seems; it would be best to debug that first I suspect. Your found python version should pass the versioning check, so lets debug that initially.

    Is there a python exe in your path? if if you run "python" from the command line before configuring, does it launch the interpreter? If so, what is its full path and version?

    Can you run "./configure --enable-swig-python" with no PYTHON overrides and post the config.log?

    点赞 评论 复制链接分享
  • weixin_39785165 weixin_39785165 2020-12-09 14:12

    I am running from within a Cygwin terminal window (though running from a command prompt gives the same result). In either case, with my default Python installation, running "python --version" prints 3.8.5. The path to this version is:

    /cygdrive/c/Users/MyUserName/AppData/Local/Programs/Python/Python38

    The config log from the run with no Python overrides is attached.

    config.log

    点赞 评论 复制链接分享
  • weixin_39664746 weixin_39664746 2020-12-09 14:12

    OK so the problem is here in your log:

    `
    configure:15943: checking for python
    configure:15961: found /cygdrive/c/Users/MyUserName/AppData/Local/Programs/Python/Python38/python
    configure:15973: result: /cygdrive/c/Users/MyUserName/AppData/Local/Programs/Python/Python38/python
    configure:15989: checking for a version of Python >= '2.1.0'
    configure:15996: result: no
    

    `

    This check shouldnt fail so we need to find out why. in the file tools/build-aux/m4/ax_python_devel.m4 are the lines:

    `
            ac_supports_python_ver=`$PYTHON -c "import sys; \
                    ver = sys.version.split ()[[0]]; \
                    print (ver >= '2.1.0')"`
            if test "$ac_supports_python_ver" != "True"; then
    

    `

    if you change this to the following does it get further?

    `
            ac_supports_python_ver=`$PYTHON -c "print('True')"`
            if test "$ac_supports_python_ver" != "True"; then
    

    `

    (I'm trying to determine here if its the shell quoting of the program fragment to run that fails, or the execution of python from configure).

    点赞 评论 复制链接分享
  • weixin_39785165 weixin_39785165 2020-12-09 14:12

    Made change, reran autogen and configure, stopped at same place. Config log attached. (BTW, my competency with the gnu tool chain is not what it should be, so I appreciate you bearing with me. If you believe this is an error with my setup only, rather than the package itself, feel free to tell me and I will delete the issue).

    config.log

    点赞 评论 复制链接分享
  • weixin_39664746 weixin_39664746 2020-12-09 14:12

    OK so the problem seems to be that configure can't execute python at all, which is either a problem with your setup or a limitation of configure on cygwin.

    Here are the things I suggest you try:

    • Download a non-cygwin python from https://www.python.org/downloads/windows/, remove /cygdrive/c/Users/MyUserName/AppData/Local/Programs/Python/Python38/ from your PATH and try again.

    • If that still fails, see the scripts in tools/msvc to see how we build our windows release files (should work with the free VS community edition from https://visualstudio.microsoft.com/downloads/).

    • Alternately, if you are just looking to use wally from python under windows, you should be able ot pip install the wheel file from the latest release at https://github.com/ElementsProject/libwally-core/releases/download/release_0.7.9/wallycore-0.7.9-cp36-cp36m-win_amd64.whl

    Please let me know which if any of these resolves your issue, otherwise I will try to reproduce on a windows box but that will take a (potentially long) time.

    点赞 评论 复制链接分享
  • weixin_39785165 weixin_39785165 2020-12-09 14:12

    The 3.8.5 python version is straight from python.org ... it's odd that configure won't run it, as python executes fine from both the command prompt and Cygwin terminal. In any case, I will close this issue and attempt to build with MSVC instead. Thanks for all the help.

    点赞 评论 复制链接分享
  • weixin_39664746 weixin_39664746 2020-12-09 14:12

    Thanks , I'll re-open once I geta chance to try building with cygwin myself if I encounter issues.

    点赞 评论 复制链接分享
  • weixin_39654848 weixin_39654848 2020-12-09 14:12

    Any news/update on this issue? We do not use cygwin but MSYS. Just downloaded master branch and built it from source with no issues at all.

    image

    点赞 评论 复制链接分享
  • weixin_39664746 weixin_39664746 2020-12-09 14:12

    Hi this hasn't been further tested yet, no - but if the library is building for you then you aren't affected, unless you are planning to move to cygwin.

    点赞 评论 复制链接分享

相关推荐