Comments (21)
On Mon, 1 Jun 2015, Brian Sutherland wrote:
Running this script with the pypy from pypy.org and icu installed from macports:
#!/bin/bash set -e curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.0.1.tar.gz tar xvfz virtualenv-13.0.1.tar.gz cd virtualenv-13.0.1 ~/py/pypy/bin/pypy virtualenv.py myVE cd myVE export PYICU_INCLUDES=/opt/local/include export PYICU_LFLAGS=-L/opt/local/lib ./bin/pip install PyICU ./bin/pypy -c 'import icu'
results in this:
./test.sh: line 14: 73312 Segmentation fault: 11 ./bin/pypy -c 'import icu'
Would be happy to provide any more info that might help resolve the issue.
What version of pypy and ICU are you using ?
Andi..
Reply to this email directly or view it on GitHub:
#5
from pyicu.
On Mon, Jun 01, 2015 at 09:51:39AM -0700, ovalhub wrote:
On Mon, 1 Jun 2015, Brian Sutherland wrote:
Running this script with the pypy from pypy.org and icu installed from macports:
#!/bin/bash set -e curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.0.1.tar.gz tar xvfz virtualenv-13.0.1.tar.gz cd virtualenv-13.0.1 ~/py/pypy/bin/pypy virtualenv.py myVE cd myVE export PYICU_INCLUDES=/opt/local/include export PYICU_LFLAGS=-L/opt/local/lib ./bin/pip install PyICU ./bin/pypy -c 'import icu'
results in this:
./test.sh: line 14: 73312 Segmentation fault: 11 ./bin/pypy -c 'import icu'
Would be happy to provide any more info that might help resolve the issue.
What version of pypy and ICU are you using ?
These:
% /opt/local/bin/icu-config --version
54.1
% ~/py/pypy/bin/pypy -v
Python 2.7.9 (9c4588d731b7, Mar 23 2015, 16:20:40)
[PyPy 2.5.1 with GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>>
Andi..
Reply to this email directly or view it on GitHub:
#5
Reply to this email directly or view it on GitHub:
#5 (comment)
Brian Sutherland
from pyicu.
it also fails for ICU 55.1 and PyPy 2.6.0
from pyicu.
On Jun 2, 2015, at 04:46, Brian Sutherland [email protected] wrote:
it also fails for ICU 55.1 and PyPy 2.6.0
Would you have a stacktrace ?
Andi..
—
Reply to this email directly or view it on GitHub.
from pyicu.
On Tue, Jun 02, 2015 at 08:01:52AM -0700, ovalhub wrote:
On Jun 2, 2015, at 04:46, Brian Sutherland [email protected] wrote:
it also fails for ICU 55.1 and PyPy 2.6.0
Would you have a stacktrace ?
Something like this?
% lldb ./bin/pypy -- -c 'import icu'
(lldb) target create "./bin/pypy"
Current executable set to './bin/pypy' (x86_64).
(lldb) settings set -- target.run-args "-c" "import icu"
(lldb) run
Process 32409 launched: './bin/pypy' (x86_64)
Process 32409 stopped
- thread #1: tid = 0x2a85ed, 0x00007fff8774178a libc++abi.dylib
__cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::__dynamic_cast_info*, void*, int) const, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10) frame #0: 0x00007fff8774178a libc++abi.dylib
__cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::dynamic_cast_info, void, int) const
libc++abi.dylib`__cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::dynamic_cast_info, void, int) const:
-> 0x7fff8774178a: cmpq 0x10(%rsi), %rdi
0x7fff8774178e: je 0x7fff8774179d ; __cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::dynamic_cast_info, void, int) const + 19
0x7fff87741790: movq 0x10(%rdi), %rdi
0x7fff87741794: movq (%rdi), %rax
(lldb)
Andi..
—
Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHub:
#5 (comment)
Brian Sutherland
from pyicu.
On Jun 2, 2015, at 09:38, Brian Sutherland [email protected] wrote:
On Tue, Jun 02, 2015 at 08:01:52AM -0700, ovalhub wrote:
On Jun 2, 2015, at 04:46, Brian Sutherland [email protected] wrote:
it also fails for ICU 55.1 and PyPy 2.6.0
Would you have a stacktrace ?
Something like this?
Well, with debug symbols showing where in pypy, pyicu or icu the crash happens. I have no time right now to debug or reproduce this myself. I tested the latest pyicu release with pypy 2.2.1 iirc (check CHANGES file). Another thing you can try is that version of pypy and building icu from sources (not macports).
Andi..
% lldb ./bin/pypy -- -c 'import icu'
(lldb) target create "./bin/pypy"
Current executable set to './bin/pypy' (x86_64).
(lldb) settings set -- target.run-args "-c" "import icu"
(lldb) run
Process 32409 launched: './bin/pypy' (x86_64)
Process 32409 stopped
- thread #1: tid = 0x2a85ed, 0x00007fff8774178a libc++abi.dylib
__cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::__dynamic_cast_info*, void*, int) const, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10) frame #0: 0x00007fff8774178a libc++abi.dylib
__cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::dynamic_cast_info, void, int) const
libc++abi.dylib`__cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::dynamic_cast_info, void, int) const:
-> 0x7fff8774178a: cmpq 0x10(%rsi), %rdi
0x7fff8774178e: je 0x7fff8774179d ; __cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::dynamic_cast_info, void, int) const + 19
0x7fff87741790: movq 0x10(%rdi), %rdi
0x7fff87741794: movq (%rdi), %rax
(lldb)Andi..
—
Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHub:
#5 (comment)Brian Sutherland
—
Reply to this email directly or view it on GitHub.
from pyicu.
Hitting it with a hammer a bit more I got this from the crash reporter. It seems this is the best I can do without building/getting a pypy including debug symbols. There doesn't seem to be any easy way of doing that and I've spent far more time already than I should on this issue. Hope this is enough.
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010
VM Regions Near 0x10:
-->
__TEXT 0000000100000000-0000000100001000 [ 4K] r-x/rwx SM=COW /Users/USER/*
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libc++abi.dylib 0x00007fff8774178a __cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::__dynamic_cast_info*, void*, int) const + 0
1 libstdc++.6.dylib 0x000000010642394b __dynamic_cast + 104
2 _icu.pypy-26.so 0x0000000103d246e3 wrap_TimeZone(icu_55::TimeZone*) + 83 (calendar.cpp:230)
3 _icu.pypy-26.so 0x0000000103d96bf9 t_tzinfo__resetDefault(_typeobject*) + 25 (tzinfo.cpp:428)
4 _icu.pypy-26.so 0x0000000103d96a99 _init_tzinfo(_object*) + 473 (tzinfo.cpp:717)
5 _icu.pypy-26.so 0x0000000103d16c47 PyInit_icu(_object*) + 631 (_icu.cpp:285)
6 _icu.pypy-26.so 0x0000000103d169be init_icu + 62 (_icu.cpp:333)
7 libpypy-c.dylib 0x00000001006c2b30 0x100003000 + 7076656
8 libpypy-c.dylib 0x00000001006bf880 0x100003000 + 7063680
9 libpypy-c.dylib 0x00000001006bf475 0x100003000 + 7062645
10 libpypy-c.dylib 0x0000000100761444 0x100003000 + 7726148
11 libpypy-c.dylib 0x000000010076c754 0x100003000 + 7771988
12 libpypy-c.dylib 0x000000010076ae58 0x100003000 + 7765592
13 libpypy-c.dylib 0x0000000100768ada 0x100003000 + 7756506
14 libpypy-c.dylib 0x00000001007688e5 0x100003000 + 7756005
15 libpypy-c.dylib 0x0000000100395036 0x100003000 + 3743798
16 libpypy-c.dylib 0x000000010035ae1c 0x100003000 + 3505692
17 libpypy-c.dylib 0x00000001003c771d 0x100003000 + 3950365
18 libpypy-c.dylib 0x00000001003bd244 0x100003000 + 3908164
19 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
20 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
21 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
22 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
23 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
24 libpypy-c.dylib 0x0000000100764dbf 0x100003000 + 7740863
25 libpypy-c.dylib 0x000000010076160e 0x100003000 + 7726606
26 libpypy-c.dylib 0x000000010076c754 0x100003000 + 7771988
27 libpypy-c.dylib 0x000000010076ae58 0x100003000 + 7765592
28 libpypy-c.dylib 0x0000000100768ada 0x100003000 + 7756506
29 libpypy-c.dylib 0x00000001007688e5 0x100003000 + 7756005
30 libpypy-c.dylib 0x0000000100395036 0x100003000 + 3743798
31 libpypy-c.dylib 0x000000010035ae1c 0x100003000 + 3505692
32 libpypy-c.dylib 0x00000001003c771d 0x100003000 + 3950365
33 libpypy-c.dylib 0x00000001003bd244 0x100003000 + 3908164
34 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
35 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
36 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
37 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
38 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
39 libpypy-c.dylib 0x0000000100764dbf 0x100003000 + 7740863
40 libpypy-c.dylib 0x000000010076160e 0x100003000 + 7726606
41 libpypy-c.dylib 0x000000010076c754 0x100003000 + 7771988
42 libpypy-c.dylib 0x000000010076ae58 0x100003000 + 7765592
43 libpypy-c.dylib 0x0000000100768ada 0x100003000 + 7756506
44 libpypy-c.dylib 0x00000001007688e5 0x100003000 + 7756005
45 libpypy-c.dylib 0x0000000100395036 0x100003000 + 3743798
46 libpypy-c.dylib 0x000000010035ae1c 0x100003000 + 3505692
47 libpypy-c.dylib 0x00000001003c771d 0x100003000 + 3950365
48 libpypy-c.dylib 0x00000001003bd244 0x100003000 + 3908164
49 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
50 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
51 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
52 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
53 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
54 libpypy-c.dylib 0x00000001003c67e4 0x100003000 + 3946468
55 libpypy-c.dylib 0x00000001003bcc24 0x100003000 + 3906596
56 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
57 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
58 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
59 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
60 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
61 libpypy-c.dylib 0x00000001003c589e 0x100003000 + 3942558
62 libpypy-c.dylib 0x00000001003bd6ef 0x100003000 + 3909359
63 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
64 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
65 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
66 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
67 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
68 libpypy-c.dylib 0x00000001003c50f6 0x100003000 + 3940598
69 libpypy-c.dylib 0x00000001003bd46a 0x100003000 + 3908714
70 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
71 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
72 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
73 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
74 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
75 libpypy-c.dylib 0x00000001003c589e 0x100003000 + 3942558
76 libpypy-c.dylib 0x00000001003bd678 0x100003000 + 3909240
77 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
78 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
79 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
80 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
81 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
82 libpypy-c.dylib 0x0000000100359b95 0x100003000 + 3500949
83 libpypy-c.dylib 0x0000000100296d26 0x100003000 + 2702630
84 libpypy-c.dylib 0x00000001011323c3 0x100003000 + 18019267
85 pypy 0x0000000100000f14 start + 52
from pyicu.
note, that was generated with the current github master of PyICU
from pyicu.
On Jun 3, 2015, at 03:12, Brian Sutherland [email protected] wrote:
Hitting it with a hammer a bit more I got this from the crash reporter. It seems this is the best I can do without building/getting a pypy including debug symbols. There doesn't seem to be any easy way of doing that and I've spent far more time already than I should on this issue. Hope this is enough.
Ah ha, this is a lot better already. It seems to be crashing while instantiating the default timezone.
One more thing to try: edit tzinfo.cpp and comment out the call to resetDefault() in _init_tzinfo(), rebuild PyICU and see if you get past that. If so, you've most likely found a real PyICU bug and not just hit a strange build problem.
Thanks !
Andi..
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010VM Regions Near 0x10:
-->
__TEXT 0000000100000000-0000000100001000 [ 4K] r-x/rwx SM=COW /Users/USER/*Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libc++abi.dylib 0x00007fff8774178a __cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::dynamic_cast_info, void, int) const + 0
1 libstdc++.6.dylib 0x000000010642394b __dynamic_cast + 104
2 icu.pypy-26.so 0x0000000103d246e3 wrap_TimeZone(icu_55::TimeZone) + 83 (calendar.cpp:230)
3 _icu.pypy-26.so 0x0000000103d96bf9 t_tzinfo__resetDefault(typeobject) + 25 (tzinfo.cpp:428)
4 _icu.pypy-26.so 0x0000000103d96a99 _init_tzinfo(object) + 473 (tzinfo.cpp:717)
5 _icu.pypy-26.so 0x0000000103d16c47 PyInit_icu(object) + 631 (_icu.cpp:285)
6 _icu.pypy-26.so 0x0000000103d169be init_icu + 62 (_icu.cpp:333)
7 libpypy-c.dylib 0x00000001006c2b30 0x100003000 + 7076656
8 libpypy-c.dylib 0x00000001006bf880 0x100003000 + 7063680
9 libpypy-c.dylib 0x00000001006bf475 0x100003000 + 7062645
10 libpypy-c.dylib 0x0000000100761444 0x100003000 + 7726148
11 libpypy-c.dylib 0x000000010076c754 0x100003000 + 7771988
12 libpypy-c.dylib 0x000000010076ae58 0x100003000 + 7765592
13 libpypy-c.dylib 0x0000000100768ada 0x100003000 + 7756506
14 libpypy-c.dylib 0x00000001007688e5 0x100003000 + 7756005
15 libpypy-c.dylib 0x0000000100395036 0x100003000 + 3743798
16 libpypy-c.dylib 0x000000010035ae1c 0x100003000 + 3505692
17 libpypy-c.dylib 0x00000001003c771d 0x100003000 + 3950365
18 libpypy-c.dylib 0x00000001003bd244 0x100003000 + 3908164
19 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
20 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
21 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
22 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
23 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
24 libpypy-c.dylib 0x0000000100764dbf 0x100003000 + 7740863
25 libpypy-c.dylib 0x000000010076160e 0x100003000 + 7726606
26 libpypy-c.dylib 0x000000010076c754 0x100003000 + 7771988
27 libpypy-c.dylib 0x000000010076ae58 0x100003000 + 7765592
28 libpypy-c.dylib 0x0000000100768ada 0x100003000 + 7756506
29 libpypy-c.dylib 0x00000001007688e5 0x100003000 + 7756005
30 libpypy-c.dylib 0x0000000100395036 0x100003000 + 3743798
31 libpypy-c.dylib 0x000000010035ae1c 0x100003000 + 3505692
32 libpypy-c.dylib 0x00000001003c771d 0x100003000 + 3950365
33 libpypy-c.dylib 0x00000001003bd244 0x100003000 + 3908164
34 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
35 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
36 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
37 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
38 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
39 libpypy-c.dylib 0x0000000100764dbf 0x100003000 + 7740863
40 libpypy-c.dylib 0x000000010076160e 0x100003000 + 7726606
41 libpypy-c.dylib 0x000000010076c754 0x100003000 + 7771988
42 libpypy-c.dylib 0x000000010076ae58 0x100003000 + 7765592
43 libpypy-c.dylib 0x0000000100768ada 0x100003000 + 7756506
44 libpypy-c.dylib 0x00000001007688e5 0x100003000 + 7756005
45 libpypy-c.dylib 0x0000000100395036 0x100003000 + 3743798
46 libpypy-c.dylib 0x000000010035ae1c 0x100003000 + 3505692
47 libpypy-c.dylib 0x00000001003c771d 0x100003000 + 3950365
48 libpypy-c.dylib 0x00000001003bd244 0x100003000 + 3908164
49 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
50 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
51 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
52 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
53 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
54 libpypy-c.dylib 0x00000001003c67e4 0x100003000 + 3946468
55 libpypy-c.dylib 0x00000001003bcc24 0x100003000 + 3906596
56 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
57 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
58 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
59 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
60 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
61 libpypy-c.dylib 0x00000001003c589e 0x100003000 + 3942558
62 libpypy-c.dylib 0x00000001003bd6ef 0x100003000 + 3909359
63 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
64 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
65 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
66 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
67 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
68 libpypy-c.dylib 0x00000001003c50f6 0x100003000 + 3940598
69 libpypy-c.dylib 0x00000001003bd46a 0x100003000 + 3908714
70 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
71 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
72 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
73 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
74 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
75 libpypy-c.dylib 0x00000001003c589e 0x100003000 + 3942558
76 libpypy-c.dylib 0x00000001003bd678 0x100003000 + 3909240
77 libpypy-c.dylib 0x00000001003bb51b 0x100003000 + 3900699
78 libpypy-c.dylib 0x000000010090e12c 0x100003000 + 9482540
79 libpypy-c.dylib 0x0000000100dd7587 0x100003000 + 14501255
80 libpypy-c.dylib 0x00000001003aed99 0x100003000 + 3849625
81 libpypy-c.dylib 0x00000001003ae489 0x100003000 + 3847305
82 libpypy-c.dylib 0x0000000100359b95 0x100003000 + 3500949
83 libpypy-c.dylib 0x0000000100296d26 0x100003000 + 2702630
84 libpypy-c.dylib 0x00000001011323c3 0x100003000 + 18019267
85 pypy 0x0000000100000f14 start + 52
—
Reply to this email directly or view it on GitHub.
from pyicu.
Goal!!!!
With this patch:
diff --git a/tzinfo.cpp b/tzinfo.cpp
index 54f9485..f2b0412 100644
--- a/tzinfo.cpp
+++ b/tzinfo.cpp
@@ -714,7 +714,7 @@ void _init_tzinfo(PyObject *m)
Py_INCREF(FLOATING_TZNAME);
PyModule_AddObject(m, "FLOATING_TZNAME", FLOATING_TZNAME);
- t_tzinfo__resetDefault(&TZInfoType_);
+ //t_tzinfo__resetDefault(&TZInfoType_);
PyObject *args = PyTuple_New(0);
PyObject *floating =
I can now successfully import icu, though I still get a segfault when trying:
>>>> collator = icu.Collator.createInstance(icu.Locale('en_GB'))
from pyicu.
On Jun 3, 2015, at 08:25, Brian Sutherland [email protected] wrote:
Goal!!!!
With this patch:
diff --git a/tzinfo.cpp b/tzinfo.cpp
index 54f9485..f2b0412 100644
--- a/tzinfo.cpp
+++ b/tzinfo.cpp
@@ -714,7 +714,7 @@ void _init_tzinfo(PyObject *m)
Py_INCREF(FLOATING_TZNAME);
PyModule_AddObject(m, "FLOATING_TZNAME", FLOATING_TZNAME);
t_tzinfo__resetDefault(&TZInfoType_);
//t_tzinfo__resetDefault(&TZInfoType_); PyObject *args = PyTuple_New(0); PyObject *floating =
I can now successfully import icu, though I still get a segfault when trying:
collator = icu.Collator.createInstance(icu.Locale('en_GB'))
So it looks like instantiating icu wrapper objects is busted. Next thing I'd try is using the same version of pypy I tested with (2.2.1 ? see CHANGES, I logged it there). Maybe there is an issue with newer pypy versions I didn't try.
Andi..
—
Reply to this email directly or view it on GitHub.
from pyicu.
I tested a few versions. Only PyPy 2.5.0 and above fail. So I guess PyPy broke compatibility in some way (or became more strict). Maybe time to ask PyPy the developers about this?
USING ICU: 55.1
-------------PyPy 2.2.1---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.3.1---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.4.0---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.5.0---------------
IMPORT TEST: failed
COLLATOR TEST: failed
-------------PyPy 2.5.1---------------
IMPORT TEST: failed
COLLATOR TEST: failed
-------------PyPy 2.6.0---------------
IMPORT TEST: failed
COLLATOR TEST: failed
from pyicu.
On Jun 4, 2015, at 03:04, Brian Sutherland [email protected] wrote:
I tested a few versions. Only PyPy 2.5.0 and above fail. So I guess PyPy broke compatibility in some way (or became more strict). Maybe time to ask PyPy the developers about this?
I need to do a full debug build with pypy 2.6.0 and get
to the bottom of this. Thank you for confirming it's indeed related to a newer version of pypy.
Andi..
USING ICU: 55.1
-------------PyPy 2.2.1---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.3.1---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.4.0---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.5.0---------------
IMPORT TEST: failed
COLLATOR TEST: failed
-------------PyPy 2.5.1---------------
IMPORT TEST: failed
COLLATOR TEST: failed
-------------PyPy 2.6.0---------------
IMPORT TEST: failed
COLLATOR TEST: failed
—
Reply to this email directly or view it on GitHub.
from pyicu.
On Thu, Jun 04, 2015 at 07:57:18AM -0700, ovalhub wrote:
On Jun 4, 2015, at 03:04, Brian Sutherland [email protected] wrote:
I tested a few versions. Only PyPy 2.5.0 and above fail. So I guess PyPy broke compatibility in some way (or became more strict). Maybe time to ask PyPy the developers about this?
I need to do a full debug build with pypy 2.6.0 and get
to the bottom of this.
Sounds great, I'll leave it with you then.
Thank you for confirming it's indeed related to a newer version of pypy.
No worries, and thanks for PyICU!
Andi..
USING ICU: 55.1
-------------PyPy 2.2.1---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.3.1---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.4.0---------------
IMPORT TEST: passed
COLLATOR TEST: passed
-------------PyPy 2.5.0---------------
IMPORT TEST: failed
COLLATOR TEST: failed
-------------PyPy 2.5.1---------------
IMPORT TEST: failed
COLLATOR TEST: failed
-------------PyPy 2.6.0---------------
IMPORT TEST: failed
COLLATOR TEST: failed
—
Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHub:
#5 (comment)
Brian Sutherland
from pyicu.
I've just tested with PyPy 4.0.1 and this seems to be working now. So closing this issue.
from pyicu.
FWIW, since google landed me here I thought I'd log my similar problem. I get this same error using a miniconda3-4.1.11 build via pyenv. Immediate segfault when importing icu. icu version 55.1, wrappers pyicu-1.9.5, OS X 10.12.3
python
>>> import icu
Segmentation fault: 11 (core dumped)
Switching to pyenv on vanilla python 3.5.2 works fine. Stack trace from the core dump looks very similar:
(flex-watch) ip-79-49-101-10:flex-watch pds$ lldb -c /cores/core.57846
(lldb) target create --core "/cores/core.57846"
warning: (x86_64) /cores/core.57846 load command 120 LC_SEGMENT_64 has a fileoff + filesize (0x2c6eb000) that extends beyond the end of the file (0x2c6ea000), the segment will be truncated to match
warning: (x86_64) /cores/core.57846 load command 121 LC_SEGMENT_64 has a fileoff (0x2c6eb000) that extends beyond the end of the file (0x2c6ea000), ignoring this section
Core file '/cores/core.57846' (x86_64) was loaded.
(lldb) bt
* thread #1, stop reason = signal SIGSTOP
* frame #0: 0x00007fffa8d72528 libc++abi.dylib`__cxxabiv1::__si_class_type_info::has_unambiguous_public_base(__cxxabiv1::__dynamic_cast_info*, void*, int) const
frame #1: 0x000000010680a253 libstdc++.6.dylib`__dynamic_cast + 124
frame #2: 0x0000000104ab0647 _icu.cpython-36m-darwin.so`wrap_TimeZone(icu_57::TimeZone*) + 39
frame #3: 0x0000000104af95e8 _icu.cpython-36m-darwin.so`t_tzinfo__resetDefault(_typeobject*) + 24
frame #4: 0x0000000104af9554 _icu.cpython-36m-darwin.so`_init_tzinfo(_object*) + 292
frame #5: 0x0000000104aa8cff _icu.cpython-36m-darwin.so`PyInit__icu + 383
frame #6: 0x00000001045831f0 libpython3.6m.dylib`_PyImport_LoadDynamicModuleWithSpec + 480
frame #7: 0x0000000104582d61 libpython3.6m.dylib`_imp_create_dynamic + 257
frame #8: 0x00000001044e2242 libpython3.6m.dylib`PyCFunction_Call + 258
frame #9: 0x0000000104560de5 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 28453
frame #10: 0x0000000104564c4f libpython3.6m.dylib`_PyEval_EvalCodeWithName + 2447
frame #11: 0x0000000104565501 libpython3.6m.dylib`fast_function + 545
frame #12: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #13: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #14: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #15: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #16: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #17: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #18: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #19: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #20: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #21: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #22: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #23: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #24: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #25: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #26: 0x000000010456567c libpython3.6m.dylib`_PyFunction_FastCallDict + 348
frame #27: 0x0000000104499c37 libpython3.6m.dylib`_PyObject_FastCallDict + 247
frame #28: 0x000000010449ac48 libpython3.6m.dylib`_PyObject_CallMethodIdObjArgs + 520
frame #29: 0x0000000104581ed8 libpython3.6m.dylib`PyImport_ImportModuleLevelObject + 1576
frame #30: 0x000000010455f313 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 21587
frame #31: 0x0000000104564c4f libpython3.6m.dylib`_PyEval_EvalCodeWithName + 2447
frame #32: 0x0000000104559e04 libpython3.6m.dylib`PyEval_EvalCode + 100
frame #33: 0x0000000104557584 libpython3.6m.dylib`builtin_exec + 548
frame #34: 0x00000001044e2242 libpython3.6m.dylib`PyCFunction_Call + 258
frame #35: 0x0000000104560de5 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 28453
frame #36: 0x0000000104564c4f libpython3.6m.dylib`_PyEval_EvalCodeWithName + 2447
frame #37: 0x0000000104565501 libpython3.6m.dylib`fast_function + 545
frame #38: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #39: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #40: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #41: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #42: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #43: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #44: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #45: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #46: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #47: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #48: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #49: 0x000000010456567c libpython3.6m.dylib`_PyFunction_FastCallDict + 348
frame #50: 0x0000000104499c37 libpython3.6m.dylib`_PyObject_FastCallDict + 247
frame #51: 0x000000010449ac48 libpython3.6m.dylib`_PyObject_CallMethodIdObjArgs + 520
frame #52: 0x0000000104581ed8 libpython3.6m.dylib`PyImport_ImportModuleLevelObject + 1576
frame #53: 0x000000010455f313 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 21587
frame #54: 0x0000000104564c4f libpython3.6m.dylib`_PyEval_EvalCodeWithName + 2447
frame #55: 0x0000000104559e04 libpython3.6m.dylib`PyEval_EvalCode + 100
frame #56: 0x0000000104557584 libpython3.6m.dylib`builtin_exec + 548
frame #57: 0x00000001044e2242 libpython3.6m.dylib`PyCFunction_Call + 258
frame #58: 0x0000000104560de5 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 28453
frame #59: 0x0000000104564c4f libpython3.6m.dylib`_PyEval_EvalCodeWithName + 2447
frame #60: 0x0000000104565501 libpython3.6m.dylib`fast_function + 545
frame #61: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #62: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #63: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #64: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #65: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #66: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #67: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #68: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #69: 0x000000010456545d libpython3.6m.dylib`fast_function + 381
frame #70: 0x00000001045641c1 libpython3.6m.dylib`call_function + 401
frame #71: 0x0000000104560992 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 27346
frame #72: 0x000000010456567c libpython3.6m.dylib`_PyFunction_FastCallDict + 348
frame #73: 0x0000000104499c37 libpython3.6m.dylib`_PyObject_FastCallDict + 247
frame #74: 0x000000010449ac48 libpython3.6m.dylib`_PyObject_CallMethodIdObjArgs + 520
frame #75: 0x0000000104581ed8 libpython3.6m.dylib`PyImport_ImportModuleLevelObject + 1576
frame #76: 0x000000010455f313 libpython3.6m.dylib`_PyEval_EvalFrameDefault + 21587
frame #77: 0x0000000104564c4f libpython3.6m.dylib`_PyEval_EvalCodeWithName + 2447
frame #78: 0x0000000104559e04 libpython3.6m.dylib`PyEval_EvalCode + 100
frame #79: 0x000000010458fab1 libpython3.6m.dylib`PyRun_FileExFlags + 209
frame #80: 0x000000010458f263 libpython3.6m.dylib`PyRun_SimpleFileExFlags + 851
frame #81: 0x00000001045a80d9 libpython3.6m.dylib`Py_Main + 3529
frame #82: 0x0000000104489df8 python`main + 232
frame #83: 0x00007fffaa15f255 libdyld.dylib`start + 1
(lldb)
from pyicu.
from pyicu.
Miniconda is a cutdown anaconda distrib of python.
pyenv lets you manage python environments, like virtualenv. It knows about a bunch of standard python distribs that you can build virtualenvs with.
So I guess the miniconda python build exhibits some similar bad behavior to what the pypy version had in this ticket? Anyway, I just figured I'd leave some cookie crumbs here in case anyone else runs into it.
from pyicu.
from pyicu.
For the record, I tracked this down with otool
to an outdated version of libstdc++ lurking on my path. (despite what otool claimed, it was in /usr/local/lib not /opt/local/lib/libgcc) blowing that away fixes the problem. Not sure why building it with a different version of python also fixed it, maybe some difference in link strategy.
/Users/pds/miniconda3/envs/icu/lib/python3.6/site-packages/_icu.cpython-36m-darwin.so:
@rpath/libicui18n.58.dylib (compatibility version 58.0.0, current version 58.1.0)
@rpath/libicuuc.58.dylib (compatibility version 58.0.0, current version 58.1.0)
@rpath/libicudata.58.dylib (compatibility version 58.0.0, current version 58.1.0)
/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.21.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
A correct libstdcc line looks like:
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
from pyicu.
from pyicu.
Related Issues (20)
- Suggestion: Release wheels of PyICU HOT 3
- testLocaleMatcher not skipped on old ICU when run via pytest HOT 2
- Missing binding for `getPropertyValueName` and `getPropertyValueNameEnum` HOT 2
- Installation on macOS 10.15.1 with Homebrew icu4c HOT 6
- Build fails on Amazon Linux 2 with PyICU 2.4.2 and ICU 50.1.2 HOT 18
- Can I Build on MacOS Using the Included ICU Library? HOT 1
- Error when installing on windows 10x64 HOT 1
- Import error with ICU 67 HOT 2
- How to use DictionaryBasedBreakIterator from PyICU? HOT 4
- Sharing your SWIG interface HOT 2
- Use of deprecated APIs. HOT 2
- `'icu.BreakIterator' object has no attribute 'getRuleStatus'` when using locale like `en@ss=standard` HOT 2
- [Feature Request] Add bidi algorithm HOT 10
- Building PyICU 2.5 for ICU 67 fails on Windows HOT 12
- Where is this fukn docks?
- How install pyicu to ubuntu 20.04? HOT 1
- pip install PyICU fails since today HOT 13
- ::id rule specifies an unknown transliterator when creating Transliterator. HOT 3
- Fails to build with icu68 HOT 2
- PyICU build fails since commit 7f6462 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyicu.