Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80202
| From | Veek M <vek.m1234@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Python extension using a C library with one 'hello' function |
| Followup-To | comp.lang.python |
| Date | 2014-11-04 22:13 +0630 |
| Organization | Home |
| Message-ID | <m3avng$5kj$1@dont-email.me> (permalink) |
| References | <m3ab5o$kuo$1@dont-email.me> <mailman.15452.1415115002.18130.python-list@python.org> <m3au1u$u36$1@dont-email.me> <mailman.15456.1415118546.18130.python-list@python.org> |
Followups directed to: comp.lang.python
Jason Swails wrote:
> What operating system are you running this on? It works fine for me on
> Linux:
Wheezy Debian, Linux deathstar 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3
x86_64 GNU/Linux
gcc (Debian 4.7.2-5) 4.7.2
Python 3.2.3
I ran it through gdb - not very useful:
(gdb) bt
#0 0x000000000055e1bd in PyModule_Create2 ()
#1 0x000000000043a830 in _PyImport_LoadDynamicModule ()
#2 0x0000000000476d84 in ?? ()
#3 0x00000000004aa3f9 in ?? ()
#4 0x0000000000477010 in ?? ()
#5 0x000000000048ee8d in ?? ()
#6 0x00000000004a833b in PyObject_Call ()
#7 0x00000000004b88c9 in PyEval_EvalFrameEx ()
#8 0x00000000004cdee7 in PyEval_EvalCodeEx ()
strace -f python3.2
munmap(0x7f215d4b9000, 4096) = 0
stat("hello.py", {st_mode=S_IFREG|0644, st_size=22, ...}) = 0
stat("_hello", 0x7fff9bd38110) = -1 ENOENT (No such file or
directory)
stat("_hello.cpython-32mu.so", {st_mode=S_IFREG|0755, st_size=19217, ...}) =
0
open("_hello.cpython-32mu.so", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=19217, ...}) = 0
open("./_hello.cpython-32mu.so", O_RDONLY) = 5
read(5,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\7\0\0\0\0\0\0"..., 832)
= 832
fstat(5, {st_mode=S_IFREG|0755, st_size=19217, ...}) = 0
getcwd("/root/github/junk/hello", 128) = 24
mmap(NULL, 2101544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) =
0x7f215b71c000
mprotect(0x7f215b71d000, 2093056, PROT_NONE) = 0
mmap(0x7f215b91c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 5, 0) = 0x7f215b91c000
close(5) = 0
mprotect(0x7f215b91c000, 4096, PROT_READ) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python extension using a C library with one 'hello' function Veek M <vek.m1234@gmail.com> - 2014-11-04 16:22 +0630
Re: Python extension using a C library with one 'hello' function Chris Angelico <rosuav@gmail.com> - 2014-11-05 01:57 +1100
Re: Python extension using a C library with one 'hello' function Søren <sd@syntonetic.com> - 2014-11-04 13:11 +0100
Re: Python extension using a C library with one 'hello' function Veek M <vek.m1234@gmail.com> - 2014-11-04 21:46 +0630
Re: Python extension using a C library with one 'hello' function Jason Swails <jason.swails@gmail.com> - 2014-11-04 10:30 -0500
Re: Python extension using a C library with one 'hello' function Veek M <vek.m1234@gmail.com> - 2014-11-04 21:45 +0630
Re: Python extension using a C library with one 'hello' function Jason Swails <jason.swails@gmail.com> - 2014-11-04 11:28 -0500
Re: Python extension using a C library with one 'hello' function Veek M <vek.m1234@gmail.com> - 2014-11-04 22:13 +0630
Re: Python extension using a C library with one 'hello' function Veek M <vek.m1234@gmail.com> - 2014-11-04 22:39 +0630
Re: Python extension using a C library with one 'hello' function Jason Swails <jason.swails@gmail.com> - 2014-11-04 12:28 -0500
Re: Python extension using a C library with one 'hello' function Veek M <vek.m1234@gmail.com> - 2014-11-04 23:03 +0630
Re: Python extension using a C library with one 'hello' function Jason Swails <jason.swails@gmail.com> - 2014-11-04 13:28 -0500
csiph-web