# can't build perl 5.26.1



## zoujiaqing (Jan 1, 2018)

use dtrace error:

```
/usr/ports/lang/perl5.26/work/perl-5.26.1/cpan/podlators/../../miniperl "-I../../lib" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/pod2man
dtrace: failed to link script perldtrace.d: No probe sites found for declared provider
/bin/sh: No probes in perlmain.o, generating a dummy dtrace_main.o    : not found
make[2]: *** [Makefile:360: dtrace_main.o] Error 127
make[2]: *** Waiting for unfinished jobs....
```

don't use dtrace error:

```
cc -o libperl.so  op.o     perl.o malloc.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.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 caretx.o dquote.o time64.o   DynaLoader.o -lpthread -lm -lcrypt -lutil
/usr/lib/crt1.o: In function `_start':
/usr/src/lib/csu/amd64/crt1.c:(.text+0x17b): undefined reference to `main'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [makefile:334: libperl.so] Error 1
make: *** Waiting for unfinished jobs....
```

how to build it?!- -


----------



## ShelLuser (Jan 1, 2018)

You're not giving us enough information. For example: what version of FreeBSD are you using? Have you updated the ports collection to the most recent version? Did you change any options other than DTRACE (see `make showconfig`)?

And it might help to paste a little more of the errors you got, more lines from before the point there the build halted.


----------



## talsamon (Jan 1, 2018)

Found this, this is an old site for lang/perl5.24:
https://rt.perl.org/Public/Bug/Display.html?id=130108
lang/Perl5.24 has a patch-dbatch., lang/Perl5.26 has not. Maybe it needs one. 
So I would suggest, write a mail to the maintainer or make a PR.


----------



## ShelLuser (Jan 1, 2018)

talsamon said:


> Found this, this is an old site for lang/perl5.24:
> https://rt.perl.org/Public/Bug/Display.html?id=130108.


That PR is from 2016 and even marked as resolved.

Also: I have no problems at all building lang/perl5.26 on FreeBSD 11.1.


----------



## talsamon (Jan 1, 2018)

You are right. I looked into the source the patch is included in lang/perl5.26.


----------



## zoujiaqing (Jan 2, 2018)

My FreeBSD version 11.1-CURRENT


----------



## SirDice (Jan 2, 2018)

zoujiaqing said:


> My FreeBSD version 11.1-CURRENT


Dude, 11.1 was released in July 2017. Maybe you should update your system?


----------



## zoujiaqing (Jan 2, 2018)

SirDice said:


> Dude, 11.1 was released in July 2017. Maybe you should update your system?



system info:


```
[root@freebsd /usr/ports/lang/perl5.26]# uname -a
FreeBSD freebsd 11.1-STABLE FreeBSD 11.1-STABLE #0 r326381: Thu Nov 30 02:44:37 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
```

but, I can't upgrade it:

```
[root@freebsd /usr/ports/lang/perl5.26]# freebsd-update fetch && freebsd-update install
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update4.freebsd.org... failed.
Fetching public key from update5.freebsd.org... failed.
Fetching public key from update6.freebsd.org... failed.
No mirrors remaining, giving up.
```


----------



## SirDice (Jan 2, 2018)

Ok, so you have 11-STABLE, not 11.1-CURRENT (that version never existed). The only way to update a -STABLE version is by using the source, freebsd-update(8) only works for -RELEASE versions.


----------



## ShelLuser (Jan 2, 2018)

zoujiaqing said:


> system info:
> 
> 
> ```
> ...


This is most likely the cause of your problems. You see, despite their names both -STABLE and -CURRENT aren't production releases. Instead these are developer snapshots where the main difference is that -STABLE is a bit less "bleeding edge" than -CURRRENT. But despite that you're still pretty much on your own and there are no guarantees that things will actually work.

I strongly suggest to use RELENG 11.1 instead. This is a currently supported release, also see this link. Hope this can also help.


----------



## SirDice (Jan 2, 2018)

Note that, contrary to -CURRENT, -STABLE is a supported version. As long as it's a recent -STABLE version from a supported major branch (10-STABLE and 11-STABLE at this time).

But I agree, if you don't need anything specific from -STABLE you should stick to a -RELEASE version.


----------

