Opened 15 years ago

Closed 14 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: grass-dev@…
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


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: ./ 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.


Attachments (2)

Makefile.2 (1.3 KB ) - added by RRosario 15 years ago.
Makefile.patch (1.3 KB ) - added by kyngchaos 15 years ago.

Download all attachments as: .zip

Change History (7)

by RRosario, 15 years ago

Attachment: Makefile.2 added

comment:1 by RRosario, 15 years ago

Component: defaultSWIG (all bindings)
Platform: UnspecifiedLinux
Version: unspecifiedsvn-develbranch6

comment:2 by kyngchaos, 15 years ago

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.

by kyngchaos, 15 years ago

Attachment: Makefile.patch added

comment:3 by neteler, 14 years ago

What is the status of this report?

in reply to:  3 comment:4 by glynn, 14 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 hamish, 14 years ago

Resolution: fixed
Status: newclosed

apparently it is non-trivial to add a new "obsolete" resolved status, so just calling this fixed.

Note: See TracTickets for help on using tickets.