Opened 16 years ago
Closed 15 years ago
#411 closed defect (fixed)
Makefile uses LD instead of GCC for linking leads to undefined symbol: __stack_chk_fail_local
Reported by: | RRosario | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 6.4.0 |
Component: | Python ctypes | Version: | svn-develbranch6 |
Keywords: | undefined symbol __stack_chk_fail_local | Cc: | |
CPU: | x86-32 | Platform: | Linux |
Description
The Makefile for Python SWIG uses LD for linking rather than GCC. On some Linux systems, this causes Python to throw the error:
$ python -c "import _python_grass6" Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: ./_python_grass6.so: undefined symbol: stack_chk_fail_local
when the library python_grass6 is imported due to a stack smash guard.
I have confirmed that replacing LD with CC fixes this problem. On some distributions of Linux, this can be fixed by adding "-fno-stack-protector" to CFLAGS.
R.
Attachments (2)
Change History (7)
by , 16 years ago
Attachment: | Makefile.2 added |
---|
comment:1 by , 16 years ago
Component: | default → SWIG (all bindings) |
---|---|
Platform: | Unspecified → Linux |
Version: | unspecified → svn-develbranch6 |
comment:2 by , 16 years ago
by , 16 years ago
Attachment: | Makefile.patch added |
---|
comment:4 by , 15 years ago
Replying to neteler:
What is the status of this report?
swig/python/Makefile has changed beyond recognition since this was originally filed. Linking now uses $(CXX)
.
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
apparently it is non-trivial to add a new "obsolete" resolved status, so just calling this fixed.
This isn't right on OSX either. We've spent some effort to get the wxpython nviz and vdigit to compile correctly on different platforms, so maybe that method should be used here also (patch attached).
There is still cleanup needed to completely conform to the GRASS make system, but it should compile correctly now.