# Can't build perl 5.12 or 5.14 on FreeBSD 8.2



## Xosted (Apr 4, 2012)

Hi everyone,

I am desperately trying to get perl built on my machine. When I use portinstall as so:
[CMD=""]portinstall lang/perl5.12[/CMD] or [CMD=""]portinstall lang/perl5.14[/CMD]
It fails with this error message:

```
LD_LIBRARY_PATH=/usr/ports/lang/perl5.14/work/perl-5.14.2 gcc46 -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 keywords.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 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_stashpvn':
gv.c:(.text+0x5071): undefined reference to `__stack_chk_fail_local'
gv.o: In function `Perl_gv_fetchfile_flags':
gv.c:(.text+0x651d): undefined reference to `__stack_chk_fail_local'
toke.o: In function `S_incline':
toke.c:(.text+0x864): undefined reference to `__stack_chk_fail_local'
toke.o: In function `Perl_feature_is_enabled':
toke.c:(.text+0x1268): undefined reference to `__stack_chk_fail_local'
toke.o: In function `S_intuit_more.part.5':
toke.c:(.text+0x409f): undefined reference to `__stack_chk_fail_local'
toke.o:toke.c:(.text+0x4b1d): 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: Bad value
collect2: ld returned 1 exit status
*** Error code 1

Stop in /usr/ports/lang/perl5.14/work/perl-5.14.2.
*** Error code 1

Stop in /usr/ports/lang/perl5.14.
*** Error code 1

Stop in /usr/ports/lang/perl5.14.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20120405-75913-1s6k3w2-0 env make DEPENDS_TARGET=package
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! lang/perl5.14 (linker error)
```

How to solve this?


----------



## fonz (Apr 4, 2012)

Have you tried updating your ports tree?


----------



## Xosted (Apr 4, 2012)

It actually is up to date.
I use [CMD=""]portsnap fetch update[/CMD]
for this.


----------



## ahavatar (Apr 5, 2012)

Try to install the latest binary packages for 8.2-STABLE, and follow the instructions in /usr/ports/UPDATING


----------



## SirDice (Apr 5, 2012)

Build the port using the standard compiler instead of GCC 4.6.


----------



## wblock@ (Apr 5, 2012)

Well spotted!


----------

