[issue26857] gethostbyname_r() is broken on android

2016-05-22 Thread Stefan Krah

Stefan Krah added the comment:

Thanks! Closing again.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 09af54099973 by Stefan Krah in branch 'default':
Issue #26857: The gethostbyaddr_r() workaround is no longer needed with
https://hg.python.org/cpython/rev/09af54099973

--

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-22 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> I've moved the include into pyport.h

and also fixed the error in my patch, thanks :)

With issue26857.diff, importing the socket module does not fail both with an 
API 21 emulator and an API 23 emulator.

--

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-22 Thread Stefan Krah

Stefan Krah added the comment:

Okay thanks, let's assume api-level >= 21 for now. I've moved the include into 
pyport.h in order to save a little space everywhere. Could you check if that 
works?

--
Added file: http://bugs.python.org/file42944/issue26857.diff

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I was thinking the (somewhat hacky) dlopen() approach so that gethostbyname_r() 
works in API 21 builds. If a universal build is not necessary this patch is OK.

--

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Xavier de Gaye

Xavier de Gaye added the comment:

So what is problematic with this new patch ?  Obviously you need to build with 
API 23 to get gethostbyname_r() since it was not supported by android before, 
with the previous patch you don't get gethostbyname_r(), even when building 
with API 23.

--

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

By the way, socketmodule_2.patch is problematic. Developers may choose to build 
CPython against API level 21 and run it on all devices with API level >= 21. In 
general Android keeps ABI compatibility between consecutive versions. That is, 
most binaries built for API 21 can be run on API 21, 22, 23 and 24. With this 
patch, developers have to build two versions of CPython, one for API < 23 and 
one for API >= 23, or gethostbyname_r() may not be used.

--

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> Can people upgrade their devices or do they have to buy a new one?

AFAIK most models other than Nexus won't get updates with a bumped major 
version. (5.x => 6.x for example)

--

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Stefan Krah

Stefan Krah added the comment:

How about supporting API >= 23 only? Can people upgrade their devices or do 
they have to buy a new one?

--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-05-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

gethostbyaddr_r() is implemented now on Android 6.0 (API 23). The attached 
patch has been tested on the android-21-x86 emulator (API 21) and 
android-23-x86 emulator (API 23). No new NDK has been released at Android 5.1 
(API 22) so there is no need to test the patch for this release.

--
resolution: fixed -> 
status: closed -> open
Added file: http://bugs.python.org/file42809/socketmodule_2.patch

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-04-26 Thread Stefan Krah

Stefan Krah added the comment:

Thanks, fixed.

--
assignee:  -> skrah
nosy: +skrah
resolution:  -> fixed
stage:  -> 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



[issue26857] gethostbyname_r() is broken on android

2016-04-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb19ad1918cd by Stefan Krah in branch 'default':
Issue #26857: Workaround for missing symbol "gethostbyaddr_r" on Android.
https://hg.python.org/cpython/rev/eb19ad1918cd

--
nosy: +python-dev

___
Python tracker 

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



[issue26857] gethostbyname_r() is broken on android

2016-04-26 Thread Xavier de Gaye

New submission from Xavier de Gaye:

HAVE_GETHOSTBYNAME_R is defined on android API 21, but importing the _socket 
module fails with:

ImportError: dlopen failed: cannot locate symbol "gethostbyaddr_r" 
referenced by "_socket.cpython-36m-i386-linux-gnu.so"

Patch attached.
The patch does not take into account the fact that this may be fixed in future 
versions of android.

--
components: Cross-Build
files: socketmodule.patch
keywords: patch
messages: 264280
nosy: Alex.Willmer, xdegaye
priority: normal
severity: normal
status: open
title: gethostbyname_r() is broken on android
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file42609/socketmodule.patch

___
Python tracker 

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