David <raging.bl...@gmail.com> added the comment:
Another small update: After I recompiled Python with the commented out statement, I did a small test if loading a shared library works. I compiled the following test function to testib.so: #include <stdio.h> void test_func(void); void test_func(void) { printf("hello world\n"); } After that I used ctypes to load this library and execute the test_func(): (gdb) file python2.7 Reading symbols from python2.7...done. (gdb) run -c "import ctypes; lib_test = ctypes.cdll.LoadLibrary('/tmp/testlib.so'); lib_test.test_func();" Starting program: /usr/bin/python2.7 -c "import ctypes; lib_test = ctypes.cdll.LoadLibrary('/tmp/testlib.so'); lib_test.test_func();" warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. hello world Program received signal SIGSEGV, Segmentation fault. PyCFuncPtr_call (self=<optimized out>, inargs=<optimized out>, kwds=<optimized out>) at /home/user/ARM_Linux/src/Python-2.7.15/Modules/_ctypes/_ctypes.c:4108 4108 /home/user/ARM_Linux/src/Python-2.7.15/Modules/_ctypes/_ctypes.c: No such file or directory. (gdb) It prints the expected output, but again I get a segmentation fault, this time in PyCFuncPtr_call function. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35350> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com