Opened 6 years ago

Closed 6 years ago

#56538 closed defect (fixed)

gnucash @3.1: Python support enabled, but Python interpreter not found

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gnucash

Description

gnucash has a dependency on python36, but apparently doesn't tell the build system how to find it, because configuration fails on systems that have not used port select to select a python 3 (such as the buildbot workers):

https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/27173/steps/install-port/logs/stdio

-- Could NOT find PythonInterp: Found unsuitable version "2.7.10", but required is at least "3" (found /usr/bin/python)
CMake Error at CMakeLists.txt:465 (MESSAGE):
  Python support enabled, but Python interpreter not found.


-- Could NOT find PythonLibs: Found unsuitable version "2.7.10", but required is at least "3" (found /usr/lib/libpython2.7.dylib)
CMake Error at CMakeLists.txt:474 (MESSAGE):
  Python support enabled, but Python libraries not found.

Change History (4)

comment:1 Changed 6 years ago by tcwan (TC Wan)

This can be worked around when building gnucash @3.1 by doing the following:

  1. sudo port select python python36
  2. cd /opt/local/lib; sudo ln -s /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib .
  3. Possibly need do the same for libpython3.6m.dylib (I did it in any case)
  4. cd /opt/local/lib; sudo ln -s /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ .
  5. (This is the weird part) cd /opt/local/lib; sudo mv python-2.7 old-python-2.7
  6. build gnucash @3.1
  7. (Restore python-2.7 path) cd /opt/local/lib; sudo mv old-python-2.7 python-2.7
  8. sudo port select python [your default python]

From the problem, I guess the gnucash configure script is not searching for the correct Python interpreter at the correct locations. In addition, Python 3.x Portfile should probably configure links to /opt/local/lib for the dylib and access to the 3.x site-packages directories.

comment:2 Changed 6 years ago by horasio (Samuel Hornus)

Just a motivational message to the maintainer: I'm interested in seeing this bug fixed, and I'll buy you a beer if we ever meet. :-)

comment:3 Changed 6 years ago by LenoreHorner

I only had to do step one on a new installation on a new computer.

comment:4 Changed 6 years ago by ken-cunningham-webuse

Resolution: fixed
Status: assignedclosed

In e8f5850fc6d025b142cb23bd2acb47c794e3a22f/macports-ports (master):

gnucash: force use of python 3.6

python 3.6 was previously listed as a build dep,
but was not actually used in many cases. This
commit forces the use of python 3.6 during the build.

closes: #56538
PS: @horasio: I'll share that beer with drkp :>

Note: See TracTickets for help on using tickets.