Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#68265 closed defect (fixed)

py311-gnureadline @8.1.2: build failure

Reported by: MaddTheSane (C.W. Betts) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: wyuenho (Jimmy Yuen Ho Wong)
Port: py-gnureadline

Description

Another port that seems to be broken for Sonoma, on Apple Silicon

Log will be added.

Attachments (1)

main.log (94.4 KB) - added by MaddTheSane (C.W. Betts) 14 months ago.
Build log

Download all attachments as: .zip

Change History (11)

Changed 14 months ago by MaddTheSane (C.W. Betts)

Attachment: main.log added

Build log

comment:1 Changed 14 months ago by jmroot (Joshua Root)

Cc: stromnov removed
Keywords: sonoma removed
Owner: set to stromnov
Port: py-gnureadline added; py311-gnureadline removed
Status: newassigned

Looks like https://github.com/python/cpython/issues/109191, which is unexpected because that implies this is building against libedit headers instead of its own GNU readline headers.

comment:2 Changed 14 months ago by reneeotten (Renee Otten)

Cc: wyuenho added

comment:3 Changed 14 months ago by reneeotten (Renee Otten)

has duplicate: 68280

comment:4 Changed 14 months ago by wyuenho (Jimmy Yuen Ho Wong)

Keywords: sonama arm64 added

comment:5 in reply to:  1 Changed 14 months ago by markmentovai (Mark Mentovai)

Replying to jmroot:

Looks like https://github.com/python/cpython/issues/109191, which is unexpected because that implies this is building against libedit headers instead of its own GNU readline headers.

gnureadline’s Modules/3.x/readline.c has this:

#ifdef WITH_EDITLINE
#  include <editline/readline.h>
#else
/* GNU readline definitions */
#  undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
#  include <readline/readline.h>
#  include <readline/history.h>
#endif

The problem is that earlier in the same file, there’s

#include "Python.h"

"Python.h" is resolved as ${prefix}/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h; it #includes "pyconfig.h" from the same directory, and that file contains:

/* Define to build the readline module against Editline. */
#define WITH_EDITLINE 1

This, of course, refers to Python’s own built-in readline module, and should not be effective during the build of py-gnureadline, which is expecting and has configured itself to use its own embedded copy of GNU readline.

As a fix, I think we can just remove (or replace with #if 0) that WITH_EDITLINE branch.

comment:7 Changed 14 months ago by jmroot (Joshua Root)

Keywords: sonama arm64 removed

comment:8 Changed 14 months ago by Mark Mentovai <mark@…>

Resolution: fixed
Status: assignedclosed

In c338199ad1fcf0328a7fce5572d856388930aee3/macports-ports (master):

py-gnureadline: Fix build when Python's readline module uses editline

Fixes: #68265

comment:9 Changed 14 months ago by jmroot (Joshua Root)

I guess this should be upstreamed as well, though they may want a fix that won't be wiped out when they import the latest readline module code from cpython core.

comment:10 Changed 14 months ago by markmentovai (Mark Mentovai)

Yes, I am attempting to upstream it at https://github.com/ludwigschwardt/python-gnureadline/pull/64.

Note: See TracTickets for help on using tickets.