Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jun 2010 16:26:06 +0530
From:      ashish@FreeBSD.org (Ashish SHUKLA)
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        perl@FreeBSD.org, freebsd-ports@FreeBSD.org
Subject:   Re: lang/perl5.10 doesn't build with gcc 4.5.1
Message-ID:  <86631ekm61.fsf@chateau.d.if>
In-Reply-To: <4C1C5275.9000907@FreeBSD.org> (Doug Barton's message of "Fri, 18 Jun 2010 22:15:33 -0700")
References:  <4C1C5275.9000907@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Transfer-Encoding: quoted-printable

Doug Barton writes:
> I've been experimenting with the idea of using gcc 4.5.1 as my "ports
> compiler" and ran into this problem:

> CCCMD =3D  /usr/local/bin/gcc45 -DPERL_CORE -c=20
> -DAPPLLIB_EXP=3D"/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK
> -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe
> -fstack-protector -I/usr/local/include  -std=3Dc89 -pipe -g
> -march=3Dnative -g -Wall -ansi -W -Wextra -Wdeclaration-after-statement
> -Wendif-labels -Wc++-compat
> LD_LIBRARY_PATH=3D/usr/local/tmp/usr/local/ports/lang/perl5.10/work/perl-=
5.10.1
> /usr/local/bin/gcc45 -pthread -Wl,-E  -fstack-protector
> -L/usr/local/lib -o miniperl    gv.o toke.o perly.o pad.o regcomp.o
> dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o
> scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o
> universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o
> locale.o pp_pack.o pp_sort.o   miniperlmain.o opmini.o perlmini.o -lm
> -lcrypt -lutil
> gv.o: In function `Perl_gv_fetchfile_flags':
> /usr/local/tmp/usr/local/ports/lang/perl5.10/work/perl-5.10.1/gv.c:161:
> undefined reference to `__stack_chk_fail_local'
> gv.o: In function `Perl_gv_stashpvn':
> /usr/local/tmp/usr/local/ports/lang/perl5.10/work/perl-5.10.1/gv.c:878:
> undefined reference to `__stack_chk_fail_local'
> gv.o: In function `Perl_gv_fetchpvn_flags':
> /usr/local/tmp/usr/local/ports/lang/perl5.10/work/perl-5.10.1/gv.c:1426:
> undefined reference to `__stack_chk_fail_local'
> toke.o: In function `S_feature_is_enabled':
> /usr/local/tmp/usr/local/ports/lang/perl5.10/work/perl-5.10.1/toke.c:586:
> undefined reference to `__stack_chk_fail_local'
> toke.o: In function `S_intuit_more':
> /usr/local/tmp/usr/local/ports/lang/perl5.10/work/perl-5.10.1/toke.c:2724:
> undefined reference to `__stack_chk_fail_local'
> toke.o:/usr/local/tmp/usr/local/ports/lang/perl5.10/work/perl-5.10.1/toke=
.c:2835:
> more undefined references to `__stack_chk_fail_local' follow
> /usr/local/bin/ld: miniperl: hidden symbol `__stack_chk_fail_local'
> isn't defined
> /usr/local/bin/ld: final link failed: Nonrepresentable section on output
> collect2: ld returned 1 exit status
> *** Error code 1

Try adding '-lssp_nonshared' to the LDFLAGS.

#v+
chateau.d.if!abbe:~ % strings /usr/bin/gcc |fgrep stack-protector=20=20=20=
=20=20=20=20=20=20=20=20
%{fstack-protector:}
                                                          %{!shared:       =
                                            %{!pg: %{pthread:-lpthread} -lc=
}                                         %{pg:  %{pthread:-lpthread_p} -lc=
_p}}    %{shared:                                                          =
        %{pthread:-lpthread} -lc}                %{fstack-protector|fstack-=
protector-all:-lssp_nonshared}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20
=2DWstack-protector
=2Dfstack-protector
=2Dfstack-protector-all
#v-

I'm not sure how information about SSP is encoded in GCC binary. Maybe some
flag/switch you need to enable with GCC.

HTH
Ashish
=2D-=20
Sent via Gnus from GNU Emacs

They who can give up essential liberty to obtain a little temporary safety,
deserve neither liberty nor safety.
  -- Benjamin Franklin, Memoirs of the life and writings of Benjamin Frankl=
in

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCgAGBQJMHfPHAAoJEMdGz6nnT6SwJAIP/jdj6qaJRvybSjiiEd4xR1ZD
lzmV7e2QjzpH++6ggXhqI6Eo2qMYc01JMysHljTj4jQhW63+yLMPmM7/2ARZQM+a
2XxMBZvZOpwZRJpj8oD3hDcLz+MBx8giJseC0cGwrqL8o/tZlhIuFINiMF7BFLZE
uh6vB/OEeu/mJQ/dPQmn9V3UgD4DbWPqVLCPaOf2bF5YU7OKXuVw6R7huPJHkSg8
auAqll+4HrKudeD8IxlIs1T058ZWBztlP8M8uVkYZy0aDLQiGR8z8rp8pUXYChIR
vrHhpFYFsd+ftPM4wqAxymp5J4zo57VqsfwdDB7bbUjkqNyZwZql8Le5HPJPjCPV
ONVJnu/hBk1vpIvfR4eRY1C2zureCeD8QzBGvZiEy1wYWE7CQLOEXf1HsryYj566
vHnQQTPyO/Dp4ym+qnueprkfwaWGifYM5fvMnkRxAgJx7Q82QUmsvUh8VkOwR5Xi
e+JNFVdtYWrmkg4UoRWMnLBEN573aj5aJGLO8m2mM0W3CQghT4SQtIt44n5kRw2Q
2sDzN/cgEiiYlm5YeZhkso7nGuvJoOqFYsE99EZKignPSkH6UpB5e7ikE2ZxekRn
CWH0VzO/DnJtsrz7t13d8yHBQCf9Q6GDckm4jle9l8KpAa/jG6CRqTr/UHJciwaz
WhAw9vX7JScx79eWuG9a
=PFbE
-----END PGP SIGNATURE-----
--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86631ekm61.fsf>