[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2021-04-15 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2021-04-14 Thread Takuya N


Change by Takuya N :


--
nosy: +tnir
nosy_count: 7.0 -> 8.0
pull_requests: +24152
pull_request: https://github.com/python/cpython/pull/25420

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2021-02-08 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset e1f77695132e814728cda982f11342a2e3c7272c by Roland Hieber in 
branch 'master':
bpo-13501: allow choosing between readline and libedit (GH-24189)
https://github.com/python/cpython/commit/e1f77695132e814728cda982f11342a2e3c7272c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2020-10-08 Thread Colin Watson


Colin Watson  added the comment:

Here's a reasonably minimal reproduction recipe reduced from real code in the 
Launchpad test suite that doesn't require compiling a separate C extension.  It 
fails on Ubuntu 18.04 with the gir1.2-gtk-3.0, python3-gi, and xvfb packages 
installed.  (The xvfb-run part is just so that it works on a headless system; 
you can omit it if you have a working $DISPLAY.)

  xvfb-run python3 -c 'from gi.repository import Gtk; import readline'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2020-10-08 Thread Colin Watson


Colin Watson  added the comment:

FWIW I just ran into what I believe to be this bug with the Launchpad test 
suite on Python 3.6.9.  The output shows some normal test output followed by:

No entry for terminal type "unknown";
using dumb terminal settings.
bind: Invalid command `enable-meta-key'.
No entry for terminal type "unknown";
using dumb terminal settings.
No entry for terminal type "unknown";
using dumb terminal settings.
Segmentation fault

The test suite imports a lot of stuff, but it includes something which links 
against libLLVM which links against libedit (I haven't worked out exactly what, 
but probably GTK-related).  Then something else much later imports readline - 
again, I haven't worked out what yet, as it's taken me a day just to set up the 
exact right environment in which to reproduce this at all and an strace doesn't 
make the cause of the import especially clear.

So I understand why you see this as a rare use case, but it's *extremely* 
confusing and a massive time sink when you do run across it, as the cause is a 
long way distant from the effect and it can arise in situations where it is in 
no way deliberate to have this sort of setup, but rather an emergent effect of 
several other things.

--
nosy: +cjwatson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks serge-sans-paille for the bug report and the fix!

I backported it to 3.8 since it could be automated, but I don't think that it's 
worth it to backport it to 3.7:
https://github.com/python/cpython/pull/16986#issuecomment-561711232

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread miss-islington


miss-islington  added the comment:


New changeset 68669ef7883ea6338ca441e50f4f9d975f54d017 by Miss Islington (bot) 
in branch '3.8':
bpo-38634: Allow non-apple build to cope with libedit (GH-16986)
https://github.com/python/cpython/commit/68669ef7883ea6338ca441e50f4f9d975f54d017


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Library (Lib)
versions: +Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16945
pull_request: https://github.com/python/cpython/pull/17466

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-12-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7105319ada2e663659020cbe9fdf7ff38f421ab2 by Victor Stinner 
(serge-sans-paille) in branch 'master':
 bpo-38634: Allow non-apple build to cope with libedit (GH-16986)
https://github.com/python/cpython/commit/7105319ada2e663659020cbe9fdf7ff38f421ab2


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-11-04 Thread serge-sans-paille


serge-sans-paille  added the comment:

@ned I(d rather see this as an evolution of Issue13631, as this solves a 
problem when libreadline and libedit are both loaded in the same executable. As 
such, using libedit instead of readline wouldn't solve the issue: what if the 
program Python is embeded in is linked to readline?

I find python approach relatively elegant: detect the linked library at runtime 
and use the ad-hoc implementation based on this.

An other option would be to dlopen readline using the RTLD_LOCAL flag, so that 
we get a better, non intrusive symbol resolution.

What do you think?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread Ned Deily


Ned Deily  added the comment:

This appears to be essentially a duplicate of Issue13631 which has long 
proposed full support of libedit.

--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith, ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread serge-sans-paille


Change by serge-sans-paille :


--
keywords: +patch
pull_requests: +16512
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16986

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread serge-sans-paille


New submission from serge-sans-paille :

See https://bugs.llvm.org/show_bug.cgi?id=43830, but basically the follwing 
code:

```
// a.c
#include 

int main() {
  Py_Initialize();
  PyRun_SimpleString("import readline; print(readline.__doc__)");
  return 0;
}
```

compiled like this:

```
% gcc a.c `./install/bin/python3-config --cflags --ldflags --libs` -lpython3.9
```

runs fine:

```
% ./a.out  
Importing this module enables command line editing using GNU readline.
```

However the following:

```
% gcc a.c `./install/bin/python3-config --cflags --ldflags --libs` -ledit 
-lpython3.9
```

compiles but segfaults at runtime.

--
messages: 355656
nosy: serge-sans-paille
priority: normal
severity: normal
status: open
title: Symbol resolution conflict when embeding python in an application using 
libedit
type: crash

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com