This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [bulk] - Re: Missing stack_chk type functions


DEWI - N. Zacharias schrieb:

Moin Reini,



Von: Reini Urban [mailto:rurban@x-ray.at]
Gesendet: Mittwoch, 19. Mai 2010 20:14
An: cygwin@cygwin.com
Betreff: [bulk] - Re: Missing stack_chk type functions

DEWI - N. Zacharias schrieb:

Hi all, I tried to install the Win32::GuiTest from cpan. It did not work because

g++ -shared GuiTest.o DibSect.o -o
blib/arch/auto/Win32/GuiTest/GuiTest.dll \
/usr/lib/perl5/5.10/i686-cygwin/CORE/cygperl5_10.dll -L/usr/lib/w32api
-lgdi32 \

GuiTest.o:GuiTest.cpp:(.text+0x91f0): undefined reference to
`___stack_chk_guard'
GuiTest.o:GuiTest.cpp:(.text+0x96c1): undefined reference to
`___stack_chk_fail'
[...]

I found Re: glibc-2.4 __stack_chk_guard/__pointer_chk_guard from 2006
which is pretty old and refers to using distcc
So I don't know whats the problem today.

You need to install gcc4 and set it as default with set-gcc-default-4.sh

That was not the solution (gcc4 was already installed ) and running set-gcc-default-4.sh makes no difference

Sorry, yes you are right. -lssp is missing.
It should have been included automatically from the spces, however it didn't.


g++ -shared GuiTest.o DibSect.o -o blib/arch/auto/Win32/GuiTest/GuiTest.dll /usr/lib/perl5/5.10/i686-cygwin/CORE/cygperl5_10.dll -L/usr/lib/w32api -lgdi32 -lssp
works.


Also
#ifdef __cplusplus
extern "C" {
#endif
is commented out in GuiTest.xs
--
Reini Urban
http://phpwiki.org/  http://murbreak.at/
diff -bu ./GuiTest.xs~ ./GuiTest.xs
--- ./GuiTest.xs~	2008-10-01 13:32:59.000000000 +0200
+++ ./GuiTest.xs	2010-05-22 02:39:35.579625000 +0200
@@ -24,13 +24,13 @@
 
 
 #ifdef __cplusplus
-//extern "C" {
+extern "C" {
 #endif
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
 #ifdef __cplusplus
-//}
+}
 #endif
 
 #define MAX_DATA_BUF 1024
diff -bu ./Makefile.PL~ ./Makefile.PL
--- ./Makefile.PL~	2008-10-01 13:32:59.000000000 +0200
+++ ./Makefile.PL	2010-05-22 02:45:13.548375000 +0200
@@ -29,7 +29,7 @@
 	(( $^O =~ /cygwin/i) ? (
 			LD		=> 'g++',
 			LDDLFLAGS	=> '-shared',
-			LIBS		=> ['-L/usr/lib/w32api -lgdi32'],
+			LIBS		=> ['-L/usr/lib/w32api -lgdi32 -lssp'],
 	) : ()),
 	ABSTRACT_FROM			=> 'lib/Win32/GuiTest.pm',
 	AUTHOR				=> 'Dennis K. Paulsen (ctrondlp@cpan.org), Ernesto Guisado (erngui@acm.org)',

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]