X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.4 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_NONE,TW_LG X-Spam-Check-By: sourceware.org Message-ID: <4BF72967.30103@x-ray.at> Date: Sat, 22 May 2010 02:46:31 +0200 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.4 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [bulk] - Re: Missing stack_chk type functions References: <8CCC8F85C5F2784387A32FAD835FB4E602DD771946 AT server03> <4BF42A5A DOT 8060805 AT x-ray DOT at> <8CCC8F85C5F2784387A32FAD835FB4E602DD771948 AT server03> In-Reply-To: <8CCC8F85C5F2784387A32FAD835FB4E602DD771948@server03> Content-Type: multipart/mixed; boundary="------------030303050402010406000705" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------030303050402010406000705 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit DEWI - N. Zacharias schrieb: > > Moin Reini, > > >> Von: Reini Urban [mailto:rurban AT x-ray DOT at] >> Gesendet: Mittwoch, 19. Mai 2010 20:14 >> An: cygwin AT cygwin DOT 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/ --------------030303050402010406000705 Content-Type: text/x-patch; name="cygwin-1.56.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cygwin-1.56.patch" 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 AT cpan DOT org), Ernesto Guisado (erngui AT acm DOT org)', --------------030303050402010406000705 Content-Type: text/plain; charset=us-ascii -- 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 --------------030303050402010406000705--