Opened 11 years ago

Closed 10 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

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)

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

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by RRosario

Attachment: Makefile.2 added

comment:1 Changed 11 years ago by RRosario

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

comment:2 Changed 11 years ago by kyngchaos

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.

Changed 11 years ago by kyngchaos

Attachment: Makefile.patch added

comment:3 Changed 10 years ago by neteler

What is the status of this report?

comment:4 in reply to:  3 Changed 10 years ago by glynn

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 Changed 10 years ago by hamish

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.