Traceback when Cythonize and strip the binary #4155
Replies: 2 comments 1 reply
-
First of all, calling Also, this sounds like a Cython question, rather than a setuptools one. You probably have to study their docs instead. |
Beta Was this translation helpful? Give feedback.
-
The answer I got in the Cython group is that: |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a python3 codes and using the setuptools, cythonization is performed with the settings in the setup.py.
A brief process I have is:
python3 setup.py build_ext -j 12 bdist_wheel
wheel unpack <mod> -d <dir>
x86_64-linux-gnu-strip -s <.so>
.-
wheel pack <pk_dir> -d <dir>
while compiling I see the following output:
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.9 -c foobar/foo.c -o build/temp.linux-x86_64-cpython-39/foobar/foo.o -Os -s -DCYTHON_WITHOUT_ASSERTIONS
My first question is, is there a way to remove these default flags that comes from
CCLFAGS
I guess? Because I can only extend the flags in thesetup.py
usingextra_compile_args
argument.Second is:
In the platform, I invoke the compiled code as follows:
python3 <dummy_file_contains_import_for_so_file>
and if a code crashes, I can easily see the line numbers, function names etc.
How is this possible? because if I check the .so file with
nm
tool, it says no symbols. because I have used strip tool.I don't get it how python interpreter gets the all information and shows it.
Beta Was this translation helpful? Give feedback.
All reactions