lang/perl5.10 doesn't build with gcc 4.5.1

Ashish SHUKLA ashish at FreeBSD.org
Sun Jun 20 10:56:16 UTC 2010


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 =  /usr/local/bin/gcc45 -DPERL_CORE -c 
> -DAPPLLIB_EXP="/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=c89 -pipe -g
> -march=native -g -Wall -ansi -W -Wextra -Wdeclaration-after-statement
> -Wendif-labels -Wc++-compat
> LD_LIBRARY_PATH=/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           
%{fstack-protector:}
                                                          %{!shared:                                                   %{!pg: %{pthread:-lpthread} -lc}                                         %{pg:  %{pthread:-lpthread_p} -lc_p}}    %{shared:                                                                  %{pthread:-lpthread} -lc}                %{fstack-protector|fstack-protector-all:-lssp_nonshared}                 
-Wstack-protector
-fstack-protector
-fstack-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
-- 
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 Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20100620/64976b5c/attachment.pgp


More information about the freebsd-ports mailing list