FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-30-2008, 08:56 AM
"Douglas Bagnall"
 
Default undefined symbol: __stack_chk_fail_local

I've been working on a package for OLPC that uses pam_sotp, which
Rahul Sundaram packaged for Fedora in order to help OLPC.

http://sundaram.fedorapeople.org/packages/pam_sotp-0.3.3-1.fc9.src.rpm

Unfortunately the installed pam module fails with errors like this:

PAM unable to dlopen(/lib/security/pam_sotp.so):
/lib/security/pam_sotp.so: undefined symbol: __stack_chk_fail_local

This is related to gcc's fairly recently introduced stack smashing
protection; if it is compiled with CFLAGS="-fno-stack-protector", the
module works fine. But that seems wrong.

How are these symbols ending up undefined? Has anyone met this
problem before? Some googling suggested linking with gcc rather than
ld, but I can't work out how to make the rpm do that.

(This is all Fedora 9, gcc-4.3.0-8.i386).


Douglas Bagnall

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-30-2008, 10:45 AM
Andrew Haley
 
Default undefined symbol: __stack_chk_fail_local

Douglas Bagnall wrote:
> I've been working on a package for OLPC that uses pam_sotp, which
> Rahul Sundaram packaged for Fedora in order to help OLPC.
>
> http://sundaram.fedorapeople.org/packages/pam_sotp-0.3.3-1.fc9.src.rpm
>
> Unfortunately the installed pam module fails with errors like this:
>
> PAM unable to dlopen(/lib/security/pam_sotp.so):
> /lib/security/pam_sotp.so: undefined symbol: __stack_chk_fail_local
>
> This is related to gcc's fairly recently introduced stack smashing
> protection; if it is compiled with CFLAGS="-fno-stack-protector", the
> module works fine. But that seems wrong.

That depends on whether the target system has runtime support for it.

> How are these symbols ending up undefined? Has anyone met this
> problem before? Some googling suggested linking with gcc rather than
> ld, but I can't work out how to make the rpm do that.

It seems to do that already.

> (This is all Fedora 9, gcc-4.3.0-8.i386).

This symbol hould be in /lib/libc.so.6. Isn't it?

Andrew.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-30-2008, 11:10 AM
Jakub Jelinek
 
Default undefined symbol: __stack_chk_fail_local

On Thu, Oct 30, 2008 at 10:56:49PM +1300, Douglas Bagnall wrote:
> I've been working on a package for OLPC that uses pam_sotp, which
> Rahul Sundaram packaged for Fedora in order to help OLPC.
>
> http://sundaram.fedorapeople.org/packages/pam_sotp-0.3.3-1.fc9.src.rpm
>
> Unfortunately the installed pam module fails with errors like this:
>
> PAM unable to dlopen(/lib/security/pam_sotp.so):
> /lib/security/pam_sotp.so: undefined symbol: __stack_chk_fail_local
>
> This is related to gcc's fairly recently introduced stack smashing
> protection; if it is compiled with CFLAGS="-fno-stack-protector", the
> module works fine. But that seems wrong.
>
> How are these symbols ending up undefined? Has anyone met this
> problem before? Some googling suggested linking with gcc rather than
> ld, but I can't work out how to make the rpm do that.

Yeah, that's very likely the case. Linking with ld -shared as opposed
to gcc -shared is (almost always) a bug.
Guess you need to modify this package's Makefiles to do the right thing...

Jakub

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-03-2008, 02:47 AM
"Douglas Bagnall"
 
Default undefined symbol: __stack_chk_fail_local

>> http://sundaram.fedorapeople.org/packages/pam_sotp-0.3.3-1.fc9.src.rpm
>>
>> PAM unable to dlopen(/lib/security/pam_sotp.so):
>> /lib/security/pam_sotp.so: undefined symbol: __stack_chk_fail_local
>>
>> Some googling suggested linking with gcc rather than ld, but I
>> can't work out how to make the rpm do that.

Jakub Jelinek wrote:

> Yeah, that's very likely the case. Linking with ld -shared as opposed
> to gcc -shared is (almost always) a bug.
> Guess you need to modify this package's Makefiles to do the right thing...

OK, thanks. I found the right Makefile.in, fixed it, and it works.


and Andrew Haley wrote:

>> (This is all Fedora 9, gcc-4.3.0-8.i386).
>
>This symbol hould be in /lib/libc.so.6. Isn't it?

No. At least not according to strings or nm. It is in
/usr/lib/libc.a though (and __stack_chk_fail is in libc.so.6). That's
with glibc-2.8-8.i686.

thanks to both of you for your help.


Douglas

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 10:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org